зеркало из
1
0
Форкнуть 0
Co-authored-by: azure-sdk <PythonSdkPipelines>
This commit is contained in:
Azure SDK Bot 2023-09-18 19:24:27 -07:00 коммит произвёл GitHub
Родитель bf37fcc218
Коммит 6e48896c84
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
247 изменённых файлов: 6532 добавлений и 4418 удалений

Просмотреть файл

@ -1,5 +1,16 @@
# Release History
## 3.1.0 (2023-09-15)
### Features Added
- Model FluxConfiguration has a new parameter reconciliation_wait_duration
- Model FluxConfiguration has a new parameter wait_for_reconciliation
- Model KustomizationDefinition has a new parameter post_build
- Model KustomizationDefinition has a new parameter wait
- Model KustomizationPatchDefinition has a new parameter post_build
- Model KustomizationPatchDefinition has a new parameter wait
## 3.0.0 (2023-05-22)
### Features Added

Просмотреть файл

@ -1,11 +1,25 @@
{
"commit": "817e7cea0b7e3194868825cbef6d4e62a7895951",
"commit": "1e8766756bb5c13fa573b0a33ab7d9438837c380",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"autorest": "3.9.7",
"use": [
"@autorest/python@6.4.8",
"@autorest/modelerfour@4.24.3"
"@autorest/python@6.7.1",
"@autorest/modelerfour@4.26.2"
],
"autorest_command": "autorest specification/kubernetesconfiguration/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.8 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/kubernetesconfiguration/resource-manager/readme.md"
"autorest_command": "autorest specification/kubernetesconfiguration/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.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"readme": "specification/kubernetesconfiguration/resource-manager/readme.md",
"package-2023-05": "2023-05-16 19:49:17 -0700 433f115ecea40137ec80dfc0217582ccc52bbd37 Microsoft.KubernetesConfiguration/stable/2023-05-01/operations.json",
"package-2022-11": "2022-11-11 23:31:05 -0800 d11245bcaa06b6d87db179c903ba4b049adf1bf2 Microsoft.KubernetesConfiguration/stable/2022-11-01/operations.json",
"package-2022-07": "2022-06-14 21:21:11 -0700 6dc6ded9bad45a876f4a6e96df2d4f4eb5c26b12 Microsoft.KubernetesConfiguration/stable/2022-07-01/operations.json",
"package-preview-2022-04-only": "2022-05-12 16:04:51 -0700 2d129e6389e703e292b43ac839a58743d09f67b0 Microsoft.KubernetesConfiguration/preview/2022-04-02-preview/extensions.json",
"package-2022-03": "2022-05-11 19:27:47 -0700 62dc7865a18791290f282ed54bcb1d4b1517af16 Microsoft.KubernetesConfiguration/stable/2022-03-01/fluxconfiguration.json",
"package-preview-2022-01-15-only": "2022-04-07 17:29:17 -0700 18a8f9df1c94fdbdac9492099013bb6656d3c95a Microsoft.KubernetesConfiguration/preview/2022-01-15-preview/extensionTypes.json",
"package-preview-2022-01": "2022-04-07 17:29:17 -0700 18a8f9df1c94fdbdac9492099013bb6656d3c95a Microsoft.KubernetesConfiguration/preview/2022-01-15-preview/extensionTypes.json",
"package-preview-2021-11": "2021-10-12 22:14:26 -0700 a689412492a6fb320d737ebab405a0728a20c7d2 Microsoft.KubernetesConfiguration/preview/2021-11-01-preview/operations.json",
"package-2021-09": "2021-09-17 19:54:40 -0700 fa0a95854a551be7fdb04367e2e7b6500ab2e341 Microsoft.KubernetesConfiguration/stable/2021-09-01/extensions.json",
"package-preview-2021-05": "2021-05-18 22:08:36 -0700 4c386840e640f23e0a37a0c5d846b279bddbeb87 Microsoft.KubernetesConfiguration/preview/2021-05-01-preview/kubernetesconfiguration.json",
"package-2021-03": "2021-05-18 22:08:36 -0700 4c386840e640f23e0a37a0c5d846b279bddbeb87 Microsoft.KubernetesConfiguration/stable/2021-03-01/kubernetesconfiguration.json",
"package-preview-2020-10": "2021-01-18 17:57:05 -0800 3e3a9ce769a182a238fca1d68e5c6f3c4f8776a2 Microsoft.KubernetesConfiguration/preview/2020-10-01-preview/kubernetesconfiguration.json",
"package-2020-07-01-preview": "2021-02-28 19:57:07 -0800 dc55d8cee70349bcd0b6782598bcffb86068d49e Microsoft.KubernetesConfiguration/preview/2020-07-01-preview/kubernetesconfiguration.json",
"package-2019-11-01-preview": "2020-05-04 11:38:46 -0700 9cac27e3d0c71d159286ff598227bf997858d0cd Microsoft.KubernetesConfiguration/preview/2019-11-01-preview/kubernetesconfiguration.json"
}

Просмотреть файл

