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
Expand Up @@ -158,7 +158,15 @@ def _is_readonly(p):


class SdkJSONEncoder(JSONEncoder):
"""A JSON encoder that's capable of serializing datetime objects and bytes."""
"""A JSON encoder that's capable of serializing datetime objects and bytes.

:param args: Additional positional arguments passed to the base ``JSONEncoder``.
:type args: typing.Any
:keyword exclude_readonly: Whether to exclude readonly properties. Defaults to False.
:paramtype exclude_readonly: bool
:keyword format: The format to use for serialization. Defaults to None.
:paramtype format: typing.Optional[str]
"""

def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs):
super().__init__(*args, **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,11 @@ def _decode_attribute_map_key(key):


class Serializer: # pylint: disable=too-many-public-methods
"""Request object model serializer."""
"""Request object model serializer.
:param classes: Mapping of model names to model types, used to resolve models during serialization.
:type classes: typing.Optional[typing.Mapping[str, type]]
"""

basic_types = {str: "str", int: "int", bool: "bool", float: "float"}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class InvalidAuth(_Model):

:ivar error: Required.
:vartype error: str
:keyword error: Required.
:paramtype error: str

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.

duplicated docstring about error and may be caused by microsoft/typespec#11197

"""

error: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,15 @@ def _is_readonly(p):


class SdkJSONEncoder(JSONEncoder):
"""A JSON encoder that's capable of serializing datetime objects and bytes."""
"""A JSON encoder that's capable of serializing datetime objects and bytes.

:param args: Additional positional arguments passed to the base ``JSONEncoder``.
:type args: typing.Any
:keyword exclude_readonly: Whether to exclude readonly properties. Defaults to False.
:paramtype exclude_readonly: bool
:keyword format: The format to use for serialization. Defaults to None.
:paramtype format: typing.Optional[str]
"""

def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs):
super().__init__(*args, **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,11 @@ def _decode_attribute_map_key(key):


class Serializer: # pylint: disable=too-many-public-methods
"""Request object model serializer."""
"""Request object model serializer.
:param classes: Mapping of model names to model types, used to resolve models during serialization.
:type classes: typing.Optional[typing.Mapping[str, type]]
"""

basic_types = {str: "str", int: "int", bool: "bool", float: "float"}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class InvalidAuth(_Model):

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

error: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,15 @@ def _is_readonly(p):


class SdkJSONEncoder(JSONEncoder):
"""A JSON encoder that's capable of serializing datetime objects and bytes."""
"""A JSON encoder that's capable of serializing datetime objects and bytes.

:param args: Additional positional arguments passed to the base ``JSONEncoder``.
:type args: typing.Any
:keyword exclude_readonly: Whether to exclude readonly properties. Defaults to False.
:paramtype exclude_readonly: bool
:keyword format: The format to use for serialization. Defaults to None.
:paramtype format: typing.Optional[str]
"""

def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs):
super().__init__(*args, **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,11 @@ def _decode_attribute_map_key(key):


class Serializer: # pylint: disable=too-many-public-methods
"""Request object model serializer."""
"""Request object model serializer.
:param classes: Mapping of model names to model types, used to resolve models during serialization.
:type classes: typing.Optional[typing.Mapping[str, type]]
"""

basic_types = {str: "str", int: "int", bool: "bool", float: "float"}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,15 @@ def _is_readonly(p):


class SdkJSONEncoder(JSONEncoder):
"""A JSON encoder that's capable of serializing datetime objects and bytes."""
"""A JSON encoder that's capable of serializing datetime objects and bytes.

:param args: Additional positional arguments passed to the base ``JSONEncoder``.
:type args: typing.Any
:keyword exclude_readonly: Whether to exclude readonly properties. Defaults to False.
:paramtype exclude_readonly: bool
:keyword format: The format to use for serialization. Defaults to None.
:paramtype format: typing.Optional[str]
"""

def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs):
super().__init__(*args, **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,11 @@ def _decode_attribute_map_key(key):


class Serializer: # pylint: disable=too-many-public-methods
"""Request object model serializer."""
"""Request object model serializer.
:param classes: Mapping of model names to model types, used to resolve models during serialization.
:type classes: typing.Optional[typing.Mapping[str, type]]
"""

basic_types = {str: "str", int: "int", bool: "bool", float: "float"}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class InvalidAuth(_Model):

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

error: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,15 @@ def _is_readonly(p):


class SdkJSONEncoder(JSONEncoder):
"""A JSON encoder that's capable of serializing datetime objects and bytes."""
"""A JSON encoder that's capable of serializing datetime objects and bytes.

:param args: Additional positional arguments passed to the base ``JSONEncoder``.
:type args: typing.Any
:keyword exclude_readonly: Whether to exclude readonly properties. Defaults to False.
:paramtype exclude_readonly: bool
:keyword format: The format to use for serialization. Defaults to None.
:paramtype format: typing.Optional[str]
"""

def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs):
super().__init__(*args, **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,11 @@ def _decode_attribute_map_key(key):


class Serializer: # pylint: disable=too-many-public-methods
"""Request object model serializer."""
"""Request object model serializer.
:param classes: Mapping of model names to model types, used to resolve models during serialization.
:type classes: typing.Optional[typing.Mapping[str, type]]
"""

basic_types = {str: "str", int: "int", bool: "bool", float: "float"}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,15 @@ def _is_readonly(p):


class SdkJSONEncoder(JSONEncoder):
"""A JSON encoder that's capable of serializing datetime objects and bytes."""
"""A JSON encoder that's capable of serializing datetime objects and bytes.

:param args: Additional positional arguments passed to the base ``JSONEncoder``.
:type args: typing.Any
:keyword exclude_readonly: Whether to exclude readonly properties. Defaults to False.
:paramtype exclude_readonly: bool
:keyword format: The format to use for serialization. Defaults to None.
:paramtype format: typing.Optional[str]
"""

def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs):
super().__init__(*args, **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,11 @@ def _decode_attribute_map_key(key):


class Serializer: # pylint: disable=too-many-public-methods
"""Request object model serializer."""
"""Request object model serializer.
:param classes: Mapping of model names to model types, used to resolve models during serialization.
:type classes: typing.Optional[typing.Mapping[str, type]]
"""

basic_types = {str: "str", int: "int", bool: "bool", float: "float"}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]


