Skip to content

Commit

Permalink
code and test (#27421)
Browse files Browse the repository at this point in the history
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
  • Loading branch information
azure-sdk authored Nov 11, 2022
1 parent 1e57a7e commit 7a0dd11
Show file tree
Hide file tree
Showing 823 changed files with 31,076 additions and 2,853 deletions.
6 changes: 6 additions & 0 deletions sdk/sql/azure-mgmt-sql/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 4.0.0b5 (2022-11-10)

### Features Added

- Model ServerDevOpsAuditingSettings has a new parameter is_managed_identity_in_use

## 4.0.0b4 (2022-09-29)

### Features Added
Expand Down
8 changes: 4 additions & 4 deletions sdk/sql/azure-mgmt-sql/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "8a20cee044fafde7ae0364edab45a577aa80d20f",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.1.6",
"@autorest/python@6.2.1",
"@autorest/[email protected]"
],
"commit": "14677ba21f6b5676e79b33d699f7a103dd8f255f",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/sql/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/sql/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/[email protected] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/sql/resource-manager/readme.md"
}
4 changes: 3 additions & 1 deletion sdk/sql/azure-mgmt-sql/azure/mgmt/sql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = ["SqlManagementClient"]
__all__ = [
"SqlManagementClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()
2 changes: 1 addition & 1 deletion sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "4.0.0b4"
VERSION = "4.0.0b5"
4 changes: 3 additions & 1 deletion sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = ["SqlManagementClient"]
__all__ = [
"SqlManagementClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# 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

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand Down Expand Up @@ -36,6 +37,10 @@
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]]

Expand Down Expand Up @@ -65,7 +70,7 @@ async def get(
resource_group_name: str,
server_name: str,
database_name: str,
policy_name: Union[str, "_models.ShortTermRetentionPolicyName"],
policy_name: Union[str, _models.ShortTermRetentionPolicyName],
**kwargs: Any
) -> _models.BackupShortTermRetentionPolicy:
"""Gets a database's short term retention policy.
Expand Down Expand Up @@ -95,7 +100,9 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
) # type: Literal["2021-02-01-preview"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupShortTermRetentionPolicy]

request = build_get_request(
Expand Down Expand Up @@ -136,7 +143,7 @@ async def _create_or_update_initial(
resource_group_name: str,
server_name: str,
database_name: str,
policy_name: Union[str, "_models.ShortTermRetentionPolicyName"],
policy_name: Union[str, _models.ShortTermRetentionPolicyName],
parameters: Union[_models.BackupShortTermRetentionPolicy, IO],
**kwargs: Any
) -> Optional[_models.BackupShortTermRetentionPolicy]:
Expand All @@ -151,7 +158,9 @@ async def _create_or_update_initial(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
) # type: Literal["2021-02-01-preview"]
content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str]
cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.BackupShortTermRetentionPolicy]]

Expand Down Expand Up @@ -207,7 +216,7 @@ async def begin_create_or_update(
resource_group_name: str,
server_name: str,
database_name: str,
policy_name: Union[str, "_models.ShortTermRetentionPolicyName"],
policy_name: Union[str, _models.ShortTermRetentionPolicyName],
parameters: _models.BackupShortTermRetentionPolicy,
*,
content_type: str = "application/json",
Expand Down Expand Up @@ -250,7 +259,7 @@ async def begin_create_or_update(
resource_group_name: str,
server_name: str,
database_name: str,
policy_name: Union[str, "_models.ShortTermRetentionPolicyName"],
policy_name: Union[str, _models.ShortTermRetentionPolicyName],
parameters: IO,
*,
content_type: str = "application/json",
Expand Down Expand Up @@ -293,7 +302,7 @@ async def begin_create_or_update(
resource_group_name: str,
server_name: str,
database_name: str,
policy_name: Union[str, "_models.ShortTermRetentionPolicyName"],
policy_name: Union[str, _models.ShortTermRetentionPolicyName],
parameters: Union[_models.BackupShortTermRetentionPolicy, IO],
**kwargs: Any
) -> AsyncLROPoller[_models.BackupShortTermRetentionPolicy]:
Expand Down Expand Up @@ -331,7 +340,9 @@ async def begin_create_or_update(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
) # type: Literal["2021-02-01-preview"]
content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str]
cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupShortTermRetentionPolicy]
polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod]
Expand Down Expand Up @@ -381,7 +392,7 @@ async def _update_initial(
resource_group_name: str,
server_name: str,
database_name: str,
policy_name: Union[str, "_models.ShortTermRetentionPolicyName"],
policy_name: Union[str, _models.ShortTermRetentionPolicyName],
parameters: Union[_models.BackupShortTermRetentionPolicy, IO],
**kwargs: Any
) -> Optional[_models.BackupShortTermRetentionPolicy]:
Expand All @@ -396,7 +407,9 @@ async def _update_initial(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
) # type: Literal["2021-02-01-preview"]
content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str]
cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.BackupShortTermRetentionPolicy]]

Expand Down Expand Up @@ -452,7 +465,7 @@ async def begin_update(
resource_group_name: str,
server_name: str,
database_name: str,
policy_name: Union[str, "_models.ShortTermRetentionPolicyName"],
policy_name: Union[str, _models.ShortTermRetentionPolicyName],
parameters: _models.BackupShortTermRetentionPolicy,
*,
content_type: str = "application/json",
Expand Down Expand Up @@ -495,7 +508,7 @@ async def begin_update(
resource_group_name: str,
server_name: str,
database_name: str,
policy_name: Union[str, "_models.ShortTermRetentionPolicyName"],
policy_name: Union[str, _models.ShortTermRetentionPolicyName],
parameters: IO,
*,
content_type: str = "application/json",
Expand Down Expand Up @@ -538,7 +551,7 @@ async def begin_update(
resource_group_name: str,
server_name: str,
database_name: str,
policy_name: Union[str, "_models.ShortTermRetentionPolicyName"],
policy_name: Union[str, _models.ShortTermRetentionPolicyName],
parameters: Union[_models.BackupShortTermRetentionPolicy, IO],
**kwargs: Any
) -> AsyncLROPoller[_models.BackupShortTermRetentionPolicy]:
Expand Down Expand Up @@ -576,7 +589,9 @@ async def begin_update(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
) # type: Literal["2021-02-01-preview"]
content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str]
cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupShortTermRetentionPolicy]
polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod]
Expand Down Expand Up @@ -644,7 +659,9 @@ def list_by_database(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview")) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
) # type: Literal["2021-02-01-preview"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupShortTermRetentionPolicyListResult]

error_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# 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 (
Expand All @@ -27,6 +28,10 @@
from ..._vendor import _convert_request
from ...operations._capabilities_operations import build_list_by_location_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]]

Expand All @@ -52,7 +57,7 @@ def __init__(self, *args, **kwargs) -> None:

@distributed_trace_async
async def list_by_location(
self, location_name: str, include: Optional[Union[str, "_models.CapabilityGroup"]] = None, **kwargs: Any
self, location_name: str, include: Optional[Union[str, _models.CapabilityGroup]] = None, **kwargs: Any
) -> _models.LocationCapabilities:
"""Gets the subscription capabilities available for the specified location.
Expand All @@ -79,7 +84,9 @@ async def list_by_location(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview")) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", "2020-11-01-preview")
) # type: Literal["2020-11-01-preview"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.LocationCapabilities]

