Skip to content

Commit

Permalink
CodeGen from PR 23802 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Release sql microsoft.sql 2022 11 01 preview (Azure#23802)

* Adds base for updating Microsoft.Sql from version preview/2022-08-01-preview to version 2022-11-01-preview

* Updates readme

* Updates API version in new specs and examples

* Add Swagger API changes required for progress-reporting related changes in DatabaseOperations (Azure#22669)

* Update swagger (Azure#22715)

* Follow-up Swagger API changes required for progress-reporting related changes in DatabaseOperations  (Azure#22775)

* Add Swagger API changes required for progress-reporting related changes in DatabaseOperations

* Follow up changes required for progress-reporting related changes in DatabaseOperations

* updated example file

* Added Failed case in list-operations examples

* Update Microsoft.Sql ManagedInstance 2022-11-01-preview Swagger Docs (Azure#22899)

* Update Microsoft.sql ManagedInstance 2022-11-01-preview Swagger Docs

* Address Swagger Validation Errors

* Modify custom-words.txt

* Manually updating arm-id format to match stable 2021-11-01 version

* Adding provisioning state changes

* fixing validation

* adding missing space

* Remove HTTP 200 from Start/Stop Actions as we only return HTTP 202

---------

Co-authored-by: Jovana Toroman <jtoroman@microsoft.com>

* Update DateTime to ISO-8601 format in example file (Azure#22986)

* Add Swagger API changes required for progress-reporting related changes in DatabaseOperations

* Follow up changes required for progress-reporting related changes in DatabaseOperations

* updated example file

* Added Failed case in list-operations examples

* Update DateTime to ISo-8601 format in example file

* Enable TryPlannedBeforeForcedFailover for SQL DB Failover Group (Azure#22673)

* Enable TryPlannedBeforeForcedFailover for SQL DB Failover Group

* Modify example file

* Add example

* Fix ModelValidation issues

* Fix ModelValidation issues

* Add new controller

* Modify example

* Modify example

* Update server name

* Fix LintDiff

* Fix model validation errors

* Fix PostOperationAsyncResponseValidation, Unfix LroLocationHeader,ResourceNameRestriction

* Fix PostOperationAsyncResponseValidation

* Fix pending items

* Update doc

* Remove empty/unschematized object

---------

Co-authored-by: subhrob <subhrob@microsoft.com>

* [DO NOT MERGE] Add Archive option to LTR Policy for SQL DB (Azure#22697)

* add archival changes to LTRPolicy

* fix LongTermRetentionPolicies swagger file

* fix check failures

* redo swagger

* Update swagger documentation for Managed Instance start-stop actions (Azure#22992)

* Add NetworkSecurityPerimeterConfigurations Swagger (Azure#22960)

* Add NetworkSecurityPerimeterConfigurations Swagger

* Fixes round 1

* Fixes round 2

* Fixes Round 3

* Fixes Round 4

* Fix Round 5

* fixing enum (Azure#22995)

Co-authored-by: Jovana Toroman <jtoroman@microsoft.com>

* add changes (Azure#23120)

* Carry all minor changes to dev sql microsoft.sql 2022 11 01 preview (Azure#23337)

* Revert "add changes (Azure#23120)"

This reverts commit 5c348d22f8fb6c29b7322e28ea78d665586f4135.

Revert "[DO NOT MERGE] Add Archive option to LTR Policy for SQL DB (Azure#22697)"

This reverts commit 559f7f474d944a92f6cb108eb433a05f3c53cd8e.

* Carrying minor changes to release branch for Microsoft.Sql 2022-11-01-preview

* Reverting DatabaseAdvisors

* Further reverting problematic files

* Reverting a few example files

* Adding back arm-id to a few files

* Reverting error message change in ManagedDatabaseRestoreDetails.json, Jobs.json,ServerDevOpsAudit.json, and TransparentDataEncryptions.json

* Minor fixes for Turkey name change and missing x-ms-identifier (Azure#23637)

* Fixing issues with a few breaking changes (Azure#23943)

* Minor fixes for Turkey name change and missing x-ms-identifier

* Adding back missing arm-id and other missing property issues causing breaking changes incorrectly.

* Fixing prettier issue with ManagedDatabases.json

* Fixing arm-id format in 4 examples

* Adding missing location for 202 responses on sync examples

---------

Co-authored-by: Ji Wang <wangjiprc@gmail.com>
Co-authored-by: Mohit Agarwal <mohitagarwal@microsoft.com>
Co-authored-by: GalGoldi72 <124780962+GalGoldi72@users.noreply.github.com>
Co-authored-by: ilijadivljan-ms <122982104+ilijadivljan-ms@users.noreply.github.com>
Co-authored-by: Jovana Toroman <jtoroman@microsoft.com>
Co-authored-by: subhrob <subhro.bhattacharya@gmail.com>
Co-authored-by: subhrob <subhrob@microsoft.com>
Co-authored-by: CelinaJiangJXY <124339390+CelinaJiangJXY@users.noreply.github.com>
Co-authored-by: beoberha <51964155+beoberha@users.noreply.github.com>
Co-authored-by: toki95 <35834415+toki95@users.noreply.github.com>
  • Loading branch information
11 people committed May 19, 2023
1 parent 68800ac commit d45d365
Show file tree
Hide file tree
Showing 964 changed files with 26,584 additions and 28,647 deletions.
6 changes: 3 additions & 3 deletions sdk/sql/azure-mgmt-sql/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "f66499b77cd90144ceb0d118c1bd8bda7dbd4cfc",
"commit": "d0d161eb19d5efd1c3d23d47a5491a53f41cbd7c",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.4.3",
"@autorest/python@6.4.12",
"@autorest/modelerfour@4.24.3"
],
"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/python@6.4.3 --use=@autorest/modelerfour@4.24.3 --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=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.4.12 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/sql/resource-manager/readme.md"
}
6 changes: 6 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,23 @@ class SqlManagementClientConfiguration(Configuration): # pylint: disable=too-ma
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The subscription ID that identifies an Azure subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-11-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:
super(SqlManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2022-11-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.subscription_id = subscription_id
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-sql/{}".format(VERSION))
self._configure(**kwargs)
Expand Down
6 changes: 3 additions & 3 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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


Expand All @@ -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):
Expand Down
701 changes: 343 additions & 358 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py

Large diffs are not rendered by default.

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.0b10"
VERSION = "0.9.0"
6 changes: 6 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,23 @@ class SqlManagementClientConfiguration(Configuration): # pylint: disable=too-ma
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The subscription ID that identifies an Azure subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(SqlManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2022-11-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")

self.credential = credential
self.subscription_id = subscription_id
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-sql/{}".format(VERSION))
self._configure(**kwargs)
Expand Down
Loading

0 comments on commit d45d365

Please sign in to comment.