This commit is contained in:
iscai-msft 2024-01-26 18:33:21 -05:00 коммит произвёл GitHub
Родитель 58b568b580
Коммит 448660adef
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
24 изменённых файлов: 10578 добавлений и 6951 удалений

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

@ -1,5 +1,25 @@
# Release
## 2023-01-24 - 0.18.3
| Library | Min Version |
| ----------------------------------------------------------------------- | ------------- |
| `@typespec/compiler` | `0.52.0` |
| `@typespec/http` | `0.52.0` |
| `@typespec/rest` | `0.52.0` |
| `@typespec/versioning` | `0.52.0` |
| `@azure-tools/typespec-azure-core` | `0.38.0` |
| `@azure-tools/typespec-client-generator-core` | `0.38.0` |
| `azure-core` dep of generated code | `1.29.5` |
| `corehttp` dep of generated code | `1.0.0b2` |
| `isodate` dep of generated code | `0.6.1` |
| `azure-mgmt-core` dep of generated code (If generating mgmt plane code) | `1.3.2` |
| `typing-extensions` dep of generated code (If generating with constants)| `4.0.1` |
**Other Changes**
- Update typespec dependencies to `0.52.0` #2382
## 2023-01-19 - 0.18.2
| Library | Min Version |

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

@ -1,6 +1,6 @@
{
"name": "@azure-tools/typespec-python",
"version": "0.18.2",
"version": "0.18.3",
"author": "Microsoft Corporation",
"description": "TypeSpec emitter for Python SDKs",
"homepage": "https://github.com/Azure/autorest.python",
@ -42,12 +42,12 @@
"get-autorest-python-path.cjs"
],
"peerDependencies": {
"@azure-tools/typespec-azure-core": ">=0.37.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.37.0 <1.0.0",
"@typespec/compiler": ">=0.51.0 <1.0.0",
"@typespec/http": ">=0.51.0 <1.0.0",
"@typespec/rest": ">=0.51.0 <1.0.0",
"@typespec/versioning": ">=0.51.0 <1.0.0"
"@azure-tools/typespec-azure-core": ">=0.38.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.38.0 <1.0.0",
"@typespec/compiler": ">=0.52.0 <1.0.0",
"@typespec/http": ">=0.52.0 <1.0.0",
"@typespec/rest": ">=0.52.0 <1.0.0",
"@typespec/versioning": ">=0.52.0 <1.0.0"
},
"dependenciesMeta": {
"@azure-tools/typespec-client-generator-core": {
@ -59,25 +59,25 @@
"js-yaml": "~4.1.0"
},
"devDependencies": {
"@azure-tools/typespec-azure-resource-manager": ">=0.37.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.37.0 <1.0.0",
"@azure-tools/typespec-azure-resource-manager": ">=0.38.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.38.0 <1.0.0",
"@azure-tools/cadl-ranch-expect": "~0.11.0",
"@azure-tools/cadl-ranch-specs": "~0.28.7",
"@types/js-yaml": "~4.0.5",
"@types/mocha": "~10.0.1",
"@types/node": "^18.16.3",
"@typespec/eslint-config-typespec": "~0.51.0",
"@typespec/openapi": ">=0.51.0 <1.0.0",
"@typespec/eslint-config-typespec": "~0.52.0",
"@typespec/openapi": ">=0.52.0 <1.0.0",
"c8": "~7.13.0",
"eslint": "^8.44.0",
"mocha": "~10.2.0",
"rimraf": "~5.0.0",
"typescript": "~5.1.3",
"@azure-tools/typespec-azure-core": "~0.37.0",
"@azure-tools/typespec-client-generator-core": "~0.37.0",
"@typespec/compiler": "~0.51.0",
"@typespec/http": "~0.51.0",
"@typespec/rest": "~0.51.0",
"@typespec/versioning": "~0.51.0"
"@azure-tools/typespec-azure-core": "~0.38.0",
"@azure-tools/typespec-client-generator-core": "~0.38.0",
"@typespec/compiler": "~0.52.0",
"@typespec/http": "~0.52.0",
"@typespec/rest": "~0.52.0",
"@typespec/versioning": "~0.52.0"
}
}

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

@ -0,0 +1,12 @@
# coding=utf-8
# pylint: disable=too-many-lines
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import Literal, Union
RepeatabilityResult = Union[Literal["accepted"], Literal["rejected"]]

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