class PublicOperationOperations:
class PublicOperationOperations: # pylint: disable=docstring-missing-param
"""
.. warning::
**DO NOT** instantiate this class directly.
Expand Down Expand Up @@ -183,7 +183,7 @@ async def public_decorator_in_public(self, *, name: str, **kwargs: Any) -> _mode
return deserialized # type: ignore


class InternalOperationOperations:
class InternalOperationOperations: # pylint: disable=docstring-missing-param
"""
.. warning::
**DO NOT** instantiate this class directly.
Expand Down Expand Up @@ -395,7 +395,7 @@ async def _public_decorator_in_internal(
return deserialized # type: ignore


class SharedModelInOperationOperations:
class SharedModelInOperationOperations: # pylint: disable=docstring-missing-param
"""
.. warning::
**DO NOT** instantiate this class directly.
Expand Down Expand Up @@ -533,7 +533,7 @@ async def _internal(self, *, name: str, **kwargs: Any) -> _models.SharedModel:
return deserialized # type: ignore


class RelativeModelInOperationOperations:
class RelativeModelInOperationOperations: # pylint: disable=docstring-missing-param
"""
.. warning::
**DO NOT** instantiate this class directly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ class AbstractModel(_Model):
:vartype kind: str
:ivar name: Required.
:vartype name: str
:keyword kind: Discriminator property for AbstractModel. Required. Default value is None.
:paramtype kind: str
:keyword name: Required.
:paramtype name: str
"""

__mapping__: dict[str, _Model] = {}
Expand Down Expand Up @@ -58,6 +62,8 @@ class BaseModel(_Model):

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

name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
Expand Down Expand Up @@ -86,6 +92,8 @@ class InnerModel(_Model):

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

name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
Expand Down Expand Up @@ -114,6 +122,8 @@ class InternalDecoratorModelInInternal(_Model):

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

name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
Expand Down Expand Up @@ -142,6 +152,8 @@ class NoDecoratorModelInInternal(_Model):

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

name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
Expand Down Expand Up @@ -170,6 +182,8 @@ class NoDecoratorModelInPublic(_Model):

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

name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
Expand Down Expand Up @@ -200,6 +214,10 @@ class OuterModel(BaseModel):
:vartype name: str
:ivar inner: Required.
:vartype inner: ~specs.azure.clientgenerator.core.access.models._models.InnerModel
:keyword name: Required.
:paramtype name: str
:keyword inner: Required.
:paramtype inner: ~specs.azure.clientgenerator.core.access.models._models.InnerModel
"""

inner: "_models._models.InnerModel" = rest_field(visibility=["read", "create", "update", "delete", "query"])
Expand Down Expand Up @@ -229,6 +247,8 @@ class PublicDecoratorModelInInternal(_Model):

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

name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
Expand Down Expand Up @@ -257,6 +277,8 @@ class PublicDecoratorModelInPublic(_Model):

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

name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
Expand Down Expand Up @@ -287,6 +309,8 @@ class RealModel(AbstractModel, discriminator="real"):
:vartype name: str
:ivar kind: Required. Default value is "real".
:vartype kind: str
:keyword name: Required.
:paramtype name: str
"""

kind: Literal["real"] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
Expand Down Expand Up @@ -316,6 +340,8 @@ class SharedModel(_Model):

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

name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def build_relative_model_in_operation_discriminator_request( # pylint: disable=
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)


class PublicOperationOperations:
class PublicOperationOperations: # pylint: disable=docstring-missing-param
"""
.. warning::
**DO NOT** instantiate this class directly.
Expand Down Expand Up @@ -356,7 +356,7 @@ def public_decorator_in_public(self, *, name: str, **kwargs: Any) -> _models.Pub
return deserialized # type: ignore


class InternalOperationOperations:
class InternalOperationOperations: # pylint: disable=docstring-missing-param
"""
.. warning::
**DO NOT** instantiate this class directly.
Expand Down Expand Up @@ -564,7 +564,7 @@ def _public_decorator_in_internal(self, *, name: str, **kwargs: Any) -> _models.
return deserialized # type: ignore


class SharedModelInOperationOperations:
class SharedModelInOperationOperations: # pylint: disable=docstring-missing-param
"""
.. warning::
**DO NOT** instantiate this class directly.
Expand Down Expand Up @@ -702,7 +702,7 @@ def _internal(self, *, name: str, **kwargs: Any) -> _models.SharedModel:
return deserialized # type: ignore


class RelativeModelInOperationOperations:
class RelativeModelInOperationOperations: # pylint: disable=docstring-missing-param
"""
.. warning::
**DO NOT** instantiate this class directly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,15 @@ def _is_readonly(p):


class SdkJSONEncoder(JSONEncoder):
"""A JSON encoder that's capable of serializing datetime objects and bytes."""
"""A JSON encoder that's capable of serializing datetime objects and bytes.

:param args: Additional positional arguments passed to the base ``JSONEncoder``.
:type args: typing.Any
:keyword exclude_readonly: Whether to exclude readonly properties. Defaults to False.
:paramtype exclude_readonly: bool
:keyword format: The format to use for serialization. Defaults to None.
:paramtype format: typing.Optional[str]
"""

def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs):
super().__init__(*args, **kwargs)
Expand Down
Loading