request = build_list_by_location_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# 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, Optional, TypeVar, Union, overload

from azure.core.exceptions import (
Expand All @@ -27,6 +28,10 @@
from ..._vendor import _convert_request
from ...operations._data_masking_policies_operations import build_create_or_update_request, build_get_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]]

Expand Down Expand Up @@ -164,8 +169,8 @@ async def create_or_update(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) # type: str
data_masking_policy_name = kwargs.pop("data_masking_policy_name", "Default") # type: str
api_version = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) # type: Literal["2014-04-01"]
data_masking_policy_name = kwargs.pop("data_masking_policy_name", "Default") # type: Literal["Default"]
content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str]
cls = kwargs.pop("cls", None) # type: ClsType[_models.DataMaskingPolicy]

Expand Down Expand Up @@ -246,8 +251,8 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) # type: str
data_masking_policy_name = kwargs.pop("data_masking_policy_name", "Default") # type: str
api_version = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) # type: Literal["2014-04-01"]
data_masking_policy_name = kwargs.pop("data_masking_policy_name", "Default") # type: Literal["Default"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.DataMaskingPolicy]

request = build_get_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# 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

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand All @@ -29,6 +30,10 @@
from ..._vendor import _convert_request
from ...operations._data_masking_rules_operations import build_create_or_update_request, build_list_by_database_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]]

Expand Down Expand Up @@ -177,8 +182,8 @@ async def create_or_update(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) # type: str
data_masking_policy_name = kwargs.pop("data_masking_policy_name", "Default") # type: str
api_version = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) # type: Literal["2014-04-01"]
data_masking_policy_name = kwargs.pop("data_masking_policy_name", "Default") # type: Literal["Default"]
content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str]
cls = kwargs.pop("cls", None) # type: ClsType[_models.DataMaskingRule]

Expand Down Expand Up @@ -256,8 +261,8 @@ def list_by_database(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) # type: str
data_masking_policy_name = kwargs.pop("data_masking_policy_name", "Default") # type: str
api_version = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) # type: Literal["2014-04-01"]
data_masking_policy_name = kwargs.pop("data_masking_policy_name", "Default") # type: Literal["Default"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.DataMaskingRuleListResult]

error_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# 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, Union

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand All @@ -29,6 +30,10 @@
from ..._vendor import _convert_request
from ...operations._data_warehouse_user_activities_operations import build_get_request, build_list_by_database_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]]

Expand Down Expand Up @@ -58,7 +63,7 @@ async def get(
resource_group_name: str,
server_name: str,
database_name: str,
data_warehouse_user_activity_name: Union[str, "_models.DataWarehouseUserActivityName"],
data_warehouse_user_activity_name: Union[str, _models.DataWarehouseUserActivityName],
**kwargs: Any
) -> _models.DataWarehouseUserActivities:
"""Gets the user activities of a data warehouse which includes running and suspended queries.
Expand Down Expand Up @@ -90,7 +95,9 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview")) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", "2020-11-01-preview")
) # type: Literal["2020-11-01-preview"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.DataWarehouseUserActivities]

request = build_get_request(
Expand Down Expand Up @@ -149,7 +156,9 @@ def list_by_database(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview")) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", "2020-11-01-preview")
) # type: Literal["2020-11-01-preview"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.DataWarehouseUserActivitiesListResult]

error_map = {
Expand Down
Loading

0 comments on commit 7a0dd11

Please sign in to comment.