diff --git a/sdk/search/azure-mgmt-search/_meta.json b/sdk/search/azure-mgmt-search/_meta.json index fd859248c293..73e57681ce9e 100644 --- a/sdk/search/azure-mgmt-search/_meta.json +++ b/sdk/search/azure-mgmt-search/_meta.json @@ -1,11 +1,11 @@ { - "commit": "33a7dbc1743fdacb8e2259011a035154a98cad66", + "commit": "17377159d52d9eaa40303a10bfc0ec270f1a684d", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.2.16", + "@autorest/python@6.4.8", "@autorest/modelerfour@4.24.3" ], - "autorest_command": "autorest specification/search/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.2.16 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", + "autorest_command": "autorest specification/search/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.4.8 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/search/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py index 24b8b8361c5c..b3c2b1e5d03e 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -43,7 +37,7 @@ class SearchManagementClientConfiguration(Configuration): # pylint: disable=too def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(SearchManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", "2022-09-01") + api_version: str = kwargs.pop("api_version", "2022-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/_search_management_client.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/_search_management_client.py index eb9cd7e82f9e..bf65f5376b56 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/_search_management_client.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/_search_management_client.py @@ -73,7 +73,7 @@ def __init__( self._config = SearchManagementClientConfiguration( credential=credential, subscription_id=subscription_id, **kwargs ) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -122,5 +122,5 @@ def __enter__(self) -> "SearchManagementClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/_serialization.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/_serialization.py index f17c068e833e..842ae727fbbc 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/_serialization.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/_serialization.py @@ -629,7 +629,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): if xml_desc.get("attr", False): if xml_ns: ET.register_namespace(xml_prefix, xml_ns) - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) serialized.set(xml_name, new_attr) # type: ignore continue if xml_desc.get("text", False): @@ -1271,7 +1271,7 @@ def _extract_name_from_internal_type(internal_type): 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) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) return xml_name @@ -1295,7 +1295,7 @@ def xml_key_extractor(attr, attr_desc, data): # Integrate namespace if necessary xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) if xml_ns: - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) # If it's an attribute, that's simple if xml_desc.get("attr", False): diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/_version.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/_version.py index b77ac9246082..e5754a47ce68 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/_version.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_configuration.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_configuration.py index b5ae1b276b46..8ccc66ffd133 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_configuration.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -43,7 +37,7 @@ class SearchManagementClientConfiguration(Configuration): # pylint: disable=too def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(SearchManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", "2022-09-01") + api_version: str = kwargs.pop("api_version", "2022-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_search_management_client.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_search_management_client.py index 5f316590f2a2..0994122c7e8b 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_search_management_client.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_search_management_client.py @@ -74,7 +74,7 @@ def __init__( self._config = SearchManagementClientConfiguration( credential=credential, subscription_id=subscription_id, **kwargs ) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -123,5 +123,5 @@ async def __aenter__(self) -> "SearchManagementClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_admin_keys_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_admin_keys_operations.py index 17bd173e0489..f9d226f6a857 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_admin_keys_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_admin_keys_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._admin_keys_operations import build_get_request, build_regenerate_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -65,6 +60,9 @@ async def get( ) -> _models.AdminKeyResult: """Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -90,9 +88,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AdminKeyResult] = kwargs.pop("cls", None) _client_request_id = None @@ -112,8 +108,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -145,6 +142,9 @@ async def regenerate( """Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -173,9 +173,7 @@ async def regenerate( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AdminKeyResult] = kwargs.pop("cls", None) _client_request_id = None @@ -196,8 +194,9 @@ async def regenerate( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_operations.py index 59426db1af96..c3a1cfa68a0c 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -69,9 +64,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -122,8 +115,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_endpoint_connections_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_endpoint_connections_operations.py index 56690086adeb..a45383ab9096 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_endpoint_connections_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -36,10 +35,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -77,6 +72,9 @@ async def update( ) -> _models.PrivateEndpointConnection: """Updates a Private Endpoint connection to the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -115,6 +113,9 @@ async def update( ) -> _models.PrivateEndpointConnection: """Updates a Private Endpoint connection to the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -151,6 +152,9 @@ async def update( ) -> _models.PrivateEndpointConnection: """Updates a Private Endpoint connection to the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -161,7 +165,7 @@ async def update( Azure Cognitive Search service with the specified resource group. Required. :type private_endpoint_connection_name: str :param private_endpoint_connection: The definition of the private endpoint connection to - update. Is either a model type or a IO type. Required. + update. Is either a PrivateEndpointConnection type or a IO type. Required. :type private_endpoint_connection: ~azure.mgmt.search.models.PrivateEndpointConnection or IO :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -185,9 +189,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) @@ -219,8 +221,9 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -252,6 +255,9 @@ async def get( """Gets the details of the private endpoint connection to the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -280,9 +286,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) _client_request_id = None @@ -303,8 +307,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -335,6 +340,9 @@ async def delete( ) -> Optional[_models.PrivateEndpointConnection]: """Disconnects the private endpoint connection and deletes it from the search service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -363,9 +371,7 @@ async def delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) _client_request_id = None @@ -386,8 +392,9 @@ async def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -419,6 +426,9 @@ def list_by_service( ) -> AsyncIterable["_models.PrivateEndpointConnection"]: """Gets a list of all private endpoint connections in the given service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -438,9 +448,7 @@ def list_by_service( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) error_map = { @@ -498,8 +506,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_link_resources_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_link_resources_operations.py index 34b0497a4323..e15ede2af5cf 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_link_resources_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_link_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._private_link_resources_operations import build_list_supported_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -67,6 +62,9 @@ def list_supported( ) -> AsyncIterable["_models.PrivateLinkResource"]: """Gets a list of all supported private link resource types for the given service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -84,9 +82,7 @@ def list_supported( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PrivateLinkResourcesResult] = kwargs.pop("cls", None) error_map = { @@ -144,8 +140,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_query_keys_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_query_keys_operations.py index 1c6a76a45b83..20595c56c57a 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_query_keys_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_query_keys_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -35,10 +34,6 @@ build_list_by_search_service_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -74,6 +69,9 @@ async def create( """Generates a new query key for the specified search service. You can create up to 50 query keys per service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -101,9 +99,7 @@ async def create( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.QueryKey] = kwargs.pop("cls", None) _client_request_id = None @@ -124,8 +120,9 @@ async def create( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -155,6 +152,9 @@ def list_by_search_service( ) -> AsyncIterable["_models.QueryKey"]: """Returns the list of query API keys for the given Azure Cognitive Search service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -172,9 +172,7 @@ def list_by_search_service( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ListQueryKeysResult] = kwargs.pop("cls", None) error_map = { @@ -232,8 +230,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -261,6 +260,9 @@ async def delete( # pylint: disable=inconsistent-return-statements """Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating a query key is to delete and then recreate it. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -289,9 +291,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) _client_request_id = None @@ -312,8 +312,9 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_services_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_services_operations.py index da2d6969fc55..b7b20eee2c48 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_services_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_services_operations.py @@ -87,9 +87,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SearchService] = kwargs.pop("cls", None) @@ -120,8 +118,9 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -159,6 +158,9 @@ async def begin_create_or_update( """Creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -205,6 +207,9 @@ async def begin_create_or_update( """Creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -249,6 +254,9 @@ async def begin_create_or_update( """Creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -259,8 +267,8 @@ async def begin_create_or_update( of the service URI (https://:code:``.search.windows.net). You cannot change the service name after the service is created. Required. :type search_service_name: str - :param service: The definition of the search service to create or update. Is either a model - type or a IO type. Required. + :param service: The definition of the search service to create or update. Is either a + SearchService type or a IO type. Required. :type service: ~azure.mgmt.search.models.SearchService or IO :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -284,9 +292,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SearchService] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -345,6 +351,9 @@ async def update( ) -> _models.SearchService: """Updates an existing search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -377,6 +386,9 @@ async def update( ) -> _models.SearchService: """Updates an existing search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -407,13 +419,16 @@ async def update( ) -> _models.SearchService: """Updates an existing search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param search_service_name: The name of the Azure Cognitive Search service to update. Required. :type search_service_name: str - :param service: The definition of the search service to update. Is either a model type or a IO - type. Required. + :param service: The definition of the search service to update. Is either a SearchServiceUpdate + type or a IO type. Required. :type service: ~azure.mgmt.search.models.SearchServiceUpdate or IO :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -437,9 +452,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SearchService] = kwargs.pop("cls", None) @@ -470,8 +483,9 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -501,6 +515,9 @@ async def get( ) -> _models.SearchService: """Gets the search service with the given name in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -526,9 +543,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SearchService] = kwargs.pop("cls", None) _client_request_id = None @@ -548,8 +563,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -579,6 +595,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Deletes a search service in the given resource group, along with its associated resources. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -604,9 +623,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) _client_request_id = None @@ -626,8 +643,9 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -652,6 +670,9 @@ def list_by_resource_group( ) -> AsyncIterable["_models.SearchService"]: """Gets a list of all Search services in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -666,9 +687,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SearchServiceListResult] = kwargs.pop("cls", None) error_map = { @@ -725,8 +744,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -748,6 +768,9 @@ def list_by_subscription( ) -> AsyncIterable["_models.SearchService"]: """Gets a list of all Search services in the given subscription. + .. seealso:: + - https://aka.ms/search-manage + :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: ~azure.mgmt.search.models.SearchManagementRequestOptions @@ -759,9 +782,7 @@ def list_by_subscription( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SearchServiceListResult] = kwargs.pop("cls", None) error_map = { @@ -817,8 +838,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -843,6 +865,9 @@ async def check_name_availability( must be globally unique since they are part of the service URI (https://:code:``.search.windows.net). + .. seealso:: + - https://aka.ms/search-manage + :param name: The search service name to validate. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Required. @@ -870,9 +895,7 @@ async def check_name_availability( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) type: Literal["searchServices"] = kwargs.pop("type", "searchServices") cls: ClsType[_models.CheckNameAvailabilityOutput] = kwargs.pop("cls", None) @@ -896,8 +919,9 @@ async def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_shared_private_link_resources_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_shared_private_link_resources_operations.py index e5fc3dc81da5..f38a021b99f8 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_shared_private_link_resources_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_shared_private_link_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -38,10 +37,6 @@ build_list_by_service_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -85,9 +80,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.SharedPrivateLinkResource]] = kwargs.pop("cls", None) @@ -119,8 +112,9 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -157,6 +151,9 @@ async def begin_create_or_update( """Initiates the creation or update of a shared private link resource managed by the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -204,6 +201,9 @@ async def begin_create_or_update( """Initiates the creation or update of a shared private link resource managed by the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -249,6 +249,9 @@ async def begin_create_or_update( """Initiates the creation or update of a shared private link resource managed by the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -259,7 +262,7 @@ async def begin_create_or_update( by the Azure Cognitive Search service within the specified resource group. Required. :type shared_private_link_resource_name: str :param shared_private_link_resource: The definition of the shared private link resource to - create or update. Is either a model type or a IO type. Required. + create or update. Is either a SharedPrivateLinkResource type or a IO type. Required. :type shared_private_link_resource: ~azure.mgmt.search.models.SharedPrivateLinkResource or IO :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -283,9 +286,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SharedPrivateLinkResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -347,6 +348,9 @@ async def get( """Gets the details of the shared private link resource managed by the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -375,9 +379,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SharedPrivateLinkResource] = kwargs.pop("cls", None) _client_request_id = None @@ -398,8 +400,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -438,9 +441,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) _client_request_id = None @@ -461,8 +462,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -489,6 +491,9 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Initiates the deletion of the shared private link resource from the search service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -516,9 +521,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -573,6 +576,9 @@ def list_by_service( ) -> AsyncIterable["_models.SharedPrivateLinkResource"]: """Gets a list of all shared private link resources managed by the given service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -592,9 +598,7 @@ def list_by_service( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SharedPrivateLinkResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -652,8 +656,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models_py3.py index 7e1f8f58f53d..8d05eab32968 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models_py3.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models_py3.py @@ -1019,7 +1019,7 @@ class SearchService(TrackedResource): # pylint: disable=too-many-instance-attri state. If your service is in the degraded, disabled, or error states, it means the Azure Cognitive Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. Known values - are: "running", "provisioning", "deleting", "degraded", "disabled", "error", and "stopped". + are: "running", "provisioning", "deleting", "degraded", "disabled", and "error". :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus :ivar status_details: The details of the search service status. :vartype status_details: str @@ -1259,7 +1259,7 @@ class SearchServiceUpdate(Resource): # pylint: disable=too-many-instance-attrib state. If your service is in the degraded, disabled, or error states, it means the Azure Cognitive Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. Known values - are: "running", "provisioning", "deleting", "degraded", "disabled", "error", and "stopped". + are: "running", "provisioning", "deleting", "degraded", "disabled", and "error". :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus :ivar status_details: The details of the search service status. :vartype status_details: str diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_search_management_client_enums.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_search_management_client_enums.py index 991db6160eec..453f1b28140b 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_search_management_client_enums.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_search_management_client_enums.py @@ -170,8 +170,6 @@ class SearchServiceStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): ERROR = "error" """The search service is in error state, indicating either a failure to provision or to be #: deleted.""" - STOPPED = "stopped" - """The search service is in a subscription that's disabled.""" class SharedPrivateLinkResourceAsyncOperationResult(str, Enum, metaclass=CaseInsensitiveEnumMeta): diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_admin_keys_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_admin_keys_operations.py index 3af98f16d85a..f6d7afbbc3b6 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_admin_keys_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_admin_keys_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -50,7 +45,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -89,7 +84,7 @@ def build_regenerate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -146,6 +141,9 @@ def get( ) -> _models.AdminKeyResult: """Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -171,9 +169,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AdminKeyResult] = kwargs.pop("cls", None) _client_request_id = None @@ -193,8 +189,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -226,6 +223,9 @@ def regenerate( """Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -254,9 +254,7 @@ def regenerate( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AdminKeyResult] = kwargs.pop("cls", None) _client_request_id = None @@ -277,8 +275,9 @@ def regenerate( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_operations.py index 0db127672e2a..1491027dafed 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -91,9 +86,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -144,8 +137,9 @@ def extract_data(pipeline_response): 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=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_endpoint_connections_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_endpoint_connections_operations.py index b935d3cc8fad..90d711b56074 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_endpoint_connections_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_endpoint_connections_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +48,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -98,7 +93,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -140,7 +135,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -181,7 +176,7 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -241,6 +236,9 @@ def update( ) -> _models.PrivateEndpointConnection: """Updates a Private Endpoint connection to the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -279,6 +277,9 @@ def update( ) -> _models.PrivateEndpointConnection: """Updates a Private Endpoint connection to the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -315,6 +316,9 @@ def update( ) -> _models.PrivateEndpointConnection: """Updates a Private Endpoint connection to the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -325,7 +329,7 @@ def update( Azure Cognitive Search service with the specified resource group. Required. :type private_endpoint_connection_name: str :param private_endpoint_connection: The definition of the private endpoint connection to - update. Is either a model type or a IO type. Required. + update. Is either a PrivateEndpointConnection type or a IO type. Required. :type private_endpoint_connection: ~azure.mgmt.search.models.PrivateEndpointConnection or IO :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -349,9 +353,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) @@ -383,8 +385,9 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -416,6 +419,9 @@ def get( """Gets the details of the private endpoint connection to the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -444,9 +450,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) _client_request_id = None @@ -467,8 +471,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -499,6 +504,9 @@ def delete( ) -> Optional[_models.PrivateEndpointConnection]: """Disconnects the private endpoint connection and deletes it from the search service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -527,9 +535,7 @@ def delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) _client_request_id = None @@ -550,8 +556,9 @@ def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -583,6 +590,9 @@ def list_by_service( ) -> Iterable["_models.PrivateEndpointConnection"]: """Gets a list of all private endpoint connections in the given service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -601,9 +611,7 @@ def list_by_service( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) error_map = { @@ -661,8 +669,9 @@ def extract_data(pipeline_response): 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=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_link_resources_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_link_resources_operations.py index ab8eaeaa4281..66ac17949f5f 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_link_resources_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_link_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ def build_list_supported_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -108,6 +103,9 @@ def list_supported( ) -> Iterable["_models.PrivateLinkResource"]: """Gets a list of all supported private link resource types for the given service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -125,9 +123,7 @@ def list_supported( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PrivateLinkResourcesResult] = kwargs.pop("cls", None) error_map = { @@ -185,8 +181,9 @@ def extract_data(pipeline_response): 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=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_query_keys_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_query_keys_operations.py index cf19c6af0e6f..86f4b62db566 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_query_keys_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_query_keys_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +48,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -92,7 +87,7 @@ def build_list_by_search_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -131,7 +126,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -190,6 +185,9 @@ def create( """Generates a new query key for the specified search service. You can create up to 50 query keys per service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -217,9 +215,7 @@ def create( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.QueryKey] = kwargs.pop("cls", None) _client_request_id = None @@ -240,8 +236,9 @@ def create( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -271,6 +268,9 @@ def list_by_search_service( ) -> Iterable["_models.QueryKey"]: """Returns the list of query API keys for the given Azure Cognitive Search service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -288,9 +288,7 @@ def list_by_search_service( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ListQueryKeysResult] = kwargs.pop("cls", None) error_map = { @@ -348,8 +346,9 @@ def extract_data(pipeline_response): 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=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -377,6 +376,9 @@ def delete( # pylint: disable=inconsistent-return-statements """Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating a query key is to delete and then recreate it. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -405,9 +407,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) _client_request_id = None @@ -428,8 +428,9 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_services_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_services_operations.py index cc4f88938792..e0b53e636dae 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_services_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_services_operations.py @@ -54,7 +54,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -95,7 +95,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -136,7 +136,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -174,7 +174,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +207,7 @@ def build_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +239,7 @@ def build_list_by_subscription_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -267,7 +267,7 @@ def build_check_name_availability_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") type = "searchServices" @@ -333,9 +333,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SearchService] = kwargs.pop("cls", None) @@ -366,8 +364,9 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -405,6 +404,9 @@ def begin_create_or_update( """Creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -451,6 +453,9 @@ def begin_create_or_update( """Creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -495,6 +500,9 @@ def begin_create_or_update( """Creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -505,8 +513,8 @@ def begin_create_or_update( of the service URI (https://:code:``.search.windows.net). You cannot change the service name after the service is created. Required. :type search_service_name: str - :param service: The definition of the search service to create or update. Is either a model - type or a IO type. Required. + :param service: The definition of the search service to create or update. Is either a + SearchService type or a IO type. Required. :type service: ~azure.mgmt.search.models.SearchService or IO :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -530,9 +538,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SearchService] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -591,6 +597,9 @@ def update( ) -> _models.SearchService: """Updates an existing search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -623,6 +632,9 @@ def update( ) -> _models.SearchService: """Updates an existing search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -653,13 +665,16 @@ def update( ) -> _models.SearchService: """Updates an existing search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str :param search_service_name: The name of the Azure Cognitive Search service to update. Required. :type search_service_name: str - :param service: The definition of the search service to update. Is either a model type or a IO - type. Required. + :param service: The definition of the search service to update. Is either a SearchServiceUpdate + type or a IO type. Required. :type service: ~azure.mgmt.search.models.SearchServiceUpdate or IO :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -683,9 +698,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SearchService] = kwargs.pop("cls", None) @@ -716,8 +729,9 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -747,6 +761,9 @@ def get( ) -> _models.SearchService: """Gets the search service with the given name in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -772,9 +789,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SearchService] = kwargs.pop("cls", None) _client_request_id = None @@ -794,8 +809,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -825,6 +841,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Deletes a search service in the given resource group, along with its associated resources. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -850,9 +869,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) _client_request_id = None @@ -872,8 +889,9 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -898,6 +916,9 @@ def list_by_resource_group( ) -> Iterable["_models.SearchService"]: """Gets a list of all Search services in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -912,9 +933,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SearchServiceListResult] = kwargs.pop("cls", None) error_map = { @@ -971,8 +990,9 @@ def extract_data(pipeline_response): 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=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -994,6 +1014,9 @@ def list_by_subscription( ) -> Iterable["_models.SearchService"]: """Gets a list of all Search services in the given subscription. + .. seealso:: + - https://aka.ms/search-manage + :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: ~azure.mgmt.search.models.SearchManagementRequestOptions @@ -1005,9 +1028,7 @@ def list_by_subscription( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SearchServiceListResult] = kwargs.pop("cls", None) error_map = { @@ -1063,8 +1084,9 @@ def extract_data(pipeline_response): 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=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1089,6 +1111,9 @@ def check_name_availability( must be globally unique since they are part of the service URI (https://:code:``.search.windows.net). + .. seealso:: + - https://aka.ms/search-manage + :param name: The search service name to validate. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Required. @@ -1116,9 +1141,7 @@ def check_name_availability( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) type: Literal["searchServices"] = kwargs.pop("type", "searchServices") cls: ClsType[_models.CheckNameAvailabilityOutput] = kwargs.pop("cls", None) @@ -1142,8 +1165,9 @@ def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_shared_private_link_resources_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_shared_private_link_resources_operations.py index fd9dad1cbe97..65d282836f58 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_shared_private_link_resources_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_shared_private_link_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +50,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -100,7 +95,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,7 +137,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -183,7 +178,7 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -249,9 +244,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.SharedPrivateLinkResource]] = kwargs.pop("cls", None) @@ -283,8 +276,9 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -321,6 +315,9 @@ def begin_create_or_update( """Initiates the creation or update of a shared private link resource managed by the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -368,6 +365,9 @@ def begin_create_or_update( """Initiates the creation or update of a shared private link resource managed by the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -413,6 +413,9 @@ def begin_create_or_update( """Initiates the creation or update of a shared private link resource managed by the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -423,7 +426,7 @@ def begin_create_or_update( by the Azure Cognitive Search service within the specified resource group. Required. :type shared_private_link_resource_name: str :param shared_private_link_resource: The definition of the shared private link resource to - create or update. Is either a model type or a IO type. Required. + create or update. Is either a SharedPrivateLinkResource type or a IO type. Required. :type shared_private_link_resource: ~azure.mgmt.search.models.SharedPrivateLinkResource or IO :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -447,9 +450,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SharedPrivateLinkResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -510,6 +511,9 @@ def get( """Gets the details of the shared private link resource managed by the search service in the given resource group. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -538,9 +542,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SharedPrivateLinkResource] = kwargs.pop("cls", None) _client_request_id = None @@ -561,8 +563,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -601,9 +604,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) _client_request_id = None @@ -624,8 +625,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -652,6 +654,9 @@ def begin_delete( ) -> LROPoller[None]: """Initiates the deletion of the shared private link resource from the search service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -679,9 +684,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -735,6 +738,9 @@ def list_by_service( ) -> Iterable["_models.SharedPrivateLinkResource"]: """Gets a list of all shared private link resources managed by the given service. + .. seealso:: + - https://aka.ms/search-manage + :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str @@ -753,9 +759,7 @@ def list_by_service( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SharedPrivateLinkResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -813,8 +817,9 @@ def extract_data(pipeline_response): 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=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response