Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[AutoRelease] t2-search-2025-01-21-27545(can only be merged by SDK owner) #39323

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions sdk/search/azure-mgmt-search/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Release History

## 9.2.0b3 (2025-02-24)

### Features Added

- Client `SearchManagementClient` added operation group `offerings`
- Client `SearchManagementClient` added operation group `service`
- Model `SearchService` added property `system_data`
- Model `SearchService` added property `endpoint`
- Model `SearchService` added property `compute_type`
- Model `SearchService` added property `upgrade_available`
- Model `SearchService` added property `service_upgrade_date`
- Model `SearchServiceUpdate` added property `system_data`
- Model `SearchServiceUpdate` added property `endpoint`
- Model `SearchServiceUpdate` added property `compute_type`
- Model `SearchServiceUpdate` added property `upgrade_available`
- Model `SearchServiceUpdate` added property `service_upgrade_date`
- Added enum `ComputeType`
- Added enum `CreatedByType`
- Added enum `FeatureName`
- Added model `FeatureOffering`
- Added model `OfferingsByRegion`
- Added model `OfferingsListResult`
- Added model `SkuOffering`
- Added model `SkuOfferingLimits`
- Added model `SystemData`
- Added model `OfferingsOperations`
- Added model `ServiceOperations`

## 9.2.0b2 (2024-07-18)

### Other Changes
Expand Down
6 changes: 3 additions & 3 deletions sdk/search/azure-mgmt-search/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "32f566eb38af9593cfc1ed183362471c50d67fb2",
"commit": "ae6e92d62421bfafa2b695d742f3820d5de204eb",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.13.16",
"@autorest/python@6.27.4",
"@autorest/[email protected]"
],
"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.13.16 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"autorest_command": "autorest specification/search/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"readme": "specification/search/resource-manager/readme.md"
}
12 changes: 9 additions & 3 deletions sdk/search/azure-mgmt-search/azure/mgmt/search/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position

from ._search_management_client import SearchManagementClient
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from ._patch import * # pylint: disable=unused-wildcard-import

from ._search_management_client import SearchManagementClient # type: ignore
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"SearchManagementClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential


class SearchManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
class SearchManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for SearchManagementClient.

Note that all parameters used to create this instance are saved as instance
Expand All @@ -29,13 +28,13 @@ class SearchManagementClientConfiguration: # pylint: disable=too-many-instance-
:param subscription_id: The unique identifier for a Microsoft Azure subscription. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2024-06-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2025-02-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
api_version: str = kwargs.pop("api_version", "2024-06-01-preview")
api_version: str = kwargs.pop("api_version", "2025-02-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from copy import deepcopy
from typing import Any, TYPE_CHECKING
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.rest import HttpRequest, HttpResponse
Expand All @@ -20,28 +21,29 @@
from .operations import (
AdminKeysOperations,
NetworkSecurityPerimeterConfigurationsOperations,
OfferingsOperations,
Operations,
PrivateEndpointConnectionsOperations,
PrivateLinkResourcesOperations,
QueryKeysOperations,
SearchManagementClientOperationsMixin,
ServiceOperations,
ServicesOperations,
SharedPrivateLinkResourcesOperations,
UsagesOperations,
)

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential


class SearchManagementClient(
SearchManagementClientOperationsMixin
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
class SearchManagementClient(SearchManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes
"""Client that can be used to manage Azure AI Search services and API keys.

:ivar operations: Operations operations
:vartype operations: azure.mgmt.search.operations.Operations
:ivar offerings: OfferingsOperations operations
:vartype offerings: azure.mgmt.search.operations.OfferingsOperations
:ivar admin_keys: AdminKeysOperations operations
:vartype admin_keys: azure.mgmt.search.operations.AdminKeysOperations
:ivar query_keys: QueryKeysOperations operations
Expand All @@ -62,14 +64,16 @@ class SearchManagementClient(
NetworkSecurityPerimeterConfigurationsOperations operations
:vartype network_security_perimeter_configurations:
azure.mgmt.search.operations.NetworkSecurityPerimeterConfigurationsOperations
:ivar service: ServiceOperations operations
:vartype service: azure.mgmt.search.operations.ServiceOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The unique identifier for a Microsoft Azure subscription. You can
obtain this value from the Azure Resource Manager API or the portal. Required.
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2024-06-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2025-02-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand Down Expand Up @@ -111,6 +115,7 @@ def __init__(
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.offerings = OfferingsOperations(self._client, self._config, self._serialize, self._deserialize)
self.admin_keys = AdminKeysOperations(self._client, self._config, self._serialize, self._deserialize)
self.query_keys = QueryKeysOperations(self._client, self._config, self._serialize, self._deserialize)
self.services = ServicesOperations(self._client, self._config, self._serialize, self._deserialize)
Expand All @@ -127,6 +132,7 @@ def __init__(
self.network_security_perimeter_configurations = NetworkSecurityPerimeterConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.service = ServiceOperations(self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand All @@ -153,7 +159,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
def close(self) -> None:
self._client.close()

def __enter__(self) -> "SearchManagementClient":
def __enter__(self) -> Self:
self._client.__enter__()
return self

Expand Down
Loading
Loading