@ -65,6 +65,8 @@ class AzureSphereClient: # pylint: disable=client-accepts-api-version-keyword,t
"2022-09-01-preview". Note that overriding this default value may result in unsupported
behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
def __init__(

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

@ -65,6 +65,8 @@ class AzureSphereClient: # pylint: disable=client-accepts-api-version-keyword,t
"2022-09-01-preview". Note that overriding this default value may result in unsupported
behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
def __init__(

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -6,7 +6,9 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from ._models import ArmOperationStatus
from ._models import ArmResource
from ._models import ArmResourceBase
from ._models import Catalog
from ._models import CatalogProperties
from ._models import CatalogUpdate
@ -57,13 +59,16 @@ from ._enums import OSFeedType
from ._enums import Origin
from ._enums import ProvisioningState
from ._enums import RegionalDataBoundary
from ._enums import ResourceProvisioningState
from ._enums import UpdatePolicy
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import patch_sdk as _patch_sdk
__all__ = [
"ArmOperationStatus",
"ArmResource",
"ArmResourceBase",
"Catalog",
"CatalogProperties",
"CatalogUpdate",
@ -113,6 +118,7 @@ __all__ = [
"Origin",
"ProvisioningState",
"RegionalDataBoundary",
"ResourceProvisioningState",
"UpdatePolicy",
]
__all__.extend([p for p in _patch_all if p not in __all__])

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

@ -164,6 +164,17 @@ class RegionalDataBoundary(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""EU data boundary"""
class ResourceProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The provisioning state of a resource type."""
SUCCEEDED = "Succeeded"
"""Resource has been created."""
FAILED = "Failed"
"""Resource creation failed."""
CANCELED = "Canceled"
"""Resource creation was canceled."""
class UpdatePolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Update policy values."""

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

@ -18,7 +18,65 @@ if TYPE_CHECKING:
from .. import models as _models
class ArmResource(_model_base.Model):
class ArmOperationStatus(_model_base.Model):
"""Standard ARM operation status response.
Readonly variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar status: The operation status. Required. Known values are: "Succeeded", "Failed", and
"Canceled".
:vartype status: str or ~azure.mgmt.spheredpg.models.ResourceProvisioningState
:ivar name: The name of the operationStatus resource.
:vartype name: str
:ivar start_time: Operation start time.
:vartype start_time: ~datetime.datetime
:ivar end_time: Operation complete time.
:vartype end_time: ~datetime.datetime
:ivar percent_complete: The progress made toward completing the operation.
:vartype percent_complete: float
:ivar error: Errors that occurred if the operation ended with Canceled or Failed status.
:vartype error: ~azure.mgmt.spheredpg.models.ErrorDetail
"""
status: Union[str, "_models.ResourceProvisioningState"] = rest_field()
"""The operation status. Required. Known values are: \"Succeeded\", \"Failed\", and \"Canceled\"."""
name: Optional[str] = rest_field(visibility=["read"])
"""The name of the operationStatus resource."""
start_time: Optional[datetime.datetime] = rest_field(name="startTime", visibility=["read"], format="rfc3339")
"""Operation start time."""
end_time: Optional[datetime.datetime] = rest_field(name="endTime", visibility=["read"], format="rfc3339")
"""Operation complete time."""
percent_complete: Optional[float] = rest_field(name="percentComplete", visibility=["read"])
"""The progress made toward completing the operation."""
error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read"])
"""Errors that occurred if the operation ended with Canceled or Failed status."""
@overload
def __init__(
self,
*,
status: Union[str, "_models.ResourceProvisioningState"],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class ArmResourceBase(_model_base.Model):
"""Base class used for type definitions."""
class ArmResource(ArmResourceBase):
"""Common properties for all ARM resources.
Readonly variables are only populated by the server, and will be ignored when sending a request.

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -66,6 +66,8 @@ class AzureSphereClient: # pylint: disable=client-accepts-api-version-keyword,t
"2022-09-01-preview". Note that overriding this default value may result in unsupported
behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
def __init__(

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

@ -66,6 +66,8 @@ class AzureSphereClient: # pylint: disable=client-accepts-api-version-keyword,t
"2022-09-01-preview". Note that overriding this default value may result in unsupported
behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
def __init__(

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -6,7 +6,9 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from ._models import ArmOperationStatus
from ._models import ArmResource
from ._models import ArmResourceBase
from ._models import Catalog
from ._models import CatalogListResult
from ._models import CatalogProperties
@ -66,13 +68,16 @@ from ._enums import OSFeedType
from ._enums import Origin
from ._enums import ProvisioningState
from ._enums import RegionalDataBoundary
from ._enums import ResourceProvisioningState
from ._enums import UpdatePolicy
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import patch_sdk as _patch_sdk
__all__ = [
"ArmOperationStatus",
"ArmResource",
"ArmResourceBase",
"Catalog",
"CatalogListResult",
"CatalogProperties",
@ -131,6 +136,7 @@ __all__ = [
"Origin",
"ProvisioningState",
"RegionalDataBoundary",
"ResourceProvisioningState",
"UpdatePolicy",
]
__all__.extend([p for p in _patch_all if p not in __all__])

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

@ -164,6 +164,17 @@ class RegionalDataBoundary(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""EU data boundary"""
class ResourceProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The provisioning state of a resource type."""
SUCCEEDED = "Succeeded"
"""Resource has been created."""
FAILED = "Failed"
"""Resource creation failed."""
CANCELED = "Canceled"
"""Resource creation was canceled."""
class UpdatePolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Update policy values."""

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

@ -17,7 +17,81 @@ if TYPE_CHECKING:
from .. import models as _models
class ArmResource(_serialization.Model):
class ArmOperationStatus(_serialization.Model):
"""Standard ARM operation status response.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar status: The operation status. Required. Known values are: "Succeeded", "Failed", and
"Canceled".
:vartype status: str or ~azure.mgmt.spheremsrest.models.ResourceProvisioningState
:ivar name: The name of the operationStatus resource.
:vartype name: str
:ivar start_time: Operation start time.
:vartype start_time: ~datetime.datetime
:ivar end_time: Operation complete time.
:vartype end_time: ~datetime.datetime
:ivar percent_complete: The progress made toward completing the operation.
:vartype percent_complete: float
:ivar error: Errors that occurred if the operation ended with Canceled or Failed status.
:vartype error: ~azure.mgmt.spheremsrest.models.ErrorDetail
"""
_validation = {
"status": {"required": True},
}
_attribute_map = {
"status": {"key": "status", "type": "str"},
"name": {"key": "name", "type": "str"},
"start_time": {"key": "startTime", "type": "iso-8601"},
"end_time": {"key": "endTime", "type": "iso-8601"},
"percent_complete": {"key": "percentComplete", "type": "float"},
"error": {"key": "error", "type": "ErrorDetail"},
}
def __init__(
self,
*,
status: Union[str, "_models.ResourceProvisioningState"],
name: Optional[str] = None,
start_time: Optional[datetime.datetime] = None,
end_time: Optional[datetime.datetime] = None,
percent_complete: Optional[float] = None,
error: Optional["_models.ErrorDetail"] = None,
**kwargs: Any
) -> None:
"""
:keyword status: The operation status. Required. Known values are: "Succeeded", "Failed", and
"Canceled".
:paramtype status: str or ~azure.mgmt.spheremsrest.models.ResourceProvisioningState
:keyword name: The name of the operationStatus resource.
:paramtype name: str
:keyword start_time: Operation start time.
:paramtype start_time: ~datetime.datetime
:keyword end_time: Operation complete time.
:paramtype end_time: ~datetime.datetime
:keyword percent_complete: The progress made toward completing the operation.
:paramtype percent_complete: float
:keyword error: Errors that occurred if the operation ended with Canceled or Failed status.
:paramtype error: ~azure.mgmt.spheremsrest.models.ErrorDetail
"""
super().__init__(**kwargs)
self.status = status
self.name = name
self.start_time = start_time
self.end_time = end_time
self.percent_complete = percent_complete
self.error = error
class ArmResourceBase(_serialization.Model):
"""Base class used for type definitions."""
class ArmResource(ArmResourceBase):
"""Common properties for all ARM resources.
Variables are only populated by the server, and will be ignored when sending a request.

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -81,12 +81,12 @@ class StringsOnlyOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
async def get(self, **kwargs: Any) -> _models.GetResponse:
async def get(self, **kwargs: Any) -> _models.GetResponse9:
# pylint: disable=line-too-long
"""get.
:return: GetResponse. The GetResponse is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse
:return: GetResponse9. The GetResponse9 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse9
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -109,7 +109,7 @@ class StringsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse9] = kwargs.pop("cls", None)
_request = build_strings_only_get_request(
headers=_headers,
@ -133,7 +133,7 @@ class StringsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse, response.json())
deserialized = _deserialize(_models.GetResponse9, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -301,11 +301,11 @@ class StringExtensibleOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
async def get(self, **kwargs: Any) -> _models.GetResponse1:
async def get(self, **kwargs: Any) -> _models.GetResponse8:
"""get.
:return: GetResponse1. The GetResponse1 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse1
:return: GetResponse8. The GetResponse8 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse8
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -328,7 +328,7 @@ class StringExtensibleOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse1] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse8] = kwargs.pop("cls", None)
_request = build_string_extensible_get_request(
headers=_headers,
@ -352,7 +352,7 @@ class StringExtensibleOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse1, response.json())
deserialized = _deserialize(_models.GetResponse8, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -512,11 +512,11 @@ class StringExtensibleNamedOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
async def get(self, **kwargs: Any) -> _models.GetResponse2:
async def get(self, **kwargs: Any) -> _models.GetResponse7:
"""get.
:return: GetResponse2. The GetResponse2 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse2
:return: GetResponse7. The GetResponse7 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse7
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -539,7 +539,7 @@ class StringExtensibleNamedOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse2] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse7] = kwargs.pop("cls", None)
_request = build_string_extensible_named_get_request(
headers=_headers,
@ -563,7 +563,7 @@ class StringExtensibleNamedOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse2, response.json())
deserialized = _deserialize(_models.GetResponse7, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -723,11 +723,11 @@ class IntsOnlyOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
async def get(self, **kwargs: Any) -> _models.GetResponse3:
async def get(self, **kwargs: Any) -> _models.GetResponse6:
"""get.
:return: GetResponse3. The GetResponse3 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse3
:return: GetResponse6. The GetResponse6 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse6
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -750,7 +750,7 @@ class IntsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse3] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse6] = kwargs.pop("cls", None)
_request = build_ints_only_get_request(
headers=_headers,
@ -774,7 +774,7 @@ class IntsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse3, response.json())
deserialized = _deserialize(_models.GetResponse6, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -934,11 +934,11 @@ class FloatsOnlyOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
async def get(self, **kwargs: Any) -> _models.GetResponse4:
async def get(self, **kwargs: Any) -> _models.GetResponse5:
"""get.
:return: GetResponse4. The GetResponse4 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse4
:return: GetResponse5. The GetResponse5 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse5
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -961,7 +961,7 @@ class FloatsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse4] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse5] = kwargs.pop("cls", None)
_request = build_floats_only_get_request(
headers=_headers,
@ -985,7 +985,7 @@ class FloatsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse4, response.json())
deserialized = _deserialize(_models.GetResponse5, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1141,11 +1141,11 @@ class ModelsOnlyOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
async def get(self, **kwargs: Any) -> _models.GetResponse5:
async def get(self, **kwargs: Any) -> _models.GetResponse4:
"""get.
:return: GetResponse5. The GetResponse5 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse5
:return: GetResponse4. The GetResponse4 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse4
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -1169,7 +1169,7 @@ class ModelsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse5] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse4] = kwargs.pop("cls", None)
_request = build_models_only_get_request(
headers=_headers,
@ -1193,7 +1193,7 @@ class ModelsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse5, response.json())
deserialized = _deserialize(_models.GetResponse4, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1351,12 +1351,12 @@ class EnumsOnlyOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
async def get(self, **kwargs: Any) -> _models.GetResponse6:
async def get(self, **kwargs: Any) -> _models.GetResponse3:
# pylint: disable=line-too-long
"""get.
:return: GetResponse6. The GetResponse6 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse6
:return: GetResponse3. The GetResponse3 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse3
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -1384,7 +1384,7 @@ class EnumsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse6] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse3] = kwargs.pop("cls", None)
_request = build_enums_only_get_request(
headers=_headers,
@ -1408,7 +1408,7 @@ class EnumsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse6, response.json())
deserialized = _deserialize(_models.GetResponse3, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1576,12 +1576,12 @@ class StringAndArrayOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
async def get(self, **kwargs: Any) -> _models.GetResponse7:
async def get(self, **kwargs: Any) -> _models.GetResponse2:
# pylint: disable=line-too-long
"""get.
:return: GetResponse7. The GetResponse7 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse7
:return: GetResponse2. The GetResponse2 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse2
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -1608,7 +1608,7 @@ class StringAndArrayOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse7] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse2] = kwargs.pop("cls", None)
_request = build_string_and_array_get_request(
headers=_headers,
@ -1632,7 +1632,7 @@ class StringAndArrayOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse7, response.json())
deserialized = _deserialize(_models.GetResponse2, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1798,12 +1798,12 @@ class MixedLiteralsOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
async def get(self, **kwargs: Any) -> _models.GetResponse8:
async def get(self, **kwargs: Any) -> _models.GetResponse1:
# pylint: disable=line-too-long
"""get.
:return: GetResponse8. The GetResponse8 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse8
:return: GetResponse1. The GetResponse1 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse1
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -1838,7 +1838,7 @@ class MixedLiteralsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse8] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse1] = kwargs.pop("cls", None)
_request = build_mixed_literals_get_request(
headers=_headers,
@ -1862,7 +1862,7 @@ class MixedLiteralsOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse8, response.json())
deserialized = _deserialize(_models.GetResponse1, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -2044,11 +2044,11 @@ class MixedTypesOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
async def get(self, **kwargs: Any) -> _models.GetResponse9:
async def get(self, **kwargs: Any) -> _models.GetResponse:
"""get.
:return: GetResponse9. The GetResponse9 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse9
:return: GetResponse. The GetResponse is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -2083,7 +2083,7 @@ class MixedTypesOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse9] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse] = kwargs.pop("cls", None)
_request = build_mixed_types_get_request(
headers=_headers,
@ -2107,7 +2107,7 @@ class MixedTypesOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse9, response.json())
deserialized = _deserialize(_models.GetResponse, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore

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

@ -131,18 +131,18 @@ class GetResponse(_model_base.Model):
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: Literal["a"], Literal["b"], Literal["c"]
:vartype prop: str or str or str
:ivar prop: Required.
:vartype prop: ~typetest.union.models.MixedTypesCases
"""
prop: Union[Literal["a"], Literal["b"], Literal["c"]] = rest_field()
"""Required. Is one of the following types: Literal[\"a\"], Literal[\"b\"], Literal[\"c\"]"""
prop: "_models.MixedTypesCases" = rest_field()
"""Required."""
@overload
def __init__(
self,
*,
prop: Union[Literal["a"], Literal["b"], Literal["c"]],
prop: "_models.MixedTypesCases",
):
...
@ -162,223 +162,6 @@ class GetResponse1(_model_base.Model):
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: str, Literal["b"], Literal["c"]
:vartype prop: str or str or str
"""
prop: Union[str, Literal["b"], Literal["c"]] = rest_field()
"""Required. Is one of the following types: str, Literal[\"b\"], Literal[\"c\"]"""
@overload
def __init__(
self,
*,
prop: Union[str, Literal["b"], Literal["c"]],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse2(_model_base.Model):
"""GetResponse2.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: str, Literal["b"], Literal["c"]
:vartype prop: str or str or str
"""
prop: "_types.StringExtensibleNamedUnion" = rest_field()
"""Required. Is one of the following types: str, Literal[\"b\"], Literal[\"c\"]"""
@overload
def __init__(
self,
*,
prop: "_types.StringExtensibleNamedUnion",
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse3(_model_base.Model):
"""GetResponse3.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: Literal[1], Literal[2], Literal[3]
:vartype prop: int or int or int
"""
prop: Union[Literal[1], Literal[2], Literal[3]] = rest_field()
"""Required. Is one of the following types: Literal[1], Literal[2], Literal[3]"""
@overload
def __init__(
self,
*,
prop: Union[Literal[1], Literal[2], Literal[3]],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse4(_model_base.Model):
"""GetResponse4.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: float, float, float
:vartype prop: float or float or float
"""
prop: Union[float, float, float] = rest_field()
"""Required. Is one of the following types: float, float, float"""
@overload
def __init__(
self,
*,
prop: Union[float, float, float],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse5(_model_base.Model):
"""GetResponse5.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is either a Cat type or a Dog type.
:vartype prop: ~typetest.union.models.Cat or ~typetest.union.models.Dog
"""
prop: Union["_models.Cat", "_models.Dog"] = rest_field()
"""Required. Is either a Cat type or a Dog type."""
@overload
def __init__(
self,
*,
prop: Union["_models.Cat", "_models.Dog"],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse6(_model_base.Model):
"""GetResponse6.
All required parameters must be populated in order to send to server.
:ivar prop: Required.
:vartype prop: ~typetest.union.models.EnumsOnlyCases
"""
prop: "_models.EnumsOnlyCases" = rest_field()
"""Required."""
@overload
def __init__(
self,
*,
prop: "_models.EnumsOnlyCases",
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse7(_model_base.Model):
"""GetResponse7.
All required parameters must be populated in order to send to server.
:ivar prop: Required.
:vartype prop: ~typetest.union.models.StringAndArrayCases
"""
prop: "_models.StringAndArrayCases" = rest_field()
"""Required."""
@overload
def __init__(
self,
*,
prop: "_models.StringAndArrayCases",
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse8(_model_base.Model):
"""GetResponse8.
All required parameters must be populated in order to send to server.
:ivar prop: Required.
:vartype prop: ~typetest.union.models.MixedLiteralsCases
"""
@ -405,23 +188,240 @@ class GetResponse8(_model_base.Model):
super().__init__(*args, **kwargs)
class GetResponse9(_model_base.Model):
"""GetResponse9.
class GetResponse2(_model_base.Model):
"""GetResponse2.
All required parameters must be populated in order to send to server.
:ivar prop: Required.
:vartype prop: ~typetest.union.models.MixedTypesCases
:vartype prop: ~typetest.union.models.StringAndArrayCases
"""
prop: "_models.MixedTypesCases" = rest_field()
prop: "_models.StringAndArrayCases" = rest_field()
"""Required."""
@overload
def __init__(
self,
*,
prop: "_models.MixedTypesCases",
prop: "_models.StringAndArrayCases",
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse3(_model_base.Model):
"""GetResponse3.
All required parameters must be populated in order to send to server.
:ivar prop: Required.
:vartype prop: ~typetest.union.models.EnumsOnlyCases
"""
prop: "_models.EnumsOnlyCases" = rest_field()
"""Required."""
@overload
def __init__(
self,
*,
prop: "_models.EnumsOnlyCases",
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse4(_model_base.Model):
"""GetResponse4.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is either a Cat type or a Dog type.
:vartype prop: ~typetest.union.models.Cat or ~typetest.union.models.Dog
"""
prop: Union["_models.Cat", "_models.Dog"] = rest_field()
"""Required. Is either a Cat type or a Dog type."""
@overload
def __init__(
self,
*,
prop: Union["_models.Cat", "_models.Dog"],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse5(_model_base.Model):
"""GetResponse5.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: float, float, float
:vartype prop: float or float or float
"""
prop: Union[float, float, float] = rest_field()
"""Required. Is one of the following types: float, float, float"""
@overload
def __init__(
self,
*,
prop: Union[float, float, float],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse6(_model_base.Model):
"""GetResponse6.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: Literal[1], Literal[2], Literal[3]
:vartype prop: int or int or int
"""
prop: Union[Literal[1], Literal[2], Literal[3]] = rest_field()
"""Required. Is one of the following types: Literal[1], Literal[2], Literal[3]"""
@overload
def __init__(
self,
*,
prop: Union[Literal[1], Literal[2], Literal[3]],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse7(_model_base.Model):
"""GetResponse7.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: str, Literal["b"], Literal["c"]
:vartype prop: str or str or str
"""
prop: "_types.StringExtensibleNamedUnion" = rest_field()
"""Required. Is one of the following types: str, Literal[\"b\"], Literal[\"c\"]"""
@overload
def __init__(
self,
*,
prop: "_types.StringExtensibleNamedUnion",
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse8(_model_base.Model):
"""GetResponse8.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: str, Literal["b"], Literal["c"]
:vartype prop: str or str or str
"""
prop: Union[str, Literal["b"], Literal["c"]] = rest_field()
"""Required. Is one of the following types: str, Literal[\"b\"], Literal[\"c\"]"""
@overload
def __init__(
self,
*,
prop: Union[str, Literal["b"], Literal["c"]],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse9(_model_base.Model):
"""GetResponse9.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: Literal["a"], Literal["b"], Literal["c"]
:vartype prop: str or str or str
"""
prop: Union[Literal["a"], Literal["b"], Literal["c"]] = rest_field()
"""Required. Is one of the following types: Literal[\"a\"], Literal[\"b\"], Literal[\"c\"]"""
@overload
def __init__(
self,
*,
prop: Union[Literal["a"], Literal["b"], Literal["c"]],
):
...

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

@ -343,12 +343,12 @@ class StringsOnlyOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
def get(self, **kwargs: Any) -> _models.GetResponse:
def get(self, **kwargs: Any) -> _models.GetResponse9:
# pylint: disable=line-too-long
"""get.
:return: GetResponse. The GetResponse is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse
:return: GetResponse9. The GetResponse9 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse9
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -371,7 +371,7 @@ class StringsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse9] = kwargs.pop("cls", None)
_request = build_strings_only_get_request(
headers=_headers,
@ -395,7 +395,7 @@ class StringsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse, response.json())
deserialized = _deserialize(_models.GetResponse9, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -563,11 +563,11 @@ class StringExtensibleOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
def get(self, **kwargs: Any) -> _models.GetResponse1:
def get(self, **kwargs: Any) -> _models.GetResponse8:
"""get.
:return: GetResponse1. The GetResponse1 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse1
:return: GetResponse8. The GetResponse8 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse8
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -590,7 +590,7 @@ class StringExtensibleOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse1] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse8] = kwargs.pop("cls", None)
_request = build_string_extensible_get_request(
headers=_headers,
@ -614,7 +614,7 @@ class StringExtensibleOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse1, response.json())
deserialized = _deserialize(_models.GetResponse8, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -774,11 +774,11 @@ class StringExtensibleNamedOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
def get(self, **kwargs: Any) -> _models.GetResponse2:
def get(self, **kwargs: Any) -> _models.GetResponse7:
"""get.
:return: GetResponse2. The GetResponse2 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse2
:return: GetResponse7. The GetResponse7 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse7
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -801,7 +801,7 @@ class StringExtensibleNamedOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse2] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse7] = kwargs.pop("cls", None)
_request = build_string_extensible_named_get_request(
headers=_headers,
@ -825,7 +825,7 @@ class StringExtensibleNamedOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse2, response.json())
deserialized = _deserialize(_models.GetResponse7, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -985,11 +985,11 @@ class IntsOnlyOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
def get(self, **kwargs: Any) -> _models.GetResponse3:
def get(self, **kwargs: Any) -> _models.GetResponse6:
"""get.
:return: GetResponse3. The GetResponse3 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse3
:return: GetResponse6. The GetResponse6 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse6
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -1012,7 +1012,7 @@ class IntsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse3] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse6] = kwargs.pop("cls", None)
_request = build_ints_only_get_request(
headers=_headers,
@ -1036,7 +1036,7 @@ class IntsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse3, response.json())
deserialized = _deserialize(_models.GetResponse6, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1196,11 +1196,11 @@ class FloatsOnlyOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
def get(self, **kwargs: Any) -> _models.GetResponse4:
def get(self, **kwargs: Any) -> _models.GetResponse5:
"""get.
:return: GetResponse4. The GetResponse4 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse4
:return: GetResponse5. The GetResponse5 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse5
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -1223,7 +1223,7 @@ class FloatsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse4] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse5] = kwargs.pop("cls", None)
_request = build_floats_only_get_request(
headers=_headers,
@ -1247,7 +1247,7 @@ class FloatsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse4, response.json())
deserialized = _deserialize(_models.GetResponse5, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1403,11 +1403,11 @@ class ModelsOnlyOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
def get(self, **kwargs: Any) -> _models.GetResponse5:
def get(self, **kwargs: Any) -> _models.GetResponse4:
"""get.
:return: GetResponse5. The GetResponse5 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse5
:return: GetResponse4. The GetResponse4 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse4
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -1431,7 +1431,7 @@ class ModelsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse5] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse4] = kwargs.pop("cls", None)
_request = build_models_only_get_request(
headers=_headers,
@ -1455,7 +1455,7 @@ class ModelsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse5, response.json())
deserialized = _deserialize(_models.GetResponse4, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1613,12 +1613,12 @@ class EnumsOnlyOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
def get(self, **kwargs: Any) -> _models.GetResponse6:
def get(self, **kwargs: Any) -> _models.GetResponse3:
# pylint: disable=line-too-long
"""get.
:return: GetResponse6. The GetResponse6 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse6
:return: GetResponse3. The GetResponse3 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse3
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -1646,7 +1646,7 @@ class EnumsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse6] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse3] = kwargs.pop("cls", None)
_request = build_enums_only_get_request(
headers=_headers,
@ -1670,7 +1670,7 @@ class EnumsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse6, response.json())
deserialized = _deserialize(_models.GetResponse3, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1838,12 +1838,12 @@ class StringAndArrayOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
def get(self, **kwargs: Any) -> _models.GetResponse7:
def get(self, **kwargs: Any) -> _models.GetResponse2:
# pylint: disable=line-too-long
"""get.
:return: GetResponse7. The GetResponse7 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse7
:return: GetResponse2. The GetResponse2 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse2
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -1870,7 +1870,7 @@ class StringAndArrayOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse7] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse2] = kwargs.pop("cls", None)
_request = build_string_and_array_get_request(
headers=_headers,
@ -1894,7 +1894,7 @@ class StringAndArrayOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse7, response.json())
deserialized = _deserialize(_models.GetResponse2, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -2060,12 +2060,12 @@ class MixedLiteralsOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
def get(self, **kwargs: Any) -> _models.GetResponse8:
def get(self, **kwargs: Any) -> _models.GetResponse1:
# pylint: disable=line-too-long
"""get.
:return: GetResponse8. The GetResponse8 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse8
:return: GetResponse1. The GetResponse1 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse1
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -2100,7 +2100,7 @@ class MixedLiteralsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse8] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse1] = kwargs.pop("cls", None)
_request = build_mixed_literals_get_request(
headers=_headers,
@ -2124,7 +2124,7 @@ class MixedLiteralsOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse8, response.json())
deserialized = _deserialize(_models.GetResponse1, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -2306,11 +2306,11 @@ class MixedTypesOperations:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
def get(self, **kwargs: Any) -> _models.GetResponse9:
def get(self, **kwargs: Any) -> _models.GetResponse:
"""get.
:return: GetResponse9. The GetResponse9 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse9
:return: GetResponse. The GetResponse is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse
:raises ~azure.core.exceptions.HttpResponseError:
Example:
@ -2345,7 +2345,7 @@ class MixedTypesOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse9] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse] = kwargs.pop("cls", None)
_request = build_mixed_types_get_request(
headers=_headers,
@ -2369,7 +2369,7 @@ class MixedTypesOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse9, response.json())
deserialized = _deserialize(_models.GetResponse, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore

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

@ -79,12 +79,12 @@ class StringsOnlyOperations:
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")
async def get(self, **kwargs: Any) -> _models.GetResponse:
async def get(self, **kwargs: Any) -> _models.GetResponse9:
# pylint: disable=line-too-long
"""get.
:return: GetResponse. The GetResponse is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse
:return: GetResponse9. The GetResponse9 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse9
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -107,7 +107,7 @@ class StringsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse9] = kwargs.pop("cls", None)
_request = build_strings_only_get_request(
headers=_headers,
@ -131,7 +131,7 @@ class StringsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse, response.json())
deserialized = _deserialize(_models.GetResponse9, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -297,11 +297,11 @@ class StringExtensibleOperations:
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")
async def get(self, **kwargs: Any) -> _models.GetResponse1:
async def get(self, **kwargs: Any) -> _models.GetResponse8:
"""get.
:return: GetResponse1. The GetResponse1 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse1
:return: GetResponse8. The GetResponse8 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse8
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -324,7 +324,7 @@ class StringExtensibleOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse1] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse8] = kwargs.pop("cls", None)
_request = build_string_extensible_get_request(
headers=_headers,
@ -348,7 +348,7 @@ class StringExtensibleOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse1, response.json())
deserialized = _deserialize(_models.GetResponse8, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -506,11 +506,11 @@ class StringExtensibleNamedOperations:
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")
async def get(self, **kwargs: Any) -> _models.GetResponse2:
async def get(self, **kwargs: Any) -> _models.GetResponse7:
"""get.
:return: GetResponse2. The GetResponse2 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse2
:return: GetResponse7. The GetResponse7 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse7
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -533,7 +533,7 @@ class StringExtensibleNamedOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse2] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse7] = kwargs.pop("cls", None)
_request = build_string_extensible_named_get_request(
headers=_headers,
@ -557,7 +557,7 @@ class StringExtensibleNamedOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse2, response.json())
deserialized = _deserialize(_models.GetResponse7, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -715,11 +715,11 @@ class IntsOnlyOperations:
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")
async def get(self, **kwargs: Any) -> _models.GetResponse3:
async def get(self, **kwargs: Any) -> _models.GetResponse6:
"""get.
:return: GetResponse3. The GetResponse3 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse3
:return: GetResponse6. The GetResponse6 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse6
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -742,7 +742,7 @@ class IntsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse3] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse6] = kwargs.pop("cls", None)
_request = build_ints_only_get_request(
headers=_headers,
@ -766,7 +766,7 @@ class IntsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse3, response.json())
deserialized = _deserialize(_models.GetResponse6, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -924,11 +924,11 @@ class FloatsOnlyOperations:
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")
async def get(self, **kwargs: Any) -> _models.GetResponse4:
async def get(self, **kwargs: Any) -> _models.GetResponse5:
"""get.
:return: GetResponse4. The GetResponse4 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse4
:return: GetResponse5. The GetResponse5 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse5
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -951,7 +951,7 @@ class FloatsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse4] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse5] = kwargs.pop("cls", None)
_request = build_floats_only_get_request(
headers=_headers,
@ -975,7 +975,7 @@ class FloatsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse4, response.json())
deserialized = _deserialize(_models.GetResponse5, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1129,11 +1129,11 @@ class ModelsOnlyOperations:
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")
async def get(self, **kwargs: Any) -> _models.GetResponse5:
async def get(self, **kwargs: Any) -> _models.GetResponse4:
"""get.
:return: GetResponse5. The GetResponse5 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse5
:return: GetResponse4. The GetResponse4 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse4
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -1157,7 +1157,7 @@ class ModelsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse5] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse4] = kwargs.pop("cls", None)
_request = build_models_only_get_request(
headers=_headers,
@ -1181,7 +1181,7 @@ class ModelsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse5, response.json())
deserialized = _deserialize(_models.GetResponse4, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1337,12 +1337,12 @@ class EnumsOnlyOperations:
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")
async def get(self, **kwargs: Any) -> _models.GetResponse6:
async def get(self, **kwargs: Any) -> _models.GetResponse3:
# pylint: disable=line-too-long
"""get.
:return: GetResponse6. The GetResponse6 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse6
:return: GetResponse3. The GetResponse3 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse3
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -1370,7 +1370,7 @@ class EnumsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse6] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse3] = kwargs.pop("cls", None)
_request = build_enums_only_get_request(
headers=_headers,
@ -1394,7 +1394,7 @@ class EnumsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse6, response.json())
deserialized = _deserialize(_models.GetResponse3, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1560,12 +1560,12 @@ class StringAndArrayOperations:
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")
async def get(self, **kwargs: Any) -> _models.GetResponse7:
async def get(self, **kwargs: Any) -> _models.GetResponse2:
# pylint: disable=line-too-long
"""get.
:return: GetResponse7. The GetResponse7 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse7
:return: GetResponse2. The GetResponse2 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse2
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -1592,7 +1592,7 @@ class StringAndArrayOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse7] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse2] = kwargs.pop("cls", None)
_request = build_string_and_array_get_request(
headers=_headers,
@ -1616,7 +1616,7 @@ class StringAndArrayOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse7, response.json())
deserialized = _deserialize(_models.GetResponse2, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1780,12 +1780,12 @@ class MixedLiteralsOperations:
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")
async def get(self, **kwargs: Any) -> _models.GetResponse8:
async def get(self, **kwargs: Any) -> _models.GetResponse1:
# pylint: disable=line-too-long
"""get.
:return: GetResponse8. The GetResponse8 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse8
:return: GetResponse1. The GetResponse1 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse1
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -1820,7 +1820,7 @@ class MixedLiteralsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse8] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse1] = kwargs.pop("cls", None)
_request = build_mixed_literals_get_request(
headers=_headers,
@ -1844,7 +1844,7 @@ class MixedLiteralsOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse8, response.json())
deserialized = _deserialize(_models.GetResponse1, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -2024,11 +2024,11 @@ class MixedTypesOperations:
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")
async def get(self, **kwargs: Any) -> _models.GetResponse9:
async def get(self, **kwargs: Any) -> _models.GetResponse:
"""get.
:return: GetResponse9. The GetResponse9 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse9
:return: GetResponse. The GetResponse is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -2063,7 +2063,7 @@ class MixedTypesOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse9] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse] = kwargs.pop("cls", None)
_request = build_mixed_types_get_request(
headers=_headers,
@ -2087,7 +2087,7 @@ class MixedTypesOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse9, response.json())
deserialized = _deserialize(_models.GetResponse, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore

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

@ -131,18 +131,18 @@ class GetResponse(_model_base.Model):
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: Literal["a"], Literal["b"], Literal["c"]
:vartype prop: str or str or str
:ivar prop: Required.
:vartype prop: ~typetest.union.models.MixedTypesCases
"""
prop: Union[Literal["a"], Literal["b"], Literal["c"]] = rest_field()
"""Required. Is one of the following types: Literal[\"a\"], Literal[\"b\"], Literal[\"c\"]"""
prop: "_models.MixedTypesCases" = rest_field()
"""Required."""
@overload
def __init__(
self,
*,
prop: Union[Literal["a"], Literal["b"], Literal["c"]],
prop: "_models.MixedTypesCases",
):
...
@ -162,223 +162,6 @@ class GetResponse1(_model_base.Model):
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: str, Literal["b"], Literal["c"]
:vartype prop: str or str or str
"""
prop: Union[str, Literal["b"], Literal["c"]] = rest_field()
"""Required. Is one of the following types: str, Literal[\"b\"], Literal[\"c\"]"""
@overload
def __init__(
self,
*,
prop: Union[str, Literal["b"], Literal["c"]],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse2(_model_base.Model):
"""GetResponse2.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: str, Literal["b"], Literal["c"]
:vartype prop: str or str or str
"""
prop: "_types.StringExtensibleNamedUnion" = rest_field()
"""Required. Is one of the following types: str, Literal[\"b\"], Literal[\"c\"]"""
@overload
def __init__(
self,
*,
prop: "_types.StringExtensibleNamedUnion",
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse3(_model_base.Model):
"""GetResponse3.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: Literal[1], Literal[2], Literal[3]
:vartype prop: int or int or int
"""
prop: Union[Literal[1], Literal[2], Literal[3]] = rest_field()
"""Required. Is one of the following types: Literal[1], Literal[2], Literal[3]"""
@overload
def __init__(
self,
*,
prop: Union[Literal[1], Literal[2], Literal[3]],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse4(_model_base.Model):
"""GetResponse4.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: float, float, float
:vartype prop: float or float or float
"""
prop: Union[float, float, float] = rest_field()
"""Required. Is one of the following types: float, float, float"""
@overload
def __init__(
self,
*,
prop: Union[float, float, float],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse5(_model_base.Model):
"""GetResponse5.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is either a Cat type or a Dog type.
:vartype prop: ~typetest.union.models.Cat or ~typetest.union.models.Dog
"""
prop: Union["_models.Cat", "_models.Dog"] = rest_field()
"""Required. Is either a Cat type or a Dog type."""
@overload
def __init__(
self,
*,
prop: Union["_models.Cat", "_models.Dog"],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse6(_model_base.Model):
"""GetResponse6.
All required parameters must be populated in order to send to server.
:ivar prop: Required.
:vartype prop: ~typetest.union.models.EnumsOnlyCases
"""
prop: "_models.EnumsOnlyCases" = rest_field()
"""Required."""
@overload
def __init__(
self,
*,
prop: "_models.EnumsOnlyCases",
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse7(_model_base.Model):
"""GetResponse7.
All required parameters must be populated in order to send to server.
:ivar prop: Required.
:vartype prop: ~typetest.union.models.StringAndArrayCases
"""
prop: "_models.StringAndArrayCases" = rest_field()
"""Required."""
@overload
def __init__(
self,
*,
prop: "_models.StringAndArrayCases",
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse8(_model_base.Model):
"""GetResponse8.
All required parameters must be populated in order to send to server.
:ivar prop: Required.
:vartype prop: ~typetest.union.models.MixedLiteralsCases
"""
@ -405,23 +188,240 @@ class GetResponse8(_model_base.Model):
super().__init__(*args, **kwargs)
class GetResponse9(_model_base.Model):
"""GetResponse9.
class GetResponse2(_model_base.Model):
"""GetResponse2.
All required parameters must be populated in order to send to server.
:ivar prop: Required.
:vartype prop: ~typetest.union.models.MixedTypesCases
:vartype prop: ~typetest.union.models.StringAndArrayCases
"""
prop: "_models.MixedTypesCases" = rest_field()
prop: "_models.StringAndArrayCases" = rest_field()
"""Required."""
@overload
def __init__(
self,
*,
prop: "_models.MixedTypesCases",
prop: "_models.StringAndArrayCases",
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse3(_model_base.Model):
"""GetResponse3.
All required parameters must be populated in order to send to server.
:ivar prop: Required.
:vartype prop: ~typetest.union.models.EnumsOnlyCases
"""
prop: "_models.EnumsOnlyCases" = rest_field()
"""Required."""
@overload
def __init__(
self,
*,
prop: "_models.EnumsOnlyCases",
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse4(_model_base.Model):
"""GetResponse4.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is either a Cat type or a Dog type.
:vartype prop: ~typetest.union.models.Cat or ~typetest.union.models.Dog
"""
prop: Union["_models.Cat", "_models.Dog"] = rest_field()
"""Required. Is either a Cat type or a Dog type."""
@overload
def __init__(
self,
*,
prop: Union["_models.Cat", "_models.Dog"],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse5(_model_base.Model):
"""GetResponse5.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: float, float, float
:vartype prop: float or float or float
"""
prop: Union[float, float, float] = rest_field()
"""Required. Is one of the following types: float, float, float"""
@overload
def __init__(
self,
*,
prop: Union[float, float, float],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse6(_model_base.Model):
"""GetResponse6.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: Literal[1], Literal[2], Literal[3]
:vartype prop: int or int or int
"""
prop: Union[Literal[1], Literal[2], Literal[3]] = rest_field()
"""Required. Is one of the following types: Literal[1], Literal[2], Literal[3]"""
@overload
def __init__(
self,
*,
prop: Union[Literal[1], Literal[2], Literal[3]],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse7(_model_base.Model):
"""GetResponse7.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: str, Literal["b"], Literal["c"]
:vartype prop: str or str or str
"""
prop: "_types.StringExtensibleNamedUnion" = rest_field()
"""Required. Is one of the following types: str, Literal[\"b\"], Literal[\"c\"]"""
@overload
def __init__(
self,
*,
prop: "_types.StringExtensibleNamedUnion",
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse8(_model_base.Model):
"""GetResponse8.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: str, Literal["b"], Literal["c"]
:vartype prop: str or str or str
"""
prop: Union[str, Literal["b"], Literal["c"]] = rest_field()
"""Required. Is one of the following types: str, Literal[\"b\"], Literal[\"c\"]"""
@overload
def __init__(
self,
*,
prop: Union[str, Literal["b"], Literal["c"]],
):
...
@overload
def __init__(self, mapping: Mapping[str, Any]):
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
super().__init__(*args, **kwargs)
class GetResponse9(_model_base.Model):
"""GetResponse9.
All required parameters must be populated in order to send to server.
:ivar prop: Required. Is one of the following types: Literal["a"], Literal["b"], Literal["c"]
:vartype prop: str or str or str
"""
prop: Union[Literal["a"], Literal["b"], Literal["c"]] = rest_field()
"""Required. Is one of the following types: Literal[\"a\"], Literal[\"b\"], Literal[\"c\"]"""
@overload
def __init__(
self,
*,
prop: Union[Literal["a"], Literal["b"], Literal["c"]],
):
...

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

@ -341,12 +341,12 @@ class StringsOnlyOperations:
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")
def get(self, **kwargs: Any) -> _models.GetResponse:
def get(self, **kwargs: Any) -> _models.GetResponse9:
# pylint: disable=line-too-long
"""get.
:return: GetResponse. The GetResponse is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse
:return: GetResponse9. The GetResponse9 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse9
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -369,7 +369,7 @@ class StringsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse9] = kwargs.pop("cls", None)
_request = build_strings_only_get_request(
headers=_headers,
@ -393,7 +393,7 @@ class StringsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse, response.json())
deserialized = _deserialize(_models.GetResponse9, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -559,11 +559,11 @@ class StringExtensibleOperations:
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")
def get(self, **kwargs: Any) -> _models.GetResponse1:
def get(self, **kwargs: Any) -> _models.GetResponse8:
"""get.
:return: GetResponse1. The GetResponse1 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse1
:return: GetResponse8. The GetResponse8 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse8
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -586,7 +586,7 @@ class StringExtensibleOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse1] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse8] = kwargs.pop("cls", None)
_request = build_string_extensible_get_request(
headers=_headers,
@ -610,7 +610,7 @@ class StringExtensibleOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse1, response.json())
deserialized = _deserialize(_models.GetResponse8, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -768,11 +768,11 @@ class StringExtensibleNamedOperations:
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")
def get(self, **kwargs: Any) -> _models.GetResponse2:
def get(self, **kwargs: Any) -> _models.GetResponse7:
"""get.
:return: GetResponse2. The GetResponse2 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse2
:return: GetResponse7. The GetResponse7 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse7
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -795,7 +795,7 @@ class StringExtensibleNamedOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse2] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse7] = kwargs.pop("cls", None)
_request = build_string_extensible_named_get_request(
headers=_headers,
@ -819,7 +819,7 @@ class StringExtensibleNamedOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse2, response.json())
deserialized = _deserialize(_models.GetResponse7, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -977,11 +977,11 @@ class IntsOnlyOperations:
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")
def get(self, **kwargs: Any) -> _models.GetResponse3:
def get(self, **kwargs: Any) -> _models.GetResponse6:
"""get.
:return: GetResponse3. The GetResponse3 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse3
:return: GetResponse6. The GetResponse6 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse6
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -1004,7 +1004,7 @@ class IntsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse3] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse6] = kwargs.pop("cls", None)
_request = build_ints_only_get_request(
headers=_headers,
@ -1028,7 +1028,7 @@ class IntsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse3, response.json())
deserialized = _deserialize(_models.GetResponse6, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1186,11 +1186,11 @@ class FloatsOnlyOperations:
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")
def get(self, **kwargs: Any) -> _models.GetResponse4:
def get(self, **kwargs: Any) -> _models.GetResponse5:
"""get.
:return: GetResponse4. The GetResponse4 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse4
:return: GetResponse5. The GetResponse5 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse5
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -1213,7 +1213,7 @@ class FloatsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse4] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse5] = kwargs.pop("cls", None)
_request = build_floats_only_get_request(
headers=_headers,
@ -1237,7 +1237,7 @@ class FloatsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse4, response.json())
deserialized = _deserialize(_models.GetResponse5, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1391,11 +1391,11 @@ class ModelsOnlyOperations:
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")
def get(self, **kwargs: Any) -> _models.GetResponse5:
def get(self, **kwargs: Any) -> _models.GetResponse4:
"""get.
:return: GetResponse5. The GetResponse5 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse5
:return: GetResponse4. The GetResponse4 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse4
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -1419,7 +1419,7 @@ class ModelsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse5] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse4] = kwargs.pop("cls", None)
_request = build_models_only_get_request(
headers=_headers,
@ -1443,7 +1443,7 @@ class ModelsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse5, response.json())
deserialized = _deserialize(_models.GetResponse4, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1599,12 +1599,12 @@ class EnumsOnlyOperations:
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")
def get(self, **kwargs: Any) -> _models.GetResponse6:
def get(self, **kwargs: Any) -> _models.GetResponse3:
# pylint: disable=line-too-long
"""get.
:return: GetResponse6. The GetResponse6 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse6
:return: GetResponse3. The GetResponse3 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse3
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -1632,7 +1632,7 @@ class EnumsOnlyOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse6] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse3] = kwargs.pop("cls", None)
_request = build_enums_only_get_request(
headers=_headers,
@ -1656,7 +1656,7 @@ class EnumsOnlyOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse6, response.json())
deserialized = _deserialize(_models.GetResponse3, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -1822,12 +1822,12 @@ class StringAndArrayOperations:
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")
def get(self, **kwargs: Any) -> _models.GetResponse7:
def get(self, **kwargs: Any) -> _models.GetResponse2:
# pylint: disable=line-too-long
"""get.
:return: GetResponse7. The GetResponse7 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse7
:return: GetResponse2. The GetResponse2 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse2
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -1854,7 +1854,7 @@ class StringAndArrayOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse7] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse2] = kwargs.pop("cls", None)
_request = build_string_and_array_get_request(
headers=_headers,
@ -1878,7 +1878,7 @@ class StringAndArrayOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse7, response.json())
deserialized = _deserialize(_models.GetResponse2, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -2042,12 +2042,12 @@ class MixedLiteralsOperations:
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")
def get(self, **kwargs: Any) -> _models.GetResponse8:
def get(self, **kwargs: Any) -> _models.GetResponse1:
# pylint: disable=line-too-long
"""get.
:return: GetResponse8. The GetResponse8 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse8
:return: GetResponse1. The GetResponse1 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse1
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -2082,7 +2082,7 @@ class MixedLiteralsOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse8] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse1] = kwargs.pop("cls", None)
_request = build_mixed_literals_get_request(
headers=_headers,
@ -2106,7 +2106,7 @@ class MixedLiteralsOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse8, response.json())
deserialized = _deserialize(_models.GetResponse1, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@ -2286,11 +2286,11 @@ class MixedTypesOperations:
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")
def get(self, **kwargs: Any) -> _models.GetResponse9:
def get(self, **kwargs: Any) -> _models.GetResponse:
"""get.
:return: GetResponse9. The GetResponse9 is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse9
:return: GetResponse. The GetResponse is compatible with MutableMapping
:rtype: ~typetest.union.models.GetResponse
:raises ~corehttp.exceptions.HttpResponseError:
Example:
@ -2325,7 +2325,7 @@ class MixedTypesOperations:
_headers = kwargs.pop("headers", {}) or {}
_params = kwargs.pop("params", {}) or {}
cls: ClsType[_models.GetResponse9] = kwargs.pop("cls", None)
cls: ClsType[_models.GetResponse] = kwargs.pop("cls", None)
_request = build_mixed_types_get_request(
headers=_headers,
@ -2349,7 +2349,7 @@ class MixedTypesOperations:
if _stream:
deserialized = response.iter_bytes()
else:
deserialized = _deserialize(_models.GetResponse9, response.json())
deserialized = _deserialize(_models.GetResponse, response.json())
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore

Разница между файлами не показана из-за своего большого размера Загрузить разницу