Skip to content

Commit

Permalink
CodeGen from PR 21450 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 65901a92127473b9b3295e59a81b05ba1024d546 into e77f2f011a17a05457e14a0e78b10c100337a557
  • Loading branch information
SDKAuto committed Nov 7, 2022
1 parent 1d023ea commit c7cd2dc
Show file tree
Hide file tree
Showing 236 changed files with 6,540 additions and 406 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "ce85518f4ab8bdf5a0a29a2ca99dd492a4a73956",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.1.11",
"@autorest/python@6.2.1",
"@autorest/modelerfour@4.24.3"
],
"commit": "63d73ac003b6435c5acae75cb2e81c2aac5e2ddc",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/recoveryservicesbackup/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.1.11 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/recoveryservicesbackup/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.2.1 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/recoveryservicesbackup/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

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

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -14,6 +15,11 @@

from ._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
Expand All @@ -36,7 +42,7 @@ class RecoveryServicesBackupClientConfiguration(Configuration): # pylint: disab

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(RecoveryServicesBackupClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop("api_version", "2022-09-01-preview") # type: str
api_version = kwargs.pop("api_version", "2022-09-01-preview") # type: Literal["2022-09-01-preview"]

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _format_url_section(template, **kwargs):
template = "/".join(components)


class MixinABC(ABC):
class RecoveryServicesBackupClientMixinABC(ABC):
"""DO NOT use this class. It is for internal typing use only."""

_client: "PipelineClient"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "5.1.0b2"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

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

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -14,6 +15,11 @@

from .._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
Expand All @@ -36,7 +42,7 @@ class RecoveryServicesBackupClientConfiguration(Configuration): # pylint: disab

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(RecoveryServicesBackupClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop("api_version", "2022-09-01-preview") # type: str
api_version = kwargs.pop("api_version", "2022-09-01-preview") # type: Literal["2022-09-01-preview"]

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from .._serialization import Deserializer, Serializer


class MixinABC(ABC):
class RecoveryServicesBackupClientMixinABC(ABC):
"""DO NOT use this class. It is for internal typing use only."""

_client: "AsyncPipelineClient"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import urllib.parse

Expand All @@ -29,8 +30,12 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._backup_engines_operations import build_get_request, build_list_request
from .._vendor import MixinABC
from .._vendor import RecoveryServicesBackupClientMixinABC

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -85,7 +90,9 @@ def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", self._config.api_version)
) # type: Literal["2022-09-01-preview"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupEngineBaseResourceList]

error_map = {
Expand Down Expand Up @@ -195,7 +202,9 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", self._config.api_version)
) # type: Literal["2022-09-01-preview"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.BackupEngineBaseResource]

request = build_get_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import urllib.parse

Expand All @@ -28,8 +29,12 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._backup_jobs_operations import build_list_request
from .._vendor import MixinABC
from .._vendor import RecoveryServicesBackupClientMixinABC

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -82,7 +87,9 @@ def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", self._config.api_version)
) # type: Literal["2022-09-01-preview"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.JobResourceList]

error_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, Callable, Dict, Optional, TypeVar

from azure.core.exceptions import (
Expand All @@ -26,8 +27,12 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._backup_operation_results_operations import build_get_request
from .._vendor import MixinABC
from .._vendor import RecoveryServicesBackupClientMixinABC

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -86,7 +91,9 @@ async def get( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", self._config.api_version)
) # type: Literal["2022-09-01-preview"]
cls = kwargs.pop("cls", None) # type: ClsType[None]

request = build_get_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, Callable, Dict, Optional, TypeVar

from azure.core.exceptions import (
Expand All @@ -26,8 +27,12 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._backup_operation_statuses_operations import build_get_request
from .._vendor import MixinABC
from .._vendor import RecoveryServicesBackupClientMixinABC

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -84,7 +89,9 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", self._config.api_version)
) # type: Literal["2022-09-01-preview"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.OperationStatus]

request = build_get_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import urllib.parse

Expand All @@ -28,8 +29,12 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._backup_policies_operations import build_list_request
from .._vendor import MixinABC
from .._vendor import RecoveryServicesBackupClientMixinABC

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -78,7 +83,9 @@ def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", self._config.api_version)
) # type: Literal["2022-09-01-preview"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.ProtectionPolicyResourceList]

error_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import urllib.parse

Expand All @@ -28,8 +29,12 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._backup_protectable_items_operations import build_list_request
from .._vendor import MixinABC
from .._vendor import RecoveryServicesBackupClientMixinABC

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -85,7 +90,9 @@ def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", self._config.api_version)
) # type: Literal["2022-09-01-preview"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.WorkloadProtectableItemResourceList]

error_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import urllib.parse

Expand All @@ -28,8 +29,12 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._backup_protected_items_operations import build_list_request
from .._vendor import MixinABC
from .._vendor import RecoveryServicesBackupClientMixinABC

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -83,7 +88,9 @@ def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", self._config.api_version)
) # type: Literal["2022-09-01-preview"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.ProtectedItemResourceList]

error_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import urllib.parse

Expand All @@ -28,8 +29,12 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._backup_protection_containers_operations import build_list_request
from .._vendor import MixinABC
from .._vendor import RecoveryServicesBackupClientMixinABC

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -76,7 +81,9 @@ def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
api_version = kwargs.pop(
"api_version", _params.pop("api-version", self._config.api_version)
) # type: Literal["2022-09-01-preview"]
cls = kwargs.pop("cls", None) # type: ClsType[_models.ProtectionContainerResourceList]

error_map = {
Expand Down
Loading

0 comments on commit c7cd2dc

Please sign in to comment.