old_contents: # -------------------------------------------------------------------------
  # Copyright (c) Microsoft Corporation. All rights reserved.
  # Licensed under the MIT License. See License.txt in the project root for
  # license information.
  # --------------------------------------------------------------------------
  from typing import TYPE_CHECKING
  
  from azure.core.tracing.decorator import distributed_trace
  from ._generated import SearchServiceClient as _SearchServiceClient
  from .._headers_mixin import HeadersMixin
  from .._version import SDK_MONIKER
  
  if TYPE_CHECKING:
      # pylint:disable=unused-import,ungrouped-imports
      from typing import Any, Union
      from azure.core.credentials import AzureKeyCredential
  
  
  class SearchServiceClient(HeadersMixin):
      """A client to interact with an existing Azure search service.
  
      :param endpoint: The URL endpoint of an Azure search service
      :type endpoint: str
      :param credential: A credential to authorize search client requests
      :type credential: ~azure.key.credentials.AzureKeyCredential
  
      .. admonition:: Example:
  
          .. literalinclude:: ../samples/sample_authentication.py
              :start-after: [START create_search_service_client_with_key]
              :end-before: [END create_search_service_client_with_key]
              :language: python
              :dedent: 4
              :caption: Creating the SearchServiceClient with an API key.
      """
  
      _ODATA_ACCEPT = "application/json;odata.metadata=minimal"  # type: str
  
      def __init__(self, endpoint, credential, **kwargs):
          # type: (str, AzureKeyCredential, **Any) -> None
  
          self._endpoint = endpoint  # type: str
          self._credential = credential  # type: AzureKeyCredential
          self._client = _SearchServiceClient(
              endpoint=endpoint, sdk_moniker=SDK_MONIKER, **kwargs
          )  # type: _SearchServiceClient
  
      def __repr__(self):
          # type: () -> str
          return "<SearchServiceClient [endpoint={}]>".format(repr(self._endpoint))[:1024]
  
      @distributed_trace
      def get_service_statistics(self, **kwargs):
          # type: (**Any) -> dict
          """Get service level statistics for a search service.
  
          """
          kwargs["headers"] = self._merge_client_headers(kwargs.get("headers"))
          result = self._client.get_service_statistics(**kwargs)
          return result.as_dict()
  
      def close(self):
          # type: () -> None
          """Close the :class:`~azure.search.SearchServiceClient` session.
  
          """
          return self._client.close()
  
      def __enter__(self):
          # type: () -> SearchServiceClient
          self._client.__enter__()  # pylint:disable=no-member
          return self
  
      def __exit__(self, *args):
          # type: (*Any) -> None
          self._client.__exit__(*args)  # pylint:disable=no-member
  
new_contents: # -------------------------------------------------------------------------
  # Copyright (c) Microsoft Corporation. All rights reserved.
  # Licensed under the MIT License. See License.txt in the project root for
  # license information.
  # --------------------------------------------------------------------------
  from typing import TYPE_CHECKING
  
  from azure.core.tracing.decorator import distributed_trace
  from ._generated import SearchServiceClient as _SearchServiceClient
  from .._headers_mixin import HeadersMixin
  from .._version import SDK_MONIKER
  
  if TYPE_CHECKING:
      # pylint:disable=unused-import,ungrouped-imports
      from typing import Any, Union
      from azure.core.credentials import AzureKeyCredential
  
  
  class SearchServiceClient(HeadersMixin):
      """A client to interact with an existing Azure search service.
  
      :param endpoint: The URL endpoint of an Azure search service
      :type endpoint: str
      :param credential: A credential to authorize search client requests
      :type credential: ~azure.core.credentials.AzureKeyCredential
  
      .. admonition:: Example:
  
          .. literalinclude:: ../samples/sample_authentication.py
              :start-after: [START create_search_service_client_with_key]
              :end-before: [END create_search_service_client_with_key]
              :language: python
              :dedent: 4
              :caption: Creating the SearchServiceClient with an API key.
      """
  
      _ODATA_ACCEPT = "application/json;odata.metadata=minimal"  # type: str
  
      def __init__(self, endpoint, credential, **kwargs):
          # type: (str, AzureKeyCredential, **Any) -> None
  
          self._endpoint = endpoint  # type: str
          self._credential = credential  # type: AzureKeyCredential
          self._client = _SearchServiceClient(
              endpoint=endpoint, sdk_moniker=SDK_MONIKER, **kwargs
          )  # type: _SearchServiceClient
  
      def __repr__(self):
          # type: () -> str
          return "<SearchServiceClient [endpoint={}]>".format(repr(self._endpoint))[:1024]
  
      @distributed_trace
      def get_service_statistics(self, **kwargs):
          # type: (**Any) -> dict
          """Get service level statistics for a search service.
  
          """
          kwargs["headers"] = self._merge_client_headers(kwargs.get("headers"))
          result = self._client.get_service_statistics(**kwargs)
          return result.as_dict()
  
      def close(self):
          # type: () -> None
          """Close the :class:`~azure.search.SearchServiceClient` session.
  
          """
          return self._client.close()
  
      def __enter__(self):
          # type: () -> SearchServiceClient
          self._client.__enter__()  # pylint:disable=no-member
          return self
  
      def __exit__(self, *args):
          # type: (*Any) -> None
          self._client.__exit__(*args)  # pylint:disable=no-member
  
subject: fix docstring in search (#10587)