Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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_extensions import Required, TypedDict


class InvalidAuth(TypedDict, total=False):
"""InvalidAuth.

:ivar error: Required.
:vartype error: str
"""

error: Required[str]
"""Required."""

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new file is not referred by any model/operation.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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_extensions import Required, TypedDict


class InvalidAuth(TypedDict, total=False):
"""InvalidAuth.

:ivar error: Required.
:vartype error: str
"""

error: Required[str]
"""Required."""
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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_extensions import Required, TypedDict


class InvalidAuth(TypedDict, total=False):
"""InvalidAuth.

:ivar error: Required.
:vartype error: str
"""

error: Required[str]
"""Required."""
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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
from typing_extensions import Required, TypedDict


class BaseModel(TypedDict, total=False):
"""Used in internal operations, should be generated but not exported.

:ivar name: Required.
:vartype name: str
"""

name: Required[str]
"""Required."""


class InnerModel(TypedDict, total=False):
"""Used in internal operations, should be generated but not exported.

:ivar name: Required.
:vartype name: str
"""

name: Required[str]
"""Required."""


class InternalDecoratorModelInInternal(TypedDict, total=False):
"""Used in an internal operation, should be generated but not exported.

:ivar name: Required.
:vartype name: str
"""

name: Required[str]
"""Required."""


class NoDecoratorModelInInternal(TypedDict, total=False):
"""Used in an internal operation, should be generated but not exported.

:ivar name: Required.
:vartype name: str
"""

name: Required[str]
"""Required."""


class NoDecoratorModelInPublic(TypedDict, total=False):
"""Used in a public operation, should be generated and exported.

:ivar name: Required.
:vartype name: str
"""

name: Required[str]
"""Required."""


class OuterModel(BaseModel):
"""Used in internal operations, should be generated but not exported.

:ivar name: Required.
:vartype name: str
:ivar inner: Required.
:vartype inner: ~specs.azure.clientgenerator.core.access.models._models.InnerModel
"""

inner: Required["InnerModel"]
"""Required."""


class PublicDecoratorModelInInternal(TypedDict, total=False):
"""Used in an internal operation but with public decorator, should be generated and exported.

:ivar name: Required.
:vartype name: str
"""

name: Required[str]
"""Required."""


class PublicDecoratorModelInPublic(TypedDict, total=False):
"""Used in a public operation, should be generated and exported.

:ivar name: Required.
:vartype name: str
"""

name: Required[str]
"""Required."""


class RealModel(TypedDict, total=False):
"""Used in internal operations, should be generated but not exported.

:ivar name: Required.
:vartype name: str
:ivar kind: Required. Default value is "real".
:vartype kind: str
"""

name: Required[str]
"""Required."""
kind: Required[Literal["real"]]
"""Required. Default value is \"real\"."""


class SharedModel(TypedDict, total=False):
"""Used by both public and internal operation. It should be generated and exported.

:ivar name: Required.
:vartype name: str
"""

name: Required[str]
"""Required."""


AbstractModel = Union[RealModel]
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from azure.core.tracing.decorator_async import distributed_trace_async
from azure.core.utils import case_insensitive_dict

from ... import models as _models
from ... import models as _models, types as _types
from ..._utils.model_base import SdkJSONEncoder, _deserialize
from ..._utils.serialization import Deserializer, Serializer
from ...operations._operations import (
Expand All @@ -39,7 +39,6 @@
)
from .._configuration import AlternateTypeClientConfiguration

JSON = MutableMapping[str, Any]
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]

Expand Down Expand Up @@ -244,11 +243,13 @@ async def put_property(
"""

@overload
async def put_property(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None:
async def put_property(
self, body: _types.ModelWithFeatureProperty, *, content_type: str = "application/json", **kwargs: Any
) -> None:
"""put_property.

:param body: Required.
:type body: JSON
:type body: ~specs.azure.clientgenerator.core.alternatetype.types.ModelWithFeatureProperty
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
Expand All @@ -272,12 +273,14 @@ async def put_property(self, body: IO[bytes], *, content_type: str = "applicatio
"""

@distributed_trace_async
async def put_property(self, body: Union[_models.ModelWithFeatureProperty, JSON, IO[bytes]], **kwargs: Any) -> None:
async def put_property(
self, body: Union[_models.ModelWithFeatureProperty, _types.ModelWithFeatureProperty, IO[bytes]], **kwargs: Any
) -> None:
"""put_property.

:param body: Is one of the following types: ModelWithFeatureProperty, JSON, IO[bytes] Required.
:param body: Is either a ModelWithFeatureProperty type or a IO[bytes] type. Required.
:type body: ~specs.azure.clientgenerator.core.alternatetype.models.ModelWithFeatureProperty or
JSON or IO[bytes]
~specs.azure.clientgenerator.core.alternatetype.types.ModelWithFeatureProperty or IO[bytes]
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@
from azure.core.tracing.decorator import distributed_trace
from azure.core.utils import case_insensitive_dict

from .. import models as _models
from .. import models as _models, types as _types
from .._configuration import AlternateTypeClientConfiguration
from .._utils.model_base import SdkJSONEncoder, _deserialize
from .._utils.serialization import Deserializer, Serializer

JSON = MutableMapping[str, Any]
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]]

Expand Down Expand Up @@ -296,11 +295,13 @@ def put_property(
"""

@overload
def put_property(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> None:
def put_property(
self, body: _types.ModelWithFeatureProperty, *, content_type: str = "application/json", **kwargs: Any
) -> None:
"""put_property.

:param body: Required.
:type body: JSON
:type body: ~specs.azure.clientgenerator.core.alternatetype.types.ModelWithFeatureProperty
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
Expand All @@ -325,13 +326,13 @@ def put_property(self, body: IO[bytes], *, content_type: str = "application/json

@distributed_trace
def put_property( # pylint: disable=inconsistent-return-statements
self, body: Union[_models.ModelWithFeatureProperty, JSON, IO[bytes]], **kwargs: Any
self, body: Union[_models.ModelWithFeatureProperty, _types.ModelWithFeatureProperty, IO[bytes]], **kwargs: Any
) -> None:
"""put_property.

:param body: Is one of the following types: ModelWithFeatureProperty, JSON, IO[bytes] Required.
:param body: Is either a ModelWithFeatureProperty type or a IO[bytes] type. Required.
:type body: ~specs.azure.clientgenerator.core.alternatetype.models.ModelWithFeatureProperty or
JSON or IO[bytes]
~specs.azure.clientgenerator.core.alternatetype.types.ModelWithFeatureProperty or IO[bytes]
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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_extensions import Required, TypedDict

import geojson


class Geometry(TypedDict, total=False):
"""Geometry.

:ivar type: Required.
:vartype type: str
:ivar coordinates: Required.
:vartype coordinates: list[float]
"""

type: Required[str]
"""Required."""
coordinates: Required[list[float]]
"""Required."""


class ModelWithFeatureProperty(TypedDict, total=False):
"""ModelWithFeatureProperty.

:ivar feature: Required.
:vartype feature: ~geojson.Feature
:ivar additional_property: Required.
:vartype additional_property: str
"""

feature: Required[geojson.Feature]
"""Required."""
additionalProperty: Required[str]
"""Required."""
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@
from azure.core.tracing.decorator import distributed_trace
from azure.core.utils import case_insensitive_dict

from .. import models as _models
from .. import models as _models, types as _types
from .._configuration import ClientDefaultValueClientConfiguration
from .._utils.model_base import SdkJSONEncoder, _deserialize
from .._utils.serialization import Serializer
from .._utils.utils import ClientMixinABC

JSON = MutableMapping[str, Any]
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]]

Expand Down Expand Up @@ -133,12 +132,12 @@ def put_model_property(

@overload
def put_model_property(
self, body: JSON, *, content_type: str = "application/json", **kwargs: Any
self, body: _types.ModelWithDefaultValues, *, content_type: str = "application/json", **kwargs: Any
) -> _models.ModelWithDefaultValues:
"""put_model_property.

:param body: Required.
:type body: JSON
:type body: ~specs.azure.clientgenerator.core.clientdefaultvalue.types.ModelWithDefaultValues
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
Expand All @@ -165,13 +164,14 @@ def put_model_property(

@distributed_trace
def put_model_property(
self, body: Union[_models.ModelWithDefaultValues, JSON, IO[bytes]], **kwargs: Any
self, body: Union[_models.ModelWithDefaultValues, _types.ModelWithDefaultValues, IO[bytes]], **kwargs: Any
) -> _models.ModelWithDefaultValues:
"""put_model_property.

:param body: Is one of the following types: ModelWithDefaultValues, JSON, IO[bytes] Required.
:param body: Is either a ModelWithDefaultValues type or a IO[bytes] type. Required.
:type body: ~specs.azure.clientgenerator.core.clientdefaultvalue.models.ModelWithDefaultValues
or JSON or IO[bytes]
or ~specs.azure.clientgenerator.core.clientdefaultvalue.types.ModelWithDefaultValues or
IO[bytes]
:return: ModelWithDefaultValues. The ModelWithDefaultValues is compatible with MutableMapping
:rtype: ~specs.azure.clientgenerator.core.clientdefaultvalue.models.ModelWithDefaultValues
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down
Loading