@ -664,8 +664,9 @@ class Serializer(object):
_serialized.update(_new_attr) # type: ignore
_new_attr = _new_attr[k] # type: ignore
_serialized = _serialized[k]
except ValueError:
continue
except ValueError as err:
if isinstance(err, SerializationError):
raise
except (AttributeError, KeyError, TypeError) as err:
msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj))
@ -743,6 +744,8 @@ class Serializer(object):
:param data: The data to be serialized.
:param str data_type: The type to be serialized from.
:keyword bool skip_quote: Whether to skip quote the serialized result.
Defaults to False.
:rtype: str
:raises: TypeError if serialization fails.
:raises: ValueError if data is None
@ -751,10 +754,8 @@ class Serializer(object):
# Treat the list aside, since we don't want to encode the div separator
if data_type.startswith("["):
internal_data_type = data_type[1:-1]
data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data]
if not kwargs.get("skip_quote", False):
data = [quote(str(d), safe="") for d in data]
return str(self.serialize_iter(data, internal_data_type, **kwargs))
do_quote = not kwargs.get('skip_quote', False)
return str(self.serialize_iter(data, internal_data_type, do_quote=do_quote, **kwargs))
# Not a list, regular serialization
output = self.serialize_data(data, data_type, **kwargs)
@ -893,6 +894,8 @@ class Serializer(object):
not be None or empty.
:param str div: If set, this str will be used to combine the elements
in the iterable into a combined string. Default is 'None'.
:keyword bool do_quote: Whether to quote the serialized result of each iterable element.
Defaults to False.
:rtype: list, str
"""
if isinstance(data, str):
@ -905,9 +908,18 @@ class Serializer(object):
for d in data:
try:
serialized.append(self.serialize_data(d, iter_type, **kwargs))
except ValueError:
except ValueError as err:
if isinstance(err, SerializationError):
raise
serialized.append(None)
if kwargs.get('do_quote', False):
serialized = [
'' if s is None else quote(str(s), safe='')
for s
in serialized
]
if div:
serialized = ["" if s is None else str(s) for s in serialized]
serialized = div.join(serialized)
@ -952,7 +964,9 @@ class Serializer(object):
for key, value in attr.items():
try:
serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs)
except ValueError:
except ValueError as err:
if isinstance(err, SerializationError):
raise
serialized[self.serialize_unicode(key)] = None
if "xml" in serialization_ctxt:

Просмотреть файл

@ -53,7 +53,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""
DEFAULT_API_VERSION = '2022-11-01'
DEFAULT_API_VERSION = '2023-05-01'
_PROFILE_TAG = "azure.mgmt.kubernetesconfiguration.SourceControlConfigurationClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
@ -78,6 +78,8 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
profile: KnownProfiles=KnownProfiles.default,
**kwargs: Any
):
if api_version:
kwargs.setdefault('api_version', api_version)
self._config = SourceControlConfigurationClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(SourceControlConfigurationClient, self).__init__(
@ -105,6 +107,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
* 2022-04-02-preview: :mod:`v2022_04_02_preview.models<azure.mgmt.kubernetesconfiguration.v2022_04_02_preview.models>`
* 2022-07-01: :mod:`v2022_07_01.models<azure.mgmt.kubernetesconfiguration.v2022_07_01.models>`
* 2022-11-01: :mod:`v2022_11_01.models<azure.mgmt.kubernetesconfiguration.v2022_11_01.models>`
* 2023-05-01: :mod:`v2023_05_01.models<azure.mgmt.kubernetesconfiguration.v2023_05_01.models>`
"""
if api_version == '2020-07-01-preview':
from .v2020_07_01_preview import models
@ -142,6 +145,9 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
elif api_version == '2022-11-01':
from .v2022_11_01 import models
return models
elif api_version == '2023-05-01':
from .v2023_05_01 import models
return models
raise ValueError("API version {} is not available".format(api_version))
@property
@ -165,7 +171,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
else:
raise ValueError("API version {} does not have operation group 'cluster_extension_type'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def cluster_extension_types(self):
@ -188,7 +194,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
else:
raise ValueError("API version {} does not have operation group 'cluster_extension_types'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def extension_type_versions(self):
@ -211,7 +217,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
else:
raise ValueError("API version {} does not have operation group 'extension_type_versions'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def extensions(self):
@ -222,11 +228,11 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
* 2021-09-01: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2021_09_01.operations.ExtensionsOperations>`
* 2021-11-01-preview: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2021_11_01_preview.operations.ExtensionsOperations>`
* 2022-01-01-preview: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2022_01_01_preview.operations.ExtensionsOperations>`
* 2022-01-15-preview: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2022_01_15_preview.operations.ExtensionsOperations>`
* 2022-03-01: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2022_03_01.operations.ExtensionsOperations>`
* 2022-04-02-preview: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2022_04_02_preview.operations.ExtensionsOperations>`
* 2022-07-01: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2022_07_01.operations.ExtensionsOperations>`
* 2022-11-01: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2022_11_01.operations.ExtensionsOperations>`
* 2023-05-01: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2023_05_01.operations.ExtensionsOperations>`
"""
api_version = self._get_api_version('extensions')
if api_version == '2020-07-01-preview':
@ -239,8 +245,6 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
from .v2021_11_01_preview.operations import ExtensionsOperations as OperationClass
elif api_version == '2022-01-01-preview':
from .v2022_01_01_preview.operations import ExtensionsOperations as OperationClass
elif api_version == '2022-01-15-preview':
from .v2022_01_15_preview.operations import ExtensionsOperations as OperationClass
elif api_version == '2022-03-01':
from .v2022_03_01.operations import ExtensionsOperations as OperationClass
elif api_version == '2022-04-02-preview':
@ -249,10 +253,12 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
from .v2022_07_01.operations import ExtensionsOperations as OperationClass
elif api_version == '2022-11-01':
from .v2022_11_01.operations import ExtensionsOperations as OperationClass
elif api_version == '2023-05-01':
from .v2023_05_01.operations import ExtensionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'extensions'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def flux_config_operation_status(self):
@ -260,28 +266,28 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
* 2021-11-01-preview: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2021_11_01_preview.operations.FluxConfigOperationStatusOperations>`
* 2022-01-01-preview: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_01_01_preview.operations.FluxConfigOperationStatusOperations>`
* 2022-01-15-preview: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_01_15_preview.operations.FluxConfigOperationStatusOperations>`
* 2022-03-01: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_03_01.operations.FluxConfigOperationStatusOperations>`
* 2022-07-01: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_07_01.operations.FluxConfigOperationStatusOperations>`
* 2022-11-01: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_11_01.operations.FluxConfigOperationStatusOperations>`
* 2023-05-01: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2023_05_01.operations.FluxConfigOperationStatusOperations>`
"""
api_version = self._get_api_version('flux_config_operation_status')
if api_version == '2021-11-01-preview':
from .v2021_11_01_preview.operations import FluxConfigOperationStatusOperations as OperationClass
elif api_version == '2022-01-01-preview':
from .v2022_01_01_preview.operations import FluxConfigOperationStatusOperations as OperationClass
elif api_version == '2022-01-15-preview':
from .v2022_01_15_preview.operations import FluxConfigOperationStatusOperations as OperationClass
elif api_version == '2022-03-01':
from .v2022_03_01.operations import FluxConfigOperationStatusOperations as OperationClass
elif api_version == '2022-07-01':
from .v2022_07_01.operations import FluxConfigOperationStatusOperations as OperationClass
elif api_version == '2022-11-01':
from .v2022_11_01.operations import FluxConfigOperationStatusOperations as OperationClass
elif api_version == '2023-05-01':
from .v2023_05_01.operations import FluxConfigOperationStatusOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'flux_config_operation_status'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def flux_configurations(self):
@ -289,28 +295,28 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
* 2021-11-01-preview: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2021_11_01_preview.operations.FluxConfigurationsOperations>`
* 2022-01-01-preview: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_01_01_preview.operations.FluxConfigurationsOperations>`
* 2022-01-15-preview: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_01_15_preview.operations.FluxConfigurationsOperations>`
* 2022-03-01: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_03_01.operations.FluxConfigurationsOperations>`
* 2022-07-01: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_07_01.operations.FluxConfigurationsOperations>`
* 2022-11-01: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_11_01.operations.FluxConfigurationsOperations>`
* 2023-05-01: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2023_05_01.operations.FluxConfigurationsOperations>`
"""
api_version = self._get_api_version('flux_configurations')
if api_version == '2021-11-01-preview':
from .v2021_11_01_preview.operations import FluxConfigurationsOperations as OperationClass
elif api_version == '2022-01-01-preview':
from .v2022_01_01_preview.operations import FluxConfigurationsOperations as OperationClass
elif api_version == '2022-01-15-preview':
from .v2022_01_15_preview.operations import FluxConfigurationsOperations as OperationClass
elif api_version == '2022-03-01':
from .v2022_03_01.operations import FluxConfigurationsOperations as OperationClass
elif api_version == '2022-07-01':
from .v2022_07_01.operations import FluxConfigurationsOperations as OperationClass
elif api_version == '2022-11-01':
from .v2022_11_01.operations import FluxConfigurationsOperations as OperationClass
elif api_version == '2023-05-01':
from .v2023_05_01.operations import FluxConfigurationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'flux_configurations'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def location_extension_types(self):
@ -333,7 +339,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
else:
raise ValueError("API version {} does not have operation group 'location_extension_types'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def operation_status(self):
@ -343,11 +349,11 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
* 2021-09-01: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2021_09_01.operations.OperationStatusOperations>`
* 2021-11-01-preview: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2021_11_01_preview.operations.OperationStatusOperations>`
* 2022-01-01-preview: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_01_01_preview.operations.OperationStatusOperations>`
* 2022-01-15-preview: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_01_15_preview.operations.OperationStatusOperations>`
* 2022-03-01: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_03_01.operations.OperationStatusOperations>`
* 2022-04-02-preview: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_04_02_preview.operations.OperationStatusOperations>`
* 2022-07-01: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_07_01.operations.OperationStatusOperations>`
* 2022-11-01: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_11_01.operations.OperationStatusOperations>`
* 2023-05-01: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2023_05_01.operations.OperationStatusOperations>`
"""
api_version = self._get_api_version('operation_status')
if api_version == '2021-05-01-preview':
@ -358,8 +364,6 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
from .v2021_11_01_preview.operations import OperationStatusOperations as OperationClass
elif api_version == '2022-01-01-preview':
from .v2022_01_01_preview.operations import OperationStatusOperations as OperationClass
elif api_version == '2022-01-15-preview':
from .v2022_01_15_preview.operations import OperationStatusOperations as OperationClass
elif api_version == '2022-03-01':
from .v2022_03_01.operations import OperationStatusOperations as OperationClass
elif api_version == '2022-04-02-preview':
@ -368,10 +372,12 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
from .v2022_07_01.operations import OperationStatusOperations as OperationClass
elif api_version == '2022-11-01':
from .v2022_11_01.operations import OperationStatusOperations as OperationClass
elif api_version == '2023-05-01':
from .v2023_05_01.operations import OperationStatusOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operation_status'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def operations(self):
@ -384,10 +390,10 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
* 2021-09-01: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2021_09_01.operations.Operations>`
* 2021-11-01-preview: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2021_11_01_preview.operations.Operations>`
* 2022-01-01-preview: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2022_01_01_preview.operations.Operations>`
* 2022-01-15-preview: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2022_01_15_preview.operations.Operations>`
* 2022-03-01: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2022_03_01.operations.Operations>`
* 2022-07-01: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2022_07_01.operations.Operations>`
* 2022-11-01: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2022_11_01.operations.Operations>`
* 2023-05-01: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2023_05_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2020-07-01-preview':
@ -404,18 +410,18 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
from .v2021_11_01_preview.operations import Operations as OperationClass
elif api_version == '2022-01-01-preview':
from .v2022_01_01_preview.operations import Operations as OperationClass
elif api_version == '2022-01-15-preview':
from .v2022_01_15_preview.operations import Operations as OperationClass
elif api_version == '2022-03-01':
from .v2022_03_01.operations import Operations as OperationClass
elif api_version == '2022-07-01':
from .v2022_07_01.operations import Operations as OperationClass
elif api_version == '2022-11-01':
from .v2022_11_01.operations import Operations as OperationClass
elif api_version == '2023-05-01':
from .v2023_05_01.operations import Operations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def private_endpoint_connections(self):
@ -429,7 +435,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
else:
raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def private_link_resources(self):
@ -443,7 +449,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
else:
raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def private_link_scopes(self):
@ -457,7 +463,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
else:
raise ValueError("API version {} does not have operation group 'private_link_scopes'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def source_control_configurations(self):
@ -469,10 +475,10 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
* 2021-05-01-preview: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2021_05_01_preview.operations.SourceControlConfigurationsOperations>`
* 2021-11-01-preview: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2021_11_01_preview.operations.SourceControlConfigurationsOperations>`
* 2022-01-01-preview: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_01_01_preview.operations.SourceControlConfigurationsOperations>`
* 2022-01-15-preview: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_01_15_preview.operations.SourceControlConfigurationsOperations>`
* 2022-03-01: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_03_01.operations.SourceControlConfigurationsOperations>`
* 2022-07-01: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_07_01.operations.SourceControlConfigurationsOperations>`
* 2022-11-01: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_11_01.operations.SourceControlConfigurationsOperations>`
* 2023-05-01: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2023_05_01.operations.SourceControlConfigurationsOperations>`
"""
api_version = self._get_api_version('source_control_configurations')
if api_version == '2020-07-01-preview':
@ -487,18 +493,18 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
from .v2021_11_01_preview.operations import SourceControlConfigurationsOperations as OperationClass
elif api_version == '2022-01-01-preview':
from .v2022_01_01_preview.operations import SourceControlConfigurationsOperations as OperationClass
elif api_version == '2022-01-15-preview':
from .v2022_01_15_preview.operations import SourceControlConfigurationsOperations as OperationClass
elif api_version == '2022-03-01':
from .v2022_03_01.operations import SourceControlConfigurationsOperations as OperationClass
elif api_version == '2022-07-01':
from .v2022_07_01.operations import SourceControlConfigurationsOperations as OperationClass
elif api_version == '2022-11-01':
from .v2022_11_01.operations import SourceControlConfigurationsOperations as OperationClass
elif api_version == '2023-05-01':
from .v2023_05_01.operations import SourceControlConfigurationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'source_control_configurations'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
def close(self):
self._client.close()

Просмотреть файл

@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------
VERSION = "3.0.0"
VERSION = "3.1.0"

Просмотреть файл

@ -53,7 +53,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""
DEFAULT_API_VERSION = '2022-11-01'
DEFAULT_API_VERSION = '2023-05-01'
_PROFILE_TAG = "azure.mgmt.kubernetesconfiguration.SourceControlConfigurationClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
@ -78,6 +78,8 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
profile: KnownProfiles = KnownProfiles.default,
**kwargs: Any
) -> None:
if api_version:
kwargs.setdefault('api_version', api_version)
self._config = SourceControlConfigurationClientConfiguration(credential, subscription_id, **kwargs)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(SourceControlConfigurationClient, self).__init__(
@ -105,6 +107,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
* 2022-04-02-preview: :mod:`v2022_04_02_preview.models<azure.mgmt.kubernetesconfiguration.v2022_04_02_preview.models>`
* 2022-07-01: :mod:`v2022_07_01.models<azure.mgmt.kubernetesconfiguration.v2022_07_01.models>`
* 2022-11-01: :mod:`v2022_11_01.models<azure.mgmt.kubernetesconfiguration.v2022_11_01.models>`
* 2023-05-01: :mod:`v2023_05_01.models<azure.mgmt.kubernetesconfiguration.v2023_05_01.models>`
"""
if api_version == '2020-07-01-preview':
from ..v2020_07_01_preview import models
@ -142,6 +145,9 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
elif api_version == '2022-11-01':
from ..v2022_11_01 import models
return models
elif api_version == '2023-05-01':
from ..v2023_05_01 import models
return models
raise ValueError("API version {} is not available".format(api_version))
@property
@ -165,7 +171,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
else:
raise ValueError("API version {} does not have operation group 'cluster_extension_type'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def cluster_extension_types(self):
@ -188,7 +194,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
else:
raise ValueError("API version {} does not have operation group 'cluster_extension_types'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def extension_type_versions(self):
@ -211,7 +217,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
else:
raise ValueError("API version {} does not have operation group 'extension_type_versions'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def extensions(self):
@ -222,11 +228,11 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
* 2021-09-01: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2021_09_01.aio.operations.ExtensionsOperations>`
* 2021-11-01-preview: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2021_11_01_preview.aio.operations.ExtensionsOperations>`
* 2022-01-01-preview: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2022_01_01_preview.aio.operations.ExtensionsOperations>`
* 2022-01-15-preview: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2022_01_15_preview.aio.operations.ExtensionsOperations>`
* 2022-03-01: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2022_03_01.aio.operations.ExtensionsOperations>`
* 2022-04-02-preview: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2022_04_02_preview.aio.operations.ExtensionsOperations>`
* 2022-07-01: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2022_07_01.aio.operations.ExtensionsOperations>`
* 2022-11-01: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2022_11_01.aio.operations.ExtensionsOperations>`
* 2023-05-01: :class:`ExtensionsOperations<azure.mgmt.kubernetesconfiguration.v2023_05_01.aio.operations.ExtensionsOperations>`
"""
api_version = self._get_api_version('extensions')
if api_version == '2020-07-01-preview':
@ -239,8 +245,6 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
from ..v2021_11_01_preview.aio.operations import ExtensionsOperations as OperationClass
elif api_version == '2022-01-01-preview':
from ..v2022_01_01_preview.aio.operations import ExtensionsOperations as OperationClass
elif api_version == '2022-01-15-preview':
from ..v2022_01_15_preview.aio.operations import ExtensionsOperations as OperationClass
elif api_version == '2022-03-01':
from ..v2022_03_01.aio.operations import ExtensionsOperations as OperationClass
elif api_version == '2022-04-02-preview':
@ -249,10 +253,12 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
from ..v2022_07_01.aio.operations import ExtensionsOperations as OperationClass
elif api_version == '2022-11-01':
from ..v2022_11_01.aio.operations import ExtensionsOperations as OperationClass
elif api_version == '2023-05-01':
from ..v2023_05_01.aio.operations import ExtensionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'extensions'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def flux_config_operation_status(self):
@ -260,28 +266,28 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
* 2021-11-01-preview: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2021_11_01_preview.aio.operations.FluxConfigOperationStatusOperations>`
* 2022-01-01-preview: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_01_01_preview.aio.operations.FluxConfigOperationStatusOperations>`
* 2022-01-15-preview: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_01_15_preview.aio.operations.FluxConfigOperationStatusOperations>`
* 2022-03-01: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_03_01.aio.operations.FluxConfigOperationStatusOperations>`
* 2022-07-01: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_07_01.aio.operations.FluxConfigOperationStatusOperations>`
* 2022-11-01: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_11_01.aio.operations.FluxConfigOperationStatusOperations>`
* 2023-05-01: :class:`FluxConfigOperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2023_05_01.aio.operations.FluxConfigOperationStatusOperations>`
"""
api_version = self._get_api_version('flux_config_operation_status')
if api_version == '2021-11-01-preview':
from ..v2021_11_01_preview.aio.operations import FluxConfigOperationStatusOperations as OperationClass
elif api_version == '2022-01-01-preview':
from ..v2022_01_01_preview.aio.operations import FluxConfigOperationStatusOperations as OperationClass
elif api_version == '2022-01-15-preview':
from ..v2022_01_15_preview.aio.operations import FluxConfigOperationStatusOperations as OperationClass
elif api_version == '2022-03-01':
from ..v2022_03_01.aio.operations import FluxConfigOperationStatusOperations as OperationClass
elif api_version == '2022-07-01':
from ..v2022_07_01.aio.operations import FluxConfigOperationStatusOperations as OperationClass
elif api_version == '2022-11-01':
from ..v2022_11_01.aio.operations import FluxConfigOperationStatusOperations as OperationClass
elif api_version == '2023-05-01':
from ..v2023_05_01.aio.operations import FluxConfigOperationStatusOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'flux_config_operation_status'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def flux_configurations(self):
@ -289,28 +295,28 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
* 2021-11-01-preview: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2021_11_01_preview.aio.operations.FluxConfigurationsOperations>`
* 2022-01-01-preview: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_01_01_preview.aio.operations.FluxConfigurationsOperations>`
* 2022-01-15-preview: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_01_15_preview.aio.operations.FluxConfigurationsOperations>`
* 2022-03-01: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_03_01.aio.operations.FluxConfigurationsOperations>`
* 2022-07-01: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_07_01.aio.operations.FluxConfigurationsOperations>`
* 2022-11-01: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_11_01.aio.operations.FluxConfigurationsOperations>`
* 2023-05-01: :class:`FluxConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2023_05_01.aio.operations.FluxConfigurationsOperations>`
"""
api_version = self._get_api_version('flux_configurations')
if api_version == '2021-11-01-preview':
from ..v2021_11_01_preview.aio.operations import FluxConfigurationsOperations as OperationClass
elif api_version == '2022-01-01-preview':
from ..v2022_01_01_preview.aio.operations import FluxConfigurationsOperations as OperationClass
elif api_version == '2022-01-15-preview':
from ..v2022_01_15_preview.aio.operations import FluxConfigurationsOperations as OperationClass
elif api_version == '2022-03-01':
from ..v2022_03_01.aio.operations import FluxConfigurationsOperations as OperationClass
elif api_version == '2022-07-01':
from ..v2022_07_01.aio.operations import FluxConfigurationsOperations as OperationClass
elif api_version == '2022-11-01':
from ..v2022_11_01.aio.operations import FluxConfigurationsOperations as OperationClass
elif api_version == '2023-05-01':
from ..v2023_05_01.aio.operations import FluxConfigurationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'flux_configurations'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def location_extension_types(self):
@ -333,7 +339,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
else:
raise ValueError("API version {} does not have operation group 'location_extension_types'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def operation_status(self):
@ -343,11 +349,11 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
* 2021-09-01: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2021_09_01.aio.operations.OperationStatusOperations>`
* 2021-11-01-preview: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2021_11_01_preview.aio.operations.OperationStatusOperations>`
* 2022-01-01-preview: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_01_01_preview.aio.operations.OperationStatusOperations>`
* 2022-01-15-preview: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_01_15_preview.aio.operations.OperationStatusOperations>`
* 2022-03-01: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_03_01.aio.operations.OperationStatusOperations>`
* 2022-04-02-preview: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_04_02_preview.aio.operations.OperationStatusOperations>`
* 2022-07-01: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_07_01.aio.operations.OperationStatusOperations>`
* 2022-11-01: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2022_11_01.aio.operations.OperationStatusOperations>`
* 2023-05-01: :class:`OperationStatusOperations<azure.mgmt.kubernetesconfiguration.v2023_05_01.aio.operations.OperationStatusOperations>`
"""
api_version = self._get_api_version('operation_status')
if api_version == '2021-05-01-preview':
@ -358,8 +364,6 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
from ..v2021_11_01_preview.aio.operations import OperationStatusOperations as OperationClass
elif api_version == '2022-01-01-preview':
from ..v2022_01_01_preview.aio.operations import OperationStatusOperations as OperationClass
elif api_version == '2022-01-15-preview':
from ..v2022_01_15_preview.aio.operations import OperationStatusOperations as OperationClass
elif api_version == '2022-03-01':
from ..v2022_03_01.aio.operations import OperationStatusOperations as OperationClass
elif api_version == '2022-04-02-preview':
@ -368,10 +372,12 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
from ..v2022_07_01.aio.operations import OperationStatusOperations as OperationClass
elif api_version == '2022-11-01':
from ..v2022_11_01.aio.operations import OperationStatusOperations as OperationClass
elif api_version == '2023-05-01':
from ..v2023_05_01.aio.operations import OperationStatusOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operation_status'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def operations(self):
@ -384,10 +390,10 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
* 2021-09-01: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2021_09_01.aio.operations.Operations>`
* 2021-11-01-preview: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2021_11_01_preview.aio.operations.Operations>`
* 2022-01-01-preview: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2022_01_01_preview.aio.operations.Operations>`
* 2022-01-15-preview: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2022_01_15_preview.aio.operations.Operations>`
* 2022-03-01: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2022_03_01.aio.operations.Operations>`
* 2022-07-01: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2022_07_01.aio.operations.Operations>`
* 2022-11-01: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2022_11_01.aio.operations.Operations>`
* 2023-05-01: :class:`Operations<azure.mgmt.kubernetesconfiguration.v2023_05_01.aio.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2020-07-01-preview':
@ -404,18 +410,18 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
from ..v2021_11_01_preview.aio.operations import Operations as OperationClass
elif api_version == '2022-01-01-preview':
from ..v2022_01_01_preview.aio.operations import Operations as OperationClass
elif api_version == '2022-01-15-preview':
from ..v2022_01_15_preview.aio.operations import Operations as OperationClass
elif api_version == '2022-03-01':
from ..v2022_03_01.aio.operations import Operations as OperationClass
elif api_version == '2022-07-01':
from ..v2022_07_01.aio.operations import Operations as OperationClass
elif api_version == '2022-11-01':
from ..v2022_11_01.aio.operations import Operations as OperationClass
elif api_version == '2023-05-01':
from ..v2023_05_01.aio.operations import Operations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def private_endpoint_connections(self):
@ -429,7 +435,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
else:
raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def private_link_resources(self):
@ -443,7 +449,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
else:
raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def private_link_scopes(self):
@ -457,7 +463,7 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
else:
raise ValueError("API version {} does not have operation group 'private_link_scopes'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
@property
def source_control_configurations(self):
@ -469,10 +475,10 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
* 2021-05-01-preview: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2021_05_01_preview.aio.operations.SourceControlConfigurationsOperations>`
* 2021-11-01-preview: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2021_11_01_preview.aio.operations.SourceControlConfigurationsOperations>`
* 2022-01-01-preview: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_01_01_preview.aio.operations.SourceControlConfigurationsOperations>`
* 2022-01-15-preview: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_01_15_preview.aio.operations.SourceControlConfigurationsOperations>`
* 2022-03-01: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_03_01.aio.operations.SourceControlConfigurationsOperations>`
* 2022-07-01: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_07_01.aio.operations.SourceControlConfigurationsOperations>`
* 2022-11-01: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2022_11_01.aio.operations.SourceControlConfigurationsOperations>`
* 2023-05-01: :class:`SourceControlConfigurationsOperations<azure.mgmt.kubernetesconfiguration.v2023_05_01.aio.operations.SourceControlConfigurationsOperations>`
"""
api_version = self._get_api_version('source_control_configurations')
if api_version == '2020-07-01-preview':
@ -487,18 +493,18 @@ class SourceControlConfigurationClient(MultiApiClientMixin, _SDKClient):
from ..v2021_11_01_preview.aio.operations import SourceControlConfigurationsOperations as OperationClass
elif api_version == '2022-01-01-preview':
from ..v2022_01_01_preview.aio.operations import SourceControlConfigurationsOperations as OperationClass
elif api_version == '2022-01-15-preview':
from ..v2022_01_15_preview.aio.operations import SourceControlConfigurationsOperations as OperationClass
elif api_version == '2022-03-01':
from ..v2022_03_01.aio.operations import SourceControlConfigurationsOperations as OperationClass
elif api_version == '2022-07-01':
from ..v2022_07_01.aio.operations import SourceControlConfigurationsOperations as OperationClass
elif api_version == '2022-11-01':
from ..v2022_11_01.aio.operations import SourceControlConfigurationsOperations as OperationClass
elif api_version == '2023-05-01':
from ..v2023_05_01.aio.operations import SourceControlConfigurationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'source_control_configurations'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
async def close(self):
await self._client.close()

Просмотреть файл

@ -6,4 +6,4 @@
# --------------------------------------------------------------------------
from .v2022_01_15_preview.models import *
from .v2022_04_02_preview.models import *
from .v2022_11_01.models import *
from .v2023_05_01.models import *

Просмотреть файл

@ -65,10 +65,14 @@ class SourceControlConfigurationClient: # pylint: disable=client-accepts-api-ve
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.source_control_configurations = SourceControlConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2020-07-01-preview"
)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize, "2020-07-01-preview"
)
self.extensions = ExtensionsOperations(
self._client, self._config, self._serialize, self._deserialize, "2020-07-01-preview"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

Просмотреть файл

@ -5,8 +5,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import List, cast
from azure.core.pipeline.transport import HttpRequest
@ -16,15 +14,3 @@ def _convert_request(request, files=None):
if files:
request.set_formdata_body(files)
return request
def _format_url_section(template, **kwargs):
components = template.split("/")
while components:
try:
return template.format(**kwargs)
except KeyError as key:
# Need the cast, as for some reasons "split" is typed as list[str | Any]
formatted_components = cast(List[str], template.split("/"))
components = [c for c in formatted_components if "{}".format(key.args[0]) not in c]
template = "/".join(components)

Просмотреть файл

@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
VERSION = "3.0.0"
VERSION = "3.1.0"

Просмотреть файл

@ -65,10 +65,14 @@ class SourceControlConfigurationClient: # pylint: disable=client-accepts-api-ve
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.source_control_configurations = SourceControlConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2020-07-01-preview"
)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize, "2020-07-01-preview"
)
self.extensions = ExtensionsOperations(
self._client, self._config, self._serialize, self._deserialize, "2020-07-01-preview"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
"""Runs the network request through the client's chained policies.

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
import urllib.parse
@ -58,6 +59,7 @@ class ExtensionsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@overload
async def create(
@ -193,14 +195,16 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.ExtensionInstance] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(extension_instance, (IO, bytes)):
if isinstance(extension_instance, (IOBase, bytes)):
_content = extension_instance
else:
_json = self._serialize.body(extension_instance, "ExtensionInstance")
@ -289,7 +293,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[_models.ExtensionInstance] = kwargs.pop("cls", None)
request = build_get_request(
@ -464,14 +470,16 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.ExtensionInstance] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(extension_instance, (IO, bytes)):
if isinstance(extension_instance, (IOBase, bytes)):
_content = extension_instance
else:
_json = self._serialize.body(extension_instance, "ExtensionInstanceUpdate")
@ -561,7 +569,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -631,7 +641,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[_models.ExtensionInstancesList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -51,6 +51,7 @@ class Operations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, **kwargs: Any) -> AsyncIterable["_models.ResourceProviderOperation"]:
@ -66,7 +67,9 @@ class Operations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[_models.ResourceProviderOperationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -59,6 +60,7 @@ class SourceControlConfigurationsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace_async
async def get(
@ -104,7 +106,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
request = build_get_request(
@ -284,14 +288,16 @@ class SourceControlConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(source_control_configuration, (IO, bytes)):
if isinstance(source_control_configuration, (IOBase, bytes)):
_content = source_control_configuration
else:
_json = self._serialize.body(source_control_configuration, "SourceControlConfiguration")
@ -361,7 +367,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -441,7 +449,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -518,7 +528,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[_models.SourceControlConfigurationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
import urllib.parse
@ -27,7 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -66,7 +67,7 @@ def build_create_request(
"extensionInstanceName": _SERIALIZER.url("extension_instance_name", extension_instance_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -108,7 +109,7 @@ def build_get_request(
"extensionInstanceName": _SERIALIZER.url("extension_instance_name", extension_instance_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -149,7 +150,7 @@ def build_update_request(
"extensionInstanceName": _SERIALIZER.url("extension_instance_name", extension_instance_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -191,7 +192,7 @@ def build_delete_request(
"extensionInstanceName": _SERIALIZER.url("extension_instance_name", extension_instance_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -229,7 +230,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -258,6 +259,7 @@ class ExtensionsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@overload
def create(
@ -393,14 +395,16 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.ExtensionInstance] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(extension_instance, (IO, bytes)):
if isinstance(extension_instance, (IOBase, bytes)):
_content = extension_instance
else:
_json = self._serialize.body(extension_instance, "ExtensionInstance")
@ -489,7 +493,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[_models.ExtensionInstance] = kwargs.pop("cls", None)
request = build_get_request(
@ -664,14 +670,16 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.ExtensionInstance] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(extension_instance, (IO, bytes)):
if isinstance(extension_instance, (IOBase, bytes)):
_content = extension_instance
else:
_json = self._serialize.body(extension_instance, "ExtensionInstanceUpdate")
@ -761,7 +769,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -831,7 +841,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[_models.ExtensionInstancesList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -73,6 +73,7 @@ class Operations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, **kwargs: Any) -> Iterable["_models.ResourceProviderOperation"]:
@ -88,7 +89,9 @@ class Operations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[_models.ResourceProviderOperationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -29,7 +30,7 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -69,7 +70,7 @@ def build_get_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -112,7 +113,7 @@ def build_create_or_update_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -156,7 +157,7 @@ def build_delete_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -194,7 +195,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -223,6 +224,7 @@ class SourceControlConfigurationsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def get(
@ -268,7 +270,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
request = build_get_request(
@ -448,14 +452,16 @@ class SourceControlConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(source_control_configuration, (IO, bytes)):
if isinstance(source_control_configuration, (IOBase, bytes)):
_content = source_control_configuration
else:
_json = self._serialize.body(source_control_configuration, "SourceControlConfiguration")
@ -525,7 +531,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -605,7 +613,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -682,7 +692,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-07-01-preview")
)
cls: ClsType[_models.SourceControlConfigurationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -62,9 +62,11 @@ class SourceControlConfigurationClient: # pylint: disable=client-accepts-api-ve
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.source_control_configurations = SourceControlConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2020-10-01-preview"
)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize, "2020-10-01-preview"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

Просмотреть файл

@ -5,8 +5,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import List, cast
from azure.core.pipeline.transport import HttpRequest
@ -16,15 +14,3 @@ def _convert_request(request, files=None):
if files:
request.set_formdata_body(files)
return request
def _format_url_section(template, **kwargs):
components = template.split("/")
while components:
try:
return template.format(**kwargs)
except KeyError as key:
# Need the cast, as for some reasons "split" is typed as list[str | Any]
formatted_components = cast(List[str], template.split("/"))
components = [c for c in formatted_components if "{}".format(key.args[0]) not in c]
template = "/".join(components)

Просмотреть файл

@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
VERSION = "3.0.0"
VERSION = "3.1.0"

Просмотреть файл

@ -62,9 +62,11 @@ class SourceControlConfigurationClient: # pylint: disable=client-accepts-api-ve
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.source_control_configurations = SourceControlConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2020-10-01-preview"
)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize, "2020-10-01-preview"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
"""Runs the network request through the client's chained policies.

Просмотреть файл

@ -51,6 +51,7 @@ class Operations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, **kwargs: Any) -> AsyncIterable["_models.ResourceProviderOperation"]:
@ -66,7 +67,9 @@ class Operations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-10-01-preview")
)
cls: ClsType[_models.ResourceProviderOperationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -59,6 +60,7 @@ class SourceControlConfigurationsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace_async
async def get(
@ -104,7 +106,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-10-01-preview")
)
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
request = build_get_request(
@ -284,14 +288,16 @@ class SourceControlConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-10-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(source_control_configuration, (IO, bytes)):
if isinstance(source_control_configuration, (IOBase, bytes)):
_content = source_control_configuration
else:
_json = self._serialize.body(source_control_configuration, "SourceControlConfiguration")
@ -361,7 +367,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-10-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -441,7 +449,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-10-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -518,7 +528,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-10-01-preview")
)
cls: ClsType[_models.SourceControlConfigurationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -73,6 +73,7 @@ class Operations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, **kwargs: Any) -> Iterable["_models.ResourceProviderOperation"]:
@ -88,7 +89,9 @@ class Operations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-10-01-preview")
)
cls: ClsType[_models.ResourceProviderOperationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -29,7 +30,7 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -69,7 +70,7 @@ def build_get_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -112,7 +113,7 @@ def build_create_or_update_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -156,7 +157,7 @@ def build_delete_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -194,7 +195,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -223,6 +224,7 @@ class SourceControlConfigurationsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def get(
@ -268,7 +270,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-10-01-preview")
)
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
request = build_get_request(
@ -448,14 +452,16 @@ class SourceControlConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-10-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(source_control_configuration, (IO, bytes)):
if isinstance(source_control_configuration, (IOBase, bytes)):
_content = source_control_configuration
else:
_json = self._serialize.body(source_control_configuration, "SourceControlConfiguration")
@ -525,7 +531,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-10-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -605,7 +613,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-10-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -682,7 +692,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2020-10-01-preview")
)
cls: ClsType[_models.SourceControlConfigurationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -61,9 +61,9 @@ class SourceControlConfigurationClient: # pylint: disable=client-accepts-api-ve
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.source_control_configurations = SourceControlConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-03-01"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize, "2021-03-01")
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

Просмотреть файл

@ -5,8 +5,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import List, cast
from azure.core.pipeline.transport import HttpRequest
@ -16,15 +14,3 @@ def _convert_request(request, files=None):
if files:
request.set_formdata_body(files)
return request
def _format_url_section(template, **kwargs):
components = template.split("/")
while components:
try:
return template.format(**kwargs)
except KeyError as key:
# Need the cast, as for some reasons "split" is typed as list[str | Any]
formatted_components = cast(List[str], template.split("/"))
components = [c for c in formatted_components if "{}".format(key.args[0]) not in c]
template = "/".join(components)

Просмотреть файл

@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
VERSION = "3.0.0"
VERSION = "3.1.0"

Просмотреть файл

@ -61,9 +61,9 @@ class SourceControlConfigurationClient: # pylint: disable=client-accepts-api-ve
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.source_control_configurations = SourceControlConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-03-01"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize, "2021-03-01")
def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
"""Runs the network request through the client's chained policies.

Просмотреть файл

@ -51,6 +51,7 @@ class Operations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, **kwargs: Any) -> AsyncIterable["_models.ResourceProviderOperation"]:
@ -66,7 +67,7 @@ class Operations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01"))
cls: ClsType[_models.ResourceProviderOperationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -59,6 +60,7 @@ class SourceControlConfigurationsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace_async
async def get(
@ -103,7 +105,7 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01"))
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
request = build_get_request(
@ -280,14 +282,14 @@ class SourceControlConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(source_control_configuration, (IO, bytes)):
if isinstance(source_control_configuration, (IOBase, bytes)):
_content = source_control_configuration
else:
_json = self._serialize.body(source_control_configuration, "SourceControlConfiguration")
@ -357,7 +359,7 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01"))
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -437,7 +439,7 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01"))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -514,7 +516,7 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01"))
cls: ClsType[_models.SourceControlConfigurationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -73,6 +73,7 @@ class Operations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, **kwargs: Any) -> Iterable["_models.ResourceProviderOperation"]:
@ -88,7 +89,7 @@ class Operations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01"))
cls: ClsType[_models.ResourceProviderOperationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -29,7 +30,7 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -69,7 +70,7 @@ def build_get_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -112,7 +113,7 @@ def build_create_or_update_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -156,7 +157,7 @@ def build_delete_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -194,7 +195,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -223,6 +224,7 @@ class SourceControlConfigurationsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def get(
@ -267,7 +269,7 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01"))
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
request = build_get_request(
@ -444,14 +446,14 @@ class SourceControlConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(source_control_configuration, (IO, bytes)):
if isinstance(source_control_configuration, (IOBase, bytes)):
_content = source_control_configuration
else:
_json = self._serialize.body(source_control_configuration, "SourceControlConfiguration")
@ -521,7 +523,7 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01"))
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -601,7 +603,7 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01"))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -678,7 +680,7 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-03-01"))
cls: ClsType[_models.SourceControlConfigurationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -87,26 +87,30 @@ class SourceControlConfigurationClient: # pylint: disable=client-accepts-api-ve
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.extensions = ExtensionsOperations(
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.cluster_extension_type = ClusterExtensionTypeOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.cluster_extension_types = ClusterExtensionTypesOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.extension_type_versions = ExtensionTypeVersionsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.location_extension_types = LocationExtensionTypesOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.source_control_configurations = SourceControlConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

Просмотреть файл

@ -5,8 +5,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import List, cast
from azure.core.pipeline.transport import HttpRequest
@ -16,15 +14,3 @@ def _convert_request(request, files=None):
if files:
request.set_formdata_body(files)
return request
def _format_url_section(template, **kwargs):
components = template.split("/")
while components:
try:
return template.format(**kwargs)
except KeyError as key:
# Need the cast, as for some reasons "split" is typed as list[str | Any]
formatted_components = cast(List[str], template.split("/"))
components = [c for c in formatted_components if "{}".format(key.args[0]) not in c]
template = "/".join(components)

Просмотреть файл

@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
VERSION = "3.0.0"
VERSION = "3.1.0"

Просмотреть файл

@ -87,26 +87,30 @@ class SourceControlConfigurationClient: # pylint: disable=client-accepts-api-ve
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.extensions = ExtensionsOperations(
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.cluster_extension_type = ClusterExtensionTypeOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.cluster_extension_types = ClusterExtensionTypesOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.extension_type_versions = ExtensionTypeVersionsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.location_extension_types = LocationExtensionTypesOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.source_control_configurations = SourceControlConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize, "2021-05-01-preview"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
"""Runs the network request through the client's chained policies.

Просмотреть файл

@ -49,6 +49,7 @@ class ClusterExtensionTypeOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace_async
async def get(
@ -93,7 +94,9 @@ class ClusterExtensionTypeOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.ExtensionType] = kwargs.pop("cls", None)
request = build_get_request(

Просмотреть файл

@ -51,6 +51,7 @@ class ClusterExtensionTypesOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(
@ -76,7 +77,9 @@ class ClusterExtensionTypesOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.ExtensionTypeList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -51,6 +51,7 @@ class ExtensionTypeVersionsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(
@ -72,7 +73,9 @@ class ExtensionTypeVersionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.ExtensionVersionList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -59,6 +60,7 @@ class ExtensionsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
async def _create_initial(
self,
@ -81,14 +83,16 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(extension, (IO, bytes)):
if isinstance(extension, (IOBase, bytes)):
_content = extension
else:
_json = self._serialize.body(extension, "Extension")
@ -292,7 +296,9 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
@ -387,7 +393,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
request = build_get_request(
@ -449,7 +457,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -535,7 +545,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -616,7 +628,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.ExtensionsList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -51,6 +51,7 @@ class LocationExtensionTypesOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.ExtensionType"]:
@ -67,7 +68,9 @@ class LocationExtensionTypesOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.ExtensionTypeList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -52,6 +52,7 @@ class OperationStatusOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(
@ -88,7 +89,9 @@ class OperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.OperationStatusList] = kwargs.pop("cls", None)
error_map = {
@ -210,7 +213,9 @@ class OperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None)
request = build_get_request(

Просмотреть файл

@ -51,6 +51,7 @@ class Operations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, **kwargs: Any) -> AsyncIterable["_models.ResourceProviderOperation"]:
@ -66,7 +67,9 @@ class Operations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.ResourceProviderOperationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -59,6 +60,7 @@ class SourceControlConfigurationsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace_async
async def get(
@ -105,7 +107,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
request = build_get_request(
@ -288,14 +292,16 @@ class SourceControlConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(source_control_configuration, (IO, bytes)):
if isinstance(source_control_configuration, (IOBase, bytes)):
_content = source_control_configuration
else:
_json = self._serialize.body(source_control_configuration, "SourceControlConfiguration")
@ -365,7 +371,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -446,7 +454,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -524,7 +534,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.SourceControlConfigurationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -25,7 +25,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -65,7 +65,7 @@ def build_get_request(
"extensionTypeName": _SERIALIZER.url("extension_type_name", extension_type_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -94,6 +94,7 @@ class ClusterExtensionTypeOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def get(
@ -138,7 +139,9 @@ class ClusterExtensionTypeOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.ExtensionType] = kwargs.pop("cls", None)
request = build_get_request(

Просмотреть файл

@ -27,7 +27,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -63,7 +63,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -92,6 +92,7 @@ class ClusterExtensionTypesOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(
@ -117,7 +118,9 @@ class ClusterExtensionTypesOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.ExtensionTypeList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -27,7 +27,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -54,7 +54,7 @@ def build_list_request(location: str, extension_type_name: str, subscription_id:
"extensionTypeName": _SERIALIZER.url("extension_type_name", extension_type_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -83,6 +83,7 @@ class ExtensionTypeVersionsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(
@ -104,7 +105,9 @@ class ExtensionTypeVersionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.ExtensionVersionList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -29,7 +30,7 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -70,7 +71,7 @@ def build_create_request(
"extensionName": _SERIALIZER.url("extension_name", extension_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -114,7 +115,7 @@ def build_get_request(
"extensionName": _SERIALIZER.url("extension_name", extension_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -158,7 +159,7 @@ def build_delete_request(
"extensionName": _SERIALIZER.url("extension_name", extension_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -200,7 +201,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -229,6 +230,7 @@ class ExtensionsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
def _create_initial(
self,
@ -251,14 +253,16 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(extension, (IO, bytes)):
if isinstance(extension, (IOBase, bytes)):
_content = extension
else:
_json = self._serialize.body(extension, "Extension")
@ -459,7 +463,9 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
@ -553,7 +559,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
request = build_get_request(
@ -615,7 +623,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -701,7 +711,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -781,7 +793,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.ExtensionsList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -27,7 +27,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -53,7 +53,7 @@ def build_list_request(location: str, subscription_id: str, **kwargs: Any) -> Ht
"location": _SERIALIZER.url("location", location, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -82,6 +82,7 @@ class LocationExtensionTypesOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, location: str, **kwargs: Any) -> Iterable["_models.ExtensionType"]:
@ -98,7 +99,9 @@ class LocationExtensionTypesOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.ExtensionTypeList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -27,7 +27,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -65,7 +65,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -109,7 +109,7 @@ def build_get_request(
"operationId": _SERIALIZER.url("operation_id", operation_id, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -138,6 +138,7 @@ class OperationStatusOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(
@ -174,7 +175,9 @@ class OperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.OperationStatusList] = kwargs.pop("cls", None)
error_map = {
@ -296,7 +299,9 @@ class OperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None)
request = build_get_request(

Просмотреть файл

@ -73,6 +73,7 @@ class Operations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, **kwargs: Any) -> Iterable["_models.ResourceProviderOperation"]:
@ -88,7 +89,9 @@ class Operations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.ResourceProviderOperationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -29,7 +30,7 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -71,7 +72,7 @@ def build_get_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -116,7 +117,7 @@ def build_create_or_update_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -162,7 +163,7 @@ def build_delete_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -202,7 +203,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -231,6 +232,7 @@ class SourceControlConfigurationsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def get(
@ -277,7 +279,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
request = build_get_request(
@ -460,14 +464,16 @@ class SourceControlConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(source_control_configuration, (IO, bytes)):
if isinstance(source_control_configuration, (IOBase, bytes)):
_content = source_control_configuration
else:
_json = self._serialize.body(source_control_configuration, "SourceControlConfiguration")
@ -537,7 +543,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -618,7 +626,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -696,7 +706,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-05-01-preview")
)
cls: ClsType[_models.SourceControlConfigurationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -62,11 +62,13 @@ class SourceControlConfigurationClient: # pylint: disable=client-accepts-api-ve
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize
self.extensions = ExtensionsOperations(
self._client, self._config, self._serialize, self._deserialize, "2021-09-01"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize, "2021-09-01"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize, "2021-09-01")
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

Просмотреть файл

@ -5,8 +5,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import List, cast
from azure.core.pipeline.transport import HttpRequest
@ -16,15 +14,3 @@ def _convert_request(request, files=None):
if files:
request.set_formdata_body(files)
return request
def _format_url_section(template, **kwargs):
components = template.split("/")
while components:
try:
return template.format(**kwargs)
except KeyError as key:
# Need the cast, as for some reasons "split" is typed as list[str | Any]
formatted_components = cast(List[str], template.split("/"))
components = [c for c in formatted_components if "{}".format(key.args[0]) not in c]
template = "/".join(components)

Просмотреть файл

@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
VERSION = "3.0.0"
VERSION = "3.1.0"

Просмотреть файл

@ -62,11 +62,13 @@ class SourceControlConfigurationClient: # pylint: disable=client-accepts-api-ve
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize
self.extensions = ExtensionsOperations(
self._client, self._config, self._serialize, self._deserialize, "2021-09-01"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize, "2021-09-01"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize, "2021-09-01")
def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
"""Runs the network request through the client's chained policies.

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -60,6 +61,7 @@ class ExtensionsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
async def _create_initial(
self,
@ -82,14 +84,14 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(extension, (IO, bytes)):
if isinstance(extension, (IOBase, bytes)):
_content = extension
else:
_json = self._serialize.body(extension, "Extension")
@ -293,7 +295,7 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
@ -388,7 +390,7 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
request = build_get_request(
@ -450,7 +452,7 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -536,7 +538,7 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -606,14 +608,14 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(patch_extension, (IO, bytes)):
if isinstance(patch_extension, (IOBase, bytes)):
_content = patch_extension
else:
_json = self._serialize.body(patch_extension, "PatchExtension")
@ -814,7 +816,7 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
@ -899,7 +901,7 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
cls: ClsType[_models.ExtensionsList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -52,6 +52,7 @@ class OperationStatusOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(
@ -88,7 +89,7 @@ class OperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
cls: ClsType[_models.OperationStatusList] = kwargs.pop("cls", None)
error_map = {
@ -210,7 +211,7 @@ class OperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None)
request = build_get_request(

Просмотреть файл

@ -51,6 +51,7 @@ class Operations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, **kwargs: Any) -> AsyncIterable["_models.ResourceProviderOperation"]:
@ -67,7 +68,7 @@ class Operations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
cls: ClsType[_models.ResourceProviderOperationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -29,7 +30,7 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -70,7 +71,7 @@ def build_create_request(
"extensionName": _SERIALIZER.url("extension_name", extension_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -114,7 +115,7 @@ def build_get_request(
"extensionName": _SERIALIZER.url("extension_name", extension_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -158,7 +159,7 @@ def build_delete_request(
"extensionName": _SERIALIZER.url("extension_name", extension_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -203,7 +204,7 @@ def build_update_request(
"extensionName": _SERIALIZER.url("extension_name", extension_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -245,7 +246,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -274,6 +275,7 @@ class ExtensionsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
def _create_initial(
self,
@ -296,14 +298,14 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(extension, (IO, bytes)):
if isinstance(extension, (IOBase, bytes)):
_content = extension
else:
_json = self._serialize.body(extension, "Extension")
@ -504,7 +506,7 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
@ -598,7 +600,7 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
request = build_get_request(
@ -660,7 +662,7 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -746,7 +748,7 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -815,14 +817,14 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(patch_extension, (IO, bytes)):
if isinstance(patch_extension, (IOBase, bytes)):
_content = patch_extension
else:
_json = self._serialize.body(patch_extension, "PatchExtension")
@ -1020,7 +1022,7 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
@ -1104,7 +1106,7 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
cls: ClsType[_models.ExtensionsList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -27,7 +27,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -65,7 +65,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -109,7 +109,7 @@ def build_get_request(
"operationId": _SERIALIZER.url("operation_id", operation_id, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -138,6 +138,7 @@ class OperationStatusOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(
@ -174,7 +175,7 @@ class OperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
cls: ClsType[_models.OperationStatusList] = kwargs.pop("cls", None)
error_map = {
@ -296,7 +297,7 @@ class OperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None)
request = build_get_request(

Просмотреть файл

@ -73,6 +73,7 @@ class Operations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, **kwargs: Any) -> Iterable["_models.ResourceProviderOperation"]:
@ -89,7 +90,7 @@ class Operations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2021-09-01"))
cls: ClsType[_models.ResourceProviderOperationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -95,32 +95,36 @@ class SourceControlConfigurationClient: # pylint: disable=client-accepts-api-ve
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.extensions = ExtensionsOperations(
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.cluster_extension_type = ClusterExtensionTypeOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.cluster_extension_types = ClusterExtensionTypesOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.extension_type_versions = ExtensionTypeVersionsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.location_extension_types = LocationExtensionTypesOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.source_control_configurations = SourceControlConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.flux_configurations = FluxConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.flux_config_operation_status = FluxConfigOperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

Просмотреть файл

@ -5,8 +5,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import List, cast
from azure.core.pipeline.transport import HttpRequest
@ -16,15 +14,3 @@ def _convert_request(request, files=None):
if files:
request.set_formdata_body(files)
return request
def _format_url_section(template, **kwargs):
components = template.split("/")
while components:
try:
return template.format(**kwargs)
except KeyError as key:
# Need the cast, as for some reasons "split" is typed as list[str | Any]
formatted_components = cast(List[str], template.split("/"))
components = [c for c in formatted_components if "{}".format(key.args[0]) not in c]
template = "/".join(components)

Просмотреть файл

@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
VERSION = "3.0.0"
VERSION = "3.1.0"

Просмотреть файл

@ -95,32 +95,36 @@ class SourceControlConfigurationClient: # pylint: disable=client-accepts-api-ve
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.extensions = ExtensionsOperations(
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.cluster_extension_type = ClusterExtensionTypeOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.cluster_extension_types = ClusterExtensionTypesOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.extension_type_versions = ExtensionTypeVersionsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.location_extension_types = LocationExtensionTypesOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.source_control_configurations = SourceControlConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.flux_configurations = FluxConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.flux_config_operation_status = FluxConfigOperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize, "2021-11-01-preview"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
"""Runs the network request through the client's chained policies.

Просмотреть файл

@ -49,6 +49,7 @@ class ClusterExtensionTypeOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace_async
async def get(
@ -94,7 +95,9 @@ class ClusterExtensionTypeOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.ExtensionType] = kwargs.pop("cls", None)
request = build_get_request(

Просмотреть файл

@ -51,6 +51,7 @@ class ClusterExtensionTypesOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(
@ -86,7 +87,9 @@ class ClusterExtensionTypesOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.ExtensionTypeList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -51,6 +51,7 @@ class ExtensionTypeVersionsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(
@ -72,7 +73,9 @@ class ExtensionTypeVersionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.ExtensionVersionList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -60,6 +61,7 @@ class ExtensionsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
async def _create_initial(
self,
@ -82,14 +84,16 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(extension, (IO, bytes)):
if isinstance(extension, (IOBase, bytes)):
_content = extension
else:
_json = self._serialize.body(extension, "Extension")
@ -293,7 +297,9 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
@ -388,7 +394,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
request = build_get_request(
@ -450,7 +458,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -536,7 +546,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -606,14 +618,16 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(patch_extension, (IO, bytes)):
if isinstance(patch_extension, (IOBase, bytes)):
_content = patch_extension
else:
_json = self._serialize.body(patch_extension, "PatchExtension")
@ -815,7 +829,9 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
@ -900,7 +916,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.ExtensionsList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -49,6 +49,7 @@ class FluxConfigOperationStatusOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace_async
async def get(
@ -97,7 +98,9 @@ class FluxConfigOperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None)
request = build_get_request(

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -60,6 +61,7 @@ class FluxConfigurationsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace_async
async def get(
@ -105,7 +107,9 @@ class FluxConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
request = build_get_request(
@ -169,14 +173,16 @@ class FluxConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(flux_configuration, (IO, bytes)):
if isinstance(flux_configuration, (IOBase, bytes)):
_content = flux_configuration
else:
_json = self._serialize.body(flux_configuration, "FluxConfiguration")
@ -382,7 +388,9 @@ class FluxConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
@ -456,14 +464,16 @@ class FluxConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(flux_configuration_patch, (IO, bytes)):
if isinstance(flux_configuration_patch, (IOBase, bytes)):
_content = flux_configuration_patch
else:
_json = self._serialize.body(flux_configuration_patch, "FluxConfigurationPatch")
@ -667,7 +677,9 @@ class FluxConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
@ -739,7 +751,9 @@ class FluxConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -825,7 +839,9 @@ class FluxConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -906,7 +922,9 @@ class FluxConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.FluxConfigurationsList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -51,6 +51,7 @@ class LocationExtensionTypesOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.ExtensionType"]:
@ -67,7 +68,9 @@ class LocationExtensionTypesOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.ExtensionTypeList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -52,6 +52,7 @@ class OperationStatusOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace_async
async def get(
@ -100,7 +101,9 @@ class OperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None)
request = build_get_request(
@ -177,7 +180,9 @@ class OperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.OperationStatusList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -51,6 +51,7 @@ class Operations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, **kwargs: Any) -> AsyncIterable["_models.ResourceProviderOperation"]:
@ -66,7 +67,9 @@ class Operations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.ResourceProviderOperationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -59,6 +60,7 @@ class SourceControlConfigurationsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace_async
async def get(
@ -105,7 +107,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
request = build_get_request(
@ -288,14 +292,16 @@ class SourceControlConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(source_control_configuration, (IO, bytes)):
if isinstance(source_control_configuration, (IOBase, bytes)):
_content = source_control_configuration
else:
_json = self._serialize.body(source_control_configuration, "SourceControlConfiguration")
@ -365,7 +371,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -446,7 +454,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -524,7 +534,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.SourceControlConfigurationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -25,7 +25,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -65,7 +65,7 @@ def build_get_request(
"extensionTypeName": _SERIALIZER.url("extension_type_name", extension_type_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -94,6 +94,7 @@ class ClusterExtensionTypeOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def get(
@ -139,7 +140,9 @@ class ClusterExtensionTypeOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.ExtensionType] = kwargs.pop("cls", None)
request = build_get_request(

Просмотреть файл

@ -27,7 +27,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -65,7 +65,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -94,6 +94,7 @@ class ClusterExtensionTypesOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(
@ -129,7 +130,9 @@ class ClusterExtensionTypesOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.ExtensionTypeList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -27,7 +27,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -54,7 +54,7 @@ def build_list_request(location: str, extension_type_name: str, subscription_id:
"extensionTypeName": _SERIALIZER.url("extension_type_name", extension_type_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -83,6 +83,7 @@ class ExtensionTypeVersionsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(
@ -104,7 +105,9 @@ class ExtensionTypeVersionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.ExtensionVersionList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -29,7 +30,7 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -70,7 +71,7 @@ def build_create_request(
"extensionName": _SERIALIZER.url("extension_name", extension_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -114,7 +115,7 @@ def build_get_request(
"extensionName": _SERIALIZER.url("extension_name", extension_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -158,7 +159,7 @@ def build_delete_request(
"extensionName": _SERIALIZER.url("extension_name", extension_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -203,7 +204,7 @@ def build_update_request(
"extensionName": _SERIALIZER.url("extension_name", extension_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -245,7 +246,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -274,6 +275,7 @@ class ExtensionsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
def _create_initial(
self,
@ -296,14 +298,16 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(extension, (IO, bytes)):
if isinstance(extension, (IOBase, bytes)):
_content = extension
else:
_json = self._serialize.body(extension, "Extension")
@ -504,7 +508,9 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
@ -598,7 +604,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
request = build_get_request(
@ -660,7 +668,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -746,7 +756,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -815,14 +827,16 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(patch_extension, (IO, bytes)):
if isinstance(patch_extension, (IOBase, bytes)):
_content = patch_extension
else:
_json = self._serialize.body(patch_extension, "PatchExtension")
@ -1021,7 +1035,9 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
@ -1105,7 +1121,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.ExtensionsList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -25,7 +25,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -67,7 +67,7 @@ def build_get_request(
"operationId": _SERIALIZER.url("operation_id", operation_id, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -96,6 +96,7 @@ class FluxConfigOperationStatusOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def get(
@ -144,7 +145,9 @@ class FluxConfigOperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None)
request = build_get_request(

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -29,7 +30,7 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -69,7 +70,7 @@ def build_get_request(
"fluxConfigurationName": _SERIALIZER.url("flux_configuration_name", flux_configuration_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -112,7 +113,7 @@ def build_create_or_update_request(
"fluxConfigurationName": _SERIALIZER.url("flux_configuration_name", flux_configuration_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -157,7 +158,7 @@ def build_update_request(
"fluxConfigurationName": _SERIALIZER.url("flux_configuration_name", flux_configuration_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -203,7 +204,7 @@ def build_delete_request(
"fluxConfigurationName": _SERIALIZER.url("flux_configuration_name", flux_configuration_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -245,7 +246,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -274,6 +275,7 @@ class FluxConfigurationsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def get(
@ -319,7 +321,9 @@ class FluxConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
request = build_get_request(
@ -383,14 +387,16 @@ class FluxConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(flux_configuration, (IO, bytes)):
if isinstance(flux_configuration, (IOBase, bytes)):
_content = flux_configuration
else:
_json = self._serialize.body(flux_configuration, "FluxConfiguration")
@ -596,7 +602,9 @@ class FluxConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
@ -669,14 +677,16 @@ class FluxConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(flux_configuration_patch, (IO, bytes)):
if isinstance(flux_configuration_patch, (IOBase, bytes)):
_content = flux_configuration_patch
else:
_json = self._serialize.body(flux_configuration_patch, "FluxConfigurationPatch")
@ -880,7 +890,9 @@ class FluxConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
@ -951,7 +963,9 @@ class FluxConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -1037,7 +1051,9 @@ class FluxConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -1117,7 +1133,9 @@ class FluxConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.FluxConfigurationsList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -27,7 +27,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -53,7 +53,7 @@ def build_list_request(location: str, subscription_id: str, **kwargs: Any) -> Ht
"location": _SERIALIZER.url("location", location, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -82,6 +82,7 @@ class LocationExtensionTypesOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, location: str, **kwargs: Any) -> Iterable["_models.ExtensionType"]:
@ -98,7 +99,9 @@ class LocationExtensionTypesOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.ExtensionTypeList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -27,7 +27,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -69,7 +69,7 @@ def build_get_request(
"operationId": _SERIALIZER.url("operation_id", operation_id, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -109,7 +109,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -138,6 +138,7 @@ class OperationStatusOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def get(
@ -186,7 +187,9 @@ class OperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None)
request = build_get_request(
@ -263,7 +266,9 @@ class OperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.OperationStatusList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -73,6 +73,7 @@ class Operations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, **kwargs: Any) -> Iterable["_models.ResourceProviderOperation"]:
@ -88,7 +89,9 @@ class Operations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.ResourceProviderOperationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -29,7 +30,7 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
from .._vendor import _convert_request
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@ -71,7 +72,7 @@ def build_get_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -116,7 +117,7 @@ def build_create_or_update_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -162,7 +163,7 @@ def build_delete_request(
),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -202,7 +203,7 @@ def build_list_request(
"clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
@ -231,6 +232,7 @@ class SourceControlConfigurationsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def get(
@ -277,7 +279,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
request = build_get_request(
@ -460,14 +464,16 @@ class SourceControlConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControlConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(source_control_configuration, (IO, bytes)):
if isinstance(source_control_configuration, (IOBase, bytes)):
_content = source_control_configuration
else:
_json = self._serialize.body(source_control_configuration, "SourceControlConfiguration")
@ -537,7 +543,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -618,7 +626,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -696,7 +706,9 @@ class SourceControlConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2021-11-01-preview")
)
cls: ClsType[_models.SourceControlConfigurationList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -96,31 +96,35 @@ class SourceControlConfigurationClient: # pylint: disable=client-accepts-api-ve
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.cluster_extension_type = ClusterExtensionTypeOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.cluster_extension_types = ClusterExtensionTypesOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.extension_type_versions = ExtensionTypeVersionsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.location_extension_types = LocationExtensionTypesOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.extensions = ExtensionsOperations(
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.flux_configurations = FluxConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.flux_config_operation_status = FluxConfigOperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.source_control_configurations = SourceControlConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

Просмотреть файл

@ -5,8 +5,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import List, cast
from azure.core.pipeline.transport import HttpRequest
@ -16,15 +14,3 @@ def _convert_request(request, files=None):
if files:
request.set_formdata_body(files)
return request
def _format_url_section(template, **kwargs):
components = template.split("/")
while components:
try:
return template.format(**kwargs)
except KeyError as key:
# Need the cast, as for some reasons "split" is typed as list[str | Any]
formatted_components = cast(List[str], template.split("/"))
components = [c for c in formatted_components if "{}".format(key.args[0]) not in c]
template = "/".join(components)

Просмотреть файл

@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
VERSION = "3.0.0"
VERSION = "3.1.0"

Просмотреть файл

@ -96,31 +96,35 @@ class SourceControlConfigurationClient: # pylint: disable=client-accepts-api-ve
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.cluster_extension_type = ClusterExtensionTypeOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.cluster_extension_types = ClusterExtensionTypesOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.extension_type_versions = ExtensionTypeVersionsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.location_extension_types = LocationExtensionTypesOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.extensions = ExtensionsOperations(
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.flux_configurations = FluxConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.flux_config_operation_status = FluxConfigOperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.source_control_configurations = SourceControlConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize, "2022-01-01-preview"
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
"""Runs the network request through the client's chained policies.

Просмотреть файл

@ -49,6 +49,7 @@ class ClusterExtensionTypeOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace_async
async def get(
@ -95,7 +96,9 @@ class ClusterExtensionTypeOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[_models.ExtensionType] = kwargs.pop("cls", None)
request = build_get_request(

Просмотреть файл

@ -51,6 +51,7 @@ class ClusterExtensionTypesOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(
@ -87,7 +88,9 @@ class ClusterExtensionTypesOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[_models.ExtensionTypeList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -51,6 +51,7 @@ class ExtensionTypeVersionsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(
@ -72,7 +73,9 @@ class ExtensionTypeVersionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[_models.ExtensionVersionList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -60,6 +61,7 @@ class ExtensionsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
async def _create_initial(
self,
@ -82,14 +84,16 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(extension, (IO, bytes)):
if isinstance(extension, (IOBase, bytes)):
_content = extension
else:
_json = self._serialize.body(extension, "Extension")
@ -296,7 +300,9 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
@ -392,7 +398,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
request = build_get_request(
@ -454,7 +462,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -541,7 +551,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -609,14 +621,16 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(patch_extension, (IO, bytes)):
if isinstance(patch_extension, (IOBase, bytes)):
_content = patch_extension
else:
_json = self._serialize.body(patch_extension, "PatchExtension")
@ -821,7 +835,9 @@ class ExtensionsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Extension] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
@ -907,7 +923,9 @@ class ExtensionsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[_models.ExtensionsList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -49,6 +49,7 @@ class FluxConfigOperationStatusOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace_async
async def get(
@ -98,7 +99,9 @@ class FluxConfigOperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None)
request = build_get_request(

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
@ -60,6 +61,7 @@ class FluxConfigurationsOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace_async
async def get(
@ -106,7 +108,9 @@ class FluxConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
request = build_get_request(
@ -168,14 +172,16 @@ class FluxConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(flux_configuration, (IO, bytes)):
if isinstance(flux_configuration, (IOBase, bytes)):
_content = flux_configuration
else:
_json = self._serialize.body(flux_configuration, "FluxConfiguration")
@ -384,7 +390,9 @@ class FluxConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
@ -456,14 +464,16 @@ class FluxConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(flux_configuration_patch, (IO, bytes)):
if isinstance(flux_configuration_patch, (IOBase, bytes)):
_content = flux_configuration_patch
else:
_json = self._serialize.body(flux_configuration_patch, "FluxConfigurationPatch")
@ -670,7 +680,9 @@ class FluxConfigurationsOperations:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.FluxConfiguration] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
@ -742,7 +754,9 @@ class FluxConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
@ -829,7 +843,9 @@ class FluxConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@ -911,7 +927,9 @@ class FluxConfigurationsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[_models.FluxConfigurationsList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -51,6 +51,7 @@ class LocationExtensionTypesOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.ExtensionType"]:
@ -67,7 +68,9 @@ class LocationExtensionTypesOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[_models.ExtensionTypeList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -52,6 +52,7 @@ class OperationStatusOperations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace_async
async def get(
@ -101,7 +102,9 @@ class OperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None)
request = build_get_request(
@ -179,7 +182,9 @@ class OperationStatusOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[_models.OperationStatusList] = kwargs.pop("cls", None)
error_map = {

Просмотреть файл

@ -51,6 +51,7 @@ class Operations:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
@distributed_trace
def list(self, **kwargs: Any) -> AsyncIterable["_models.ResourceProviderOperation"]:
@ -66,7 +67,9 @@ class Operations:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-01-preview"))
api_version: str = kwargs.pop(
"api_version", _params.pop("api-version", self._api_version or "2022-01-01-preview")
)
cls: ClsType[_models.ResourceProviderOperationList] = kwargs.pop("cls", None)
error_map = {

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше