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

[AutoPR track2_azure-mgmt-cosmosdb] [Hub Generated] Review request for Microsoft.DocumentDB to add version stable/2023-04-15 #3287

Closed
wants to merge 1 commit into from
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions sdk/cosmos/azure-mgmt-cosmosdb/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "1e7b408f3323e7f5424745718fe62c7a043a2337",
"commit": "57710510492118cab6949250ce893948ec0e3422",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.4.0",
"@autorest/python@6.4.8",
"@autorest/modelerfour@4.24.3"
],
"autorest_command": "autorest specification/cosmos-db/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.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/cosmos-db/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/cosmos-db/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -35,14 +29,14 @@ class CosmosDBManagementClientConfiguration(Configuration): # pylint: disable=t
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-11-15-preview". Note that overriding
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-04-15". 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(CosmosDBManagementClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2022-11-15-preview"] = kwargs.pop("api_version", "2022-11-15-preview")
api_version: str = kwargs.pop("api_version", "2023-04-15")

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 @@ -23,11 +23,9 @@
CollectionPartitionOperations,
CollectionPartitionRegionOperations,
CollectionRegionOperations,
DataTransferJobsOperations,
DatabaseAccountRegionOperations,
DatabaseAccountsOperations,
DatabaseOperations,
GraphResourcesOperations,
GremlinResourcesOperations,
LocationsOperations,
MongoDBResourcesOperations,
Expand Down Expand Up @@ -95,8 +93,6 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
:ivar partition_key_range_id_region: PartitionKeyRangeIdRegionOperations operations
:vartype partition_key_range_id_region:
azure.mgmt.cosmosdb.operations.PartitionKeyRangeIdRegionOperations
:ivar graph_resources: GraphResourcesOperations operations
:vartype graph_resources: azure.mgmt.cosmosdb.operations.GraphResourcesOperations
:ivar sql_resources: SqlResourcesOperations operations
:vartype sql_resources: azure.mgmt.cosmosdb.operations.SqlResourcesOperations
:ivar mongo_db_resources: MongoDBResourcesOperations operations
Expand All @@ -109,8 +105,6 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
:vartype gremlin_resources: azure.mgmt.cosmosdb.operations.GremlinResourcesOperations
:ivar locations: LocationsOperations operations
:vartype locations: azure.mgmt.cosmosdb.operations.LocationsOperations
:ivar data_transfer_jobs: DataTransferJobsOperations operations
:vartype data_transfer_jobs: azure.mgmt.cosmosdb.operations.DataTransferJobsOperations
:ivar cassandra_clusters: CassandraClustersOperations operations
:vartype cassandra_clusters: azure.mgmt.cosmosdb.operations.CassandraClustersOperations
:ivar cassandra_data_centers: CassandraDataCentersOperations operations
Expand Down Expand Up @@ -165,8 +159,8 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
: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 "2022-11-15-preview". Note that overriding
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-04-15". 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
Retry-After header is present.
Expand All @@ -182,7 +176,7 @@ def __init__(
self._config = CosmosDBManagementClientConfiguration(
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)
Expand Down Expand Up @@ -219,7 +213,6 @@ def __init__(
self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.graph_resources = GraphResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
self.sql_resources = SqlResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
self.mongo_db_resources = MongoDBResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
Expand All @@ -232,9 +225,6 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize)
self.data_transfer_jobs = DataTransferJobsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.cassandra_clusters = CassandraClustersOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down
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
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 = "9.1.0b1"
VERSION = "0.7.0"
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -35,14 +29,14 @@ class CosmosDBManagementClientConfiguration(Configuration): # pylint: disable=t
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-11-15-preview". Note that overriding
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-04-15". 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(CosmosDBManagementClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2022-11-15-preview"] = kwargs.pop("api_version", "2022-11-15-preview")
api_version: str = kwargs.pop("api_version", "2023-04-15")

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 @@ -23,11 +23,9 @@
CollectionPartitionOperations,
CollectionPartitionRegionOperations,
CollectionRegionOperations,
DataTransferJobsOperations,
DatabaseAccountRegionOperations,
DatabaseAccountsOperations,
DatabaseOperations,
GraphResourcesOperations,
GremlinResourcesOperations,
LocationsOperations,
MongoDBResourcesOperations,
Expand Down Expand Up @@ -96,8 +94,6 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
:ivar partition_key_range_id_region: PartitionKeyRangeIdRegionOperations operations
:vartype partition_key_range_id_region:
azure.mgmt.cosmosdb.aio.operations.PartitionKeyRangeIdRegionOperations
:ivar graph_resources: GraphResourcesOperations operations
:vartype graph_resources: azure.mgmt.cosmosdb.aio.operations.GraphResourcesOperations
:ivar sql_resources: SqlResourcesOperations operations
:vartype sql_resources: azure.mgmt.cosmosdb.aio.operations.SqlResourcesOperations
:ivar mongo_db_resources: MongoDBResourcesOperations operations
Expand All @@ -110,8 +106,6 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
:vartype gremlin_resources: azure.mgmt.cosmosdb.aio.operations.GremlinResourcesOperations
:ivar locations: LocationsOperations operations
:vartype locations: azure.mgmt.cosmosdb.aio.operations.LocationsOperations
:ivar data_transfer_jobs: DataTransferJobsOperations operations
:vartype data_transfer_jobs: azure.mgmt.cosmosdb.aio.operations.DataTransferJobsOperations
:ivar cassandra_clusters: CassandraClustersOperations operations
:vartype cassandra_clusters: azure.mgmt.cosmosdb.aio.operations.CassandraClustersOperations
:ivar cassandra_data_centers: CassandraDataCentersOperations operations
Expand Down Expand Up @@ -168,8 +162,8 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
: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 "2022-11-15-preview". Note that overriding
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-04-15". 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
Retry-After header is present.
Expand All @@ -185,7 +179,7 @@ def __init__(
self._config = CosmosDBManagementClientConfiguration(
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)
Expand Down Expand Up @@ -222,7 +216,6 @@ def __init__(
self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.graph_resources = GraphResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
self.sql_resources = SqlResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
self.mongo_db_resources = MongoDBResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
Expand All @@ -235,9 +228,6 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize)
self.data_transfer_jobs = DataTransferJobsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.cassandra_clusters = CassandraClustersOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@
from ._collection_partition_operations import CollectionPartitionOperations
from ._partition_key_range_id_operations import PartitionKeyRangeIdOperations
from ._partition_key_range_id_region_operations import PartitionKeyRangeIdRegionOperations
from ._graph_resources_operations import GraphResourcesOperations
from ._sql_resources_operations import SqlResourcesOperations
from ._mongo_db_resources_operations import MongoDBResourcesOperations
from ._table_resources_operations import TableResourcesOperations
from ._cassandra_resources_operations import CassandraResourcesOperations
from ._gremlin_resources_operations import GremlinResourcesOperations
from ._locations_operations import LocationsOperations
from ._data_transfer_jobs_operations import DataTransferJobsOperations
from ._cassandra_clusters_operations import CassandraClustersOperations
from ._cassandra_data_centers_operations import CassandraDataCentersOperations
from ._notebook_workspaces_operations import NotebookWorkspacesOperations
Expand Down Expand Up @@ -64,14 +62,12 @@
"CollectionPartitionOperations",
"PartitionKeyRangeIdOperations",
"PartitionKeyRangeIdRegionOperations",
"GraphResourcesOperations",
"SqlResourcesOperations",
"MongoDBResourcesOperations",
"TableResourcesOperations",
"CassandraResourcesOperations",
"GremlinResourcesOperations",
"LocationsOperations",
"DataTransferJobsOperations",
"CassandraClustersOperations",
"CassandraDataCentersOperations",
"NotebookWorkspacesOperations",
Expand Down
Loading