Server Test Python

Server Test Python

rev. c67de0508e9d33923e47fd7281531eeca95f7996 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/python/json_rpc10/aws_lambda/__init__.pyi

@@ -1,0 +143,0 @@
    1         -
import typing
    2         -
    3         -
class ClientApplication:
    4         -
    """
    5         -
    AWS Mobile SDK client fields.
    6         -
    """
    7         -
    8         -
    app_package_name: str
    9         -
    """
   10         -
    The package name for the mobile application invoking the function
   11         -
    """
   12         -
   13         -
    app_title: str
   14         -
    """
   15         -
    The app title for the mobile app as registered with AWS' mobile services.
   16         -
    """
   17         -
   18         -
    app_version_code: str
   19         -
    """
   20         -
    The app version code.
   21         -
    """
   22         -
   23         -
    app_version_name: str
   24         -
    """
   25         -
    The version name of the application as registered with AWS' mobile services.
   26         -
    """
   27         -
   28         -
    installation_id: str
   29         -
    """
   30         -
    The mobile app installation id
   31         -
    """
   32         -
   33         -
class ClientContext:
   34         -
    """
   35         -
    Client context sent by the AWS Mobile SDK.
   36         -
    """
   37         -
   38         -
    client: ClientApplication
   39         -
    """
   40         -
    Information about the mobile application invoking the function.
   41         -
    """
   42         -
   43         -
    custom: typing.Dict[str, str]
   44         -
    """
   45         -
    Custom properties attached to the mobile event context.
   46         -
    """
   47         -
   48         -
    environment: typing.Dict[str, str]
   49         -
    """
   50         -
    Environment settings from the mobile client.
   51         -
    """
   52         -
   53         -
class CognitoIdentity:
   54         -
    """
   55         -
    Cognito identity information sent with the event
   56         -
    """
   57         -
   58         -
    identity_id: str
   59         -
    """
   60         -
    The unique identity id for the Cognito credentials invoking the function.
   61         -
    """
   62         -
   63         -
    identity_pool_id: str
   64         -
    """
   65         -
    The identity pool id the caller is "registered" with.
   66         -
    """
   67         -
   68         -
class Config:
   69         -
    """
   70         -
    Configuration derived from environment variables.
   71         -
    """
   72         -
   73         -
    function_name: str
   74         -
    """
   75         -
    The name of the function.
   76         -
    """
   77         -
   78         -
    log_group: str
   79         -
    """
   80         -
    The name of the Amazon CloudWatch Logs group for the function.
   81         -
    """
   82         -
   83         -
    log_stream: str
   84         -
    """
   85         -
    The name of the Amazon CloudWatch Logs stream for the function.
   86         -
    """
   87         -
   88         -
    memory: int
   89         -
    """
   90         -
    The amount of memory available to the function in MB.
   91         -
    """
   92         -
   93         -
    version: str
   94         -
    """
   95         -
    The version of the function being executed.
   96         -
    """
   97         -
   98         -
class LambdaContext:
   99         -
    """
  100         -
    The Lambda function execution context. The values in this struct
  101         -
    are populated using the [Lambda environment variables](https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html)
  102         -
    and the headers returned by the poll request to the Runtime APIs.
  103         -
    """
  104         -
  105         -
    client_context: typing.Optional[ClientContext]
  106         -
    """
  107         -
    The client context object sent by the AWS mobile SDK. This field is
  108         -
    empty unless the function is invoked using an AWS mobile SDK.
  109         -
    """
  110         -
  111         -
    deadline: int
  112         -
    """
  113         -
    The execution deadline for the current invocation in milliseconds.
  114         -
    """
  115         -
  116         -
    env_config: Config
  117         -
    """
  118         -
    Lambda function configuration from the local environment variables.
  119         -
    Includes information such as the function name, memory allocation,
  120         -
    version, and log streams.
  121         -
    """
  122         -
  123         -
    identity: typing.Optional[CognitoIdentity]
  124         -
    """
  125         -
    The Cognito identity that invoked the function. This field is empty
  126         -
    unless the invocation request to the Lambda APIs was made using AWS
  127         -
    credentials issues by Amazon Cognito Identity Pools.
  128         -
    """
  129         -
  130         -
    invoked_function_arn: str
  131         -
    """
  132         -
    The ARN of the Lambda function being invoked.
  133         -
    """
  134         -
  135         -
    request_id: str
  136         -
    """
  137         -
    The AWS request ID generated by the Lambda service.
  138         -
    """
  139         -
  140         -
    xray_trace_id: typing.Optional[str]
  141         -
    """
  142         -
    The X-Ray trace ID for the current invocation.
  143         -
    """

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/python/json_rpc10/error/__init__.pyi

@@ -1,0 +61,0 @@
    1         -
import json_rpc10.model
    2         -
import typing
    3         -
    4         -
class ComplexError(Exception):
    5         -
    """
    6         -
    This error is thrown when a request is invalid.
    7         -
    """
    8         -
    9         -
    nested: typing.Optional[json_rpc10.model.ComplexNestedErrorData]
   10         -
   11         -
    top_level: typing.Optional[str]
   12         -
   13         -
    def __init__(self, top_level: typing.Optional[str] = ..., nested: typing.Optional[json_rpc10.model.ComplexNestedErrorData] = ...) -> None:
   14         -
        ...
   15         -
   16         -
   17         -
class FooError(Exception):
   18         -
    """
   19         -
    This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
   20         -
    """
   21         -
   22         -
    def __init__(self) -> None:
   23         -
        ...
   24         -
   25         -
   26         -
class InternalServerError(Exception):
   27         -
    message: str
   28         -
   29         -
    def __init__(self, message: str) -> None:
   30         -
        ...
   31         -
   32         -
   33         -
class InvalidGreeting(Exception):
   34         -
    """
   35         -
    This error is thrown when an invalid greeting value is provided.
   36         -
    """
   37         -
   38         -
    message: typing.Optional[str]
   39         -
   40         -
    def __init__(self, message: typing.Optional[str] = ...) -> None:
   41         -
        ...
   42         -
   43         -
   44         -
class ValidationException(Exception):
   45         -
    """
   46         -
    A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
   47         -
    """
   48         -
   49         -
    field_list: typing.Optional[typing.List[json_rpc10.model.ValidationExceptionField]]
   50         -
    """
   51         -
    A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
   52         -
    """
   53         -
   54         -
    message: str
   55         -
    """
   56         -
    A summary of the validation failure.
   57         -
    """
   58         -
   59         -
    def __init__(self, message: str, field_list: typing.Optional[typing.List[json_rpc10.model.ValidationExceptionField]] = ...) -> None:
   60         -
        ...
   61         -

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/python/json_rpc10/input/__init__.pyi

@@ -1,0 +111,0 @@
    1         -
import json_rpc10.model
    2         -
import typing
    3         -
    4         -
class ContentTypeParametersInput:
    5         -
    value: typing.Optional[int]
    6         -
    7         -
    def __init__(self, value: typing.Optional[int] = ...) -> None:
    8         -
        ...
    9         -
   10         -
   11         -
class EmptyInputAndEmptyOutputInput:
   12         -
    def __init__(self) -> None:
   13         -
        ...
   14         -
   15         -
   16         -
class EndpointOperationInput:
   17         -
    def __init__(self) -> None:
   18         -
        ...
   19         -
   20         -
   21         -
class EndpointWithHostLabelOperationInput:
   22         -
    label: str
   23         -
   24         -
    def __init__(self, label: str) -> None:
   25         -
        ...
   26         -
   27         -
   28         -
class GreetingWithErrorsInput:
   29         -
    greeting: typing.Optional[str]
   30         -
   31         -
    def __init__(self, greeting: typing.Optional[str] = ...) -> None:
   32         -
        ...
   33         -
   34         -
   35         -
class HostWithPathOperationInput:
   36         -
    def __init__(self) -> None:
   37         -
        ...
   38         -
   39         -
   40         -
class JsonUnionsInput:
   41         -
    contents: typing.Optional[json_rpc10.model.MyUnion]
   42         -
    """
   43         -
    A union with a representative set of types for members.
   44         -
    """
   45         -
   46         -
    def __init__(self, contents: typing.Optional[json_rpc10.model.MyUnion] = ...) -> None:
   47         -
        ...
   48         -
   49         -
   50         -
class NoInputAndNoOutputInput:
   51         -
    def __init__(self) -> None:
   52         -
        ...
   53         -
   54         -
   55         -
class NoInputAndOutputInput:
   56         -
    def __init__(self) -> None:
   57         -
        ...
   58         -
   59         -
   60         -
class OperationWithDefaultsInput:
   61         -
    client_optional_defaults: typing.Optional[json_rpc10.model.ClientOptionalDefaults]
   62         -
   63         -
    defaults: typing.Optional[json_rpc10.model.Defaults]
   64         -
   65         -
    other_top_level_default: int
   66         -
   67         -
    top_level_default: str
   68         -
   69         -
    def __init__(self, top_level_default: str, other_top_level_default: int, defaults: typing.Optional[json_rpc10.model.Defaults] = ..., client_optional_defaults: typing.Optional[json_rpc10.model.ClientOptionalDefaults] = ...) -> None:
   70         -
        ...
   71         -
   72         -
   73         -
class OperationWithNestedStructureInput:
   74         -
    top_level: json_rpc10.model.TopLevel
   75         -
   76         -
    def __init__(self, top_level: json_rpc10.model.TopLevel) -> None:
   77         -
        ...
   78         -
   79         -
   80         -
class OperationWithRequiredMembersInput:
   81         -
    def __init__(self) -> None:
   82         -
        ...
   83         -
   84         -
   85         -
class OperationWithRequiredMembersWithDefaultsInput:
   86         -
    def __init__(self) -> None:
   87         -
        ...
   88         -
   89         -
   90         -
class PutWithContentEncodingInput:
   91         -
    data: typing.Optional[str]
   92         -
   93         -
    encoding: typing.Optional[str]
   94         -
   95         -
    def __init__(self, encoding: typing.Optional[str] = ..., data: typing.Optional[str] = ...) -> None:
   96         -
        ...
   97         -
   98         -
   99         -
class QueryIncompatibleOperationInput:
  100         -
    def __init__(self) -> None:
  101         -
        ...
  102         -
  103         -
  104         -
class SimpleScalarPropertiesInput:
  105         -
    double_value: typing.Optional[float]
  106         -
  107         -
    float_value: typing.Optional[float]
  108         -
  109         -
    def __init__(self, float_value: typing.Optional[float] = ..., double_value: typing.Optional[float] = ...) -> None:
  110         -
        ...
  111         -

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/python/json_rpc10/logging/__init__.pyi

@@ -1,0 +26,0 @@
    1         -
import pathlib
    2         -
import typing
    3         -
    4         -
class TracingHandler:
    5         -
    """
    6         -
    Modifies the Python `logging` module to deliver its log messages using [tracing::Subscriber] events.
    7         -
    8         -
    To achieve this goal, the following changes are made to the module:
    9         -
    - A new builtin function `logging.py_tracing_event` transcodes `logging.LogRecord`s to `tracing::Event`s. This function
   10         -
      is not exported in `logging.__all__`, as it is not intended to be called directly.
   11         -
    - A new class `logging.TracingHandler` provides a `logging.Handler` that delivers all records to `python_tracing`.
   12         -
    """
   13         -
   14         -
    def handler(self) -> typing.Any:
   15         -
        ...
   16         -
   17         -
   18         -
    def __init__(self, level: typing.Optional[int] = ..., logfile: typing.Optional[pathlib.Path] = ..., format: typing.Optional[typing.Literal['compact', 'pretty', 'json']] = ...) -> None:
   19         -
        ...
   20         -
   21         -
   22         -
def py_tracing_event() -> None:
   23         -
    """
   24         -
    Consumes a Python `logging.LogRecord` and emits a Rust [tracing::Event] instead.
   25         -
    """
   26         -
    ...

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/python/json_rpc10/middleware/__init__.pyi

@@ -1,0 +78,0 @@
    1         -
import typing
    2         -
    3         -
class MiddlewareException(Exception):
    4         -
    """
    5         -
    Exception that can be thrown from a Python middleware.
    6         -
    7         -
    It allows to specify a message and HTTP status code and implementing protocol specific capabilities
    8         -
    to build a [aws_smithy_http_server::response::Response] from it.
    9         -
    """
   10         -
   11         -
    message: str
   12         -
   13         -
    status_code: int
   14         -
   15         -
    def __init__(self, message: str, status_code: typing.Optional[int] = ...) -> None:
   16         -
        ...
   17         -
   18         -
   19         -
class Request:
   20         -
    """
   21         -
    Python-compatible [Request] object.
   22         -
    """
   23         -
   24         -
    body: typing.Awaitable[bytes]
   25         -
    """
   26         -
    Return the HTTP body of this request.
   27         -
    Note that this is a costly operation because the whole request body is cloned.
   28         -
    """
   29         -
   30         -
    headers: typing.MutableMapping[str, str]
   31         -
    """
   32         -
    Return the HTTP headers of this request.
   33         -
    """
   34         -
   35         -
    method: str
   36         -
    """
   37         -
    Return the HTTP method of this request.
   38         -
    """
   39         -
   40         -
    uri: str
   41         -
    """
   42         -
    Return the URI of this request.
   43         -
    """
   44         -
   45         -
    version: str
   46         -
    """
   47         -
    Return the HTTP version of this request.
   48         -
    """
   49         -
   50         -
class Response:
   51         -
    """
   52         -
    Python-compatible [Response] object.
   53         -
    """
   54         -
   55         -
    body: typing.Awaitable[bytes]
   56         -
    """
   57         -
    Return the HTTP body of this response.
   58         -
    Note that this is a costly operation because the whole response body is cloned.
   59         -
    """
   60         -
   61         -
    headers: typing.MutableMapping[str, str]
   62         -
    """
   63         -
    Return the HTTP headers of this response.
   64         -
    """
   65         -
   66         -
    status: int
   67         -
    """
   68         -
    Return the HTTP status of this response.
   69         -
    """
   70         -
   71         -
    version: str
   72         -
    """
   73         -
    Return the HTTP version of this response.
   74         -
    """
   75         -
   76         -
    def __init__(self, status: int, headers: typing.Optional[typing.Dict[str, str]] = ..., body: typing.Optional[bytes] = ...) -> None:
   77         -
        ...
   78         -

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/python/json_rpc10/model/__init__.pyi

@@ -1,0 +391,0 @@
    1         -
import json_rpc10.model
    2         -
import json_rpc10.types
    3         -
import typing
    4         -
    5         -
class ClientOptionalDefaults:
    6         -
    member: int
    7         -
    8         -
    def __init__(self, member: int) -> None:
    9         -
        ...
   10         -
   11         -
   12         -
class ComplexNestedErrorData:
   13         -
    foo: typing.Optional[str]
   14         -
   15         -
    def __init__(self, foo: typing.Optional[str] = ...) -> None:
   16         -
        ...
   17         -
   18         -
   19         -
class Defaults:
   20         -
    default_blob: json_rpc10.types.Blob
   21         -
   22         -
    default_boolean: bool
   23         -
   24         -
    default_byte: int
   25         -
   26         -
    default_document_boolean: json_rpc10.types.Document
   27         -
   28         -
    default_document_list: json_rpc10.types.Document
   29         -
   30         -
    default_document_map: json_rpc10.types.Document
   31         -
   32         -
    default_document_string: json_rpc10.types.Document
   33         -
   34         -
    default_double: float
   35         -
   36         -
    default_enum: json_rpc10.model.TestEnum
   37         -
   38         -
    default_float: float
   39         -
   40         -
    default_int_enum: int
   41         -
   42         -
    default_integer: int
   43         -
   44         -
    default_list: typing.List[str]
   45         -
   46         -
    default_long: int
   47         -
   48         -
    default_map: typing.Dict[str, str]
   49         -
   50         -
    default_null_document: typing.Optional[json_rpc10.types.Document]
   51         -
   52         -
    default_short: int
   53         -
   54         -
    default_string: str
   55         -
   56         -
    default_timestamp: json_rpc10.types.DateTime
   57         -
   58         -
    empty_blob: json_rpc10.types.Blob
   59         -
   60         -
    empty_string: str
   61         -
   62         -
    false_boolean: bool
   63         -
   64         -
    zero_byte: int
   65         -
   66         -
    zero_double: float
   67         -
   68         -
    zero_float: float
   69         -
   70         -
    zero_integer: int
   71         -
   72         -
    zero_long: int
   73         -
   74         -
    zero_short: int
   75         -
   76         -
    def __init__(self, default_string: str, default_boolean: bool, default_list: typing.List[str], default_document_map: json_rpc10.types.Document, default_document_string: json_rpc10.types.Document, default_document_boolean: json_rpc10.types.Document, default_document_list: json_rpc10.types.Document, default_timestamp: json_rpc10.types.DateTime, default_blob: json_rpc10.types.Blob, default_byte: int, default_short: int, default_integer: int, default_long: int, default_float: float, default_double: float, default_map: typing.Dict[str, str], default_enum: json_rpc10.model.TestEnum, default_int_enum: int, empty_string: str, false_boolean: bool, empty_blob: json_rpc10.types.Blob, zero_byte: int, zero_short: int, zero_integer: int, zero_long: int, zero_float: float, zero_double: float, default_null_document: typing.Optional[json_rpc10.types.Document] = ...) -> None:
   77         -
        ...
   78         -
   79         -
   80         -
class Dialog:
   81         -
    farewell: typing.Optional[json_rpc10.model.Farewell]
   82         -
   83         -
    greeting: str
   84         -
   85         -
    language: typing.Optional[str]
   86         -
   87         -
    def __init__(self, greeting: str, language: typing.Optional[str] = ..., farewell: typing.Optional[json_rpc10.model.Farewell] = ...) -> None:
   88         -
        ...
   89         -
   90         -
   91         -
class Farewell:
   92         -
    phrase: str
   93         -
   94         -
    def __init__(self, phrase: str) -> None:
   95         -
        ...
   96         -
   97         -
   98         -
class FooEnum:
   99         -
    Bar: FooEnum
  100         -
  101         -
    Baz: FooEnum
  102         -
  103         -
    Foo: FooEnum
  104         -
  105         -
    One: FooEnum
  106         -
  107         -
    Zero: FooEnum
  108         -
  109         -
    name: typing.Any
  110         -
  111         -
    value: typing.Any
  112         -
  113         -
class GreetingStruct:
  114         -
    hi: typing.Optional[str]
  115         -
  116         -
    def __init__(self, hi: typing.Optional[str] = ...) -> None:
  117         -
        ...
  118         -
  119         -
  120         -
class MyUnion:
  121         -
    def as_blob_value(self) -> json_rpc10.types.Blob:
  122         -
        """
  123         -
        Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
  124         -
        """
  125         -
        ...
  126         -
  127         -
  128         -
    def as_boolean_value(self) -> bool:
  129         -
        """
  130         -
        Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
  131         -
        """
  132         -
        ...
  133         -
  134         -
  135         -
    def as_enum_value(self) -> json_rpc10.model.FooEnum:
  136         -
        """
  137         -
        Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
  138         -
        """
  139         -
        ...
  140         -
  141         -
  142         -
    def as_int_enum_value(self) -> int:
  143         -
        """
  144         -
        Tries to convert the enum instance into [`IntEnumValue`](crate::model::MyUnion::IntEnumValue), extracting the inner [`i32`](i32).
  145         -
        """
  146         -
        ...
  147         -
  148         -
  149         -
    def as_list_value(self) -> typing.List[str]:
  150         -
        """
  151         -
        Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
  152         -
        """
  153         -
        ...
  154         -
  155         -
  156         -
    def as_map_value(self) -> typing.Dict[str, str]:
  157         -
        """
  158         -
        Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
  159         -
        """
  160         -
        ...
  161         -
  162         -
  163         -
    def as_number_value(self) -> int:
  164         -
        """
  165         -
        Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
  166         -
        """
  167         -
        ...
  168         -
  169         -
  170         -
    def as_string_value(self) -> str:
  171         -
        """
  172         -
        Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
  173         -
        """
  174         -
        ...
  175         -
  176         -
  177         -
    def as_structure_value(self) -> json_rpc10.model.GreetingStruct:
  178         -
        """
  179         -
        Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
  180         -
        """
  181         -
        ...
  182         -
  183         -
  184         -
    def as_timestamp_value(self) -> json_rpc10.types.DateTime:
  185         -
        """
  186         -
        Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
  187         -
        """
  188         -
        ...
  189         -
  190         -
  191         -
    @staticmethod
  192         -
    def blob_value(data: json_rpc10.types.Blob) -> MyUnion:
  193         -
        """
  194         -
        Creates a new union instance of [`BlobValue`](crate::model::MyUnion::BlobValue)
  195         -
        """
  196         -
        ...
  197         -
  198         -
  199         -
    @staticmethod
  200         -
    def boolean_value(data: bool) -> MyUnion:
  201         -
        """
  202         -
        Creates a new union instance of [`BooleanValue`](crate::model::MyUnion::BooleanValue)
  203         -
        """
  204         -
        ...
  205         -
  206         -
  207         -
    @staticmethod
  208         -
    def enum_value(data: json_rpc10.model.FooEnum) -> MyUnion:
  209         -
        """
  210         -
        Creates a new union instance of [`EnumValue`](crate::model::MyUnion::EnumValue)
  211         -
        """
  212         -
        ...
  213         -
  214         -
  215         -
    @staticmethod
  216         -
    def int_enum_value(data: int) -> MyUnion:
  217         -
        """
  218         -
        Creates a new union instance of [`IntEnumValue`](crate::model::MyUnion::IntEnumValue)
  219         -
        """
  220         -
        ...
  221         -
  222         -
  223         -
    def is_blob_value(self) -> bool:
  224         -
        """
  225         -
        Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
  226         -
        """
  227         -
        ...
  228         -
  229         -
  230         -
    def is_boolean_value(self) -> bool:
  231         -
        """
  232         -
        Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
  233         -
        """
  234         -
        ...
  235         -
  236         -
  237         -
    def is_enum_value(self) -> bool:
  238         -
        """
  239         -
        Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
  240         -
        """
  241         -
        ...
  242         -
  243         -
  244         -
    def is_int_enum_value(self) -> bool:
  245         -
        """
  246         -
        Returns true if this is a [`IntEnumValue`](crate::model::MyUnion::IntEnumValue).
  247         -
        """
  248         -
        ...
  249         -
  250         -
  251         -
    def is_list_value(self) -> bool:
  252         -
        """
  253         -
        Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
  254         -
        """
  255         -
        ...
  256         -
  257         -
  258         -
    def is_map_value(self) -> bool:
  259         -
        """
  260         -
        Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
  261         -
        """
  262         -
        ...
  263         -
  264         -
  265         -
    def is_number_value(self) -> bool:
  266         -
        """
  267         -
        Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
  268         -
        """
  269         -
        ...
  270         -
  271         -
  272         -
    def is_string_value(self) -> bool:
  273         -
        """
  274         -
        Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
  275         -
        """
  276         -
        ...
  277         -
  278         -
  279         -
    def is_structure_value(self) -> bool:
  280         -
        """
  281         -
        Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
  282         -
        """
  283         -
        ...
  284         -
  285         -
  286         -
    def is_timestamp_value(self) -> bool:
  287         -
        """
  288         -
        Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
  289         -
        """
  290         -
        ...
  291         -
  292         -
  293         -
    @staticmethod
  294         -
    def list_value(data: typing.List[str]) -> MyUnion:
  295         -
        """
  296         -
        Creates a new union instance of [`ListValue`](crate::model::MyUnion::ListValue)
  297         -
        """
  298         -
        ...
  299         -
  300         -
  301         -
    @staticmethod
  302         -
    def map_value(data: typing.Dict[str, str]) -> MyUnion:
  303         -
        """
  304         -
        Creates a new union instance of [`MapValue`](crate::model::MyUnion::MapValue)
  305         -
        """
  306         -
        ...
  307         -
  308         -
  309         -
    @staticmethod
  310         -
    def number_value(data: int) -> MyUnion:
  311         -
        """
  312         -
        Creates a new union instance of [`NumberValue`](crate::model::MyUnion::NumberValue)
  313         -
        """
  314         -
        ...
  315         -
  316         -
  317         -
    @staticmethod
  318         -
    def string_value(data: str) -> MyUnion:
  319         -
        """
  320         -
        Creates a new union instance of [`StringValue`](crate::model::MyUnion::StringValue)
  321         -
        """
  322         -
        ...
  323         -
  324         -
  325         -
    @staticmethod
  326         -
    def structure_value(data: json_rpc10.model.GreetingStruct) -> MyUnion:
  327         -
        """
  328         -
        Creates a new union instance of [`StructureValue`](crate::model::MyUnion::StructureValue)
  329         -
        """
  330         -
        ...
  331         -
  332         -
  333         -
    @staticmethod
  334         -
    def timestamp_value(data: json_rpc10.types.DateTime) -> MyUnion:
  335         -
        """
  336         -
        Creates a new union instance of [`TimestampValue`](crate::model::MyUnion::TimestampValue)
  337         -
        """
  338         -
        ...
  339         -
  340         -
  341         -
class RequiredEnum:
  342         -
    Bar: RequiredEnum
  343         -
  344         -
    Baz: RequiredEnum
  345         -
  346         -
    Foo: RequiredEnum
  347         -
  348         -
    name: typing.Any
  349         -
  350         -
    value: typing.Any
  351         -
  352         -
class TestEnum:
  353         -
    Bar: TestEnum
  354         -
  355         -
    Baz: TestEnum
  356         -
  357         -
    Foo: TestEnum
  358         -
  359         -
    name: typing.Any
  360         -
  361         -
    value: typing.Any
  362         -
  363         -
class TopLevel:
  364         -
    dialog: json_rpc10.model.Dialog
  365         -
  366         -
    dialog_list: typing.List[json_rpc10.model.Dialog]
  367         -
  368         -
    dialog_map: typing.Dict[str, json_rpc10.model.Dialog]
  369         -
  370         -
    def __init__(self, dialog: json_rpc10.model.Dialog, dialog_list: typing.List[json_rpc10.model.Dialog], dialog_map: typing.Dict[str, json_rpc10.model.Dialog]) -> None:
  371         -
        ...
  372         -
  373         -
  374         -
class ValidationExceptionField:
  375         -
    """
  376         -
    Describes one specific validation failure for an input member.
  377         -
    """
  378         -
  379         -
    message: str
  380         -
    """
  381         -
    A detailed description of the validation failure.
  382         -
    """
  383         -
  384         -
    path: str
  385         -
    """
  386         -
    A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
  387         -
    """
  388         -
  389         -
    def __init__(self, path: str, message: str) -> None:
  390         -
        ...
  391         -

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/python/json_rpc10/output/__init__.pyi

@@ -1,0 +208,0 @@
    1         -
import json_rpc10.model
    2         -
import json_rpc10.types
    3         -
import typing
    4         -
    5         -
class ContentTypeParametersOutput:
    6         -
    def __init__(self) -> None:
    7         -
        ...
    8         -
    9         -
   10         -
class EmptyInputAndEmptyOutputOutput:
   11         -
    def __init__(self) -> None:
   12         -
        ...
   13         -
   14         -
   15         -
class EndpointOperationOutput:
   16         -
    def __init__(self) -> None:
   17         -
        ...
   18         -
   19         -
   20         -
class EndpointWithHostLabelOperationOutput:
   21         -
    def __init__(self) -> None:
   22         -
        ...
   23         -
   24         -
   25         -
class GreetingWithErrorsOutput:
   26         -
    greeting: typing.Optional[str]
   27         -
   28         -
    def __init__(self, greeting: typing.Optional[str] = ...) -> None:
   29         -
        ...
   30         -
   31         -
   32         -
class HostWithPathOperationOutput:
   33         -
    def __init__(self) -> None:
   34         -
        ...
   35         -
   36         -
   37         -
class JsonUnionsOutput:
   38         -
    contents: typing.Optional[json_rpc10.model.MyUnion]
   39         -
    """
   40         -
    A union with a representative set of types for members.
   41         -
    """
   42         -
   43         -
    def __init__(self, contents: typing.Optional[json_rpc10.model.MyUnion] = ...) -> None:
   44         -
        ...
   45         -
   46         -
   47         -
class NoInputAndNoOutputOutput:
   48         -
    def __init__(self) -> None:
   49         -
        ...
   50         -
   51         -
   52         -
class NoInputAndOutputOutput:
   53         -
    def __init__(self) -> None:
   54         -
        ...
   55         -
   56         -
   57         -
class OperationWithDefaultsOutput:
   58         -
    default_blob: json_rpc10.types.Blob
   59         -
   60         -
    default_boolean: bool
   61         -
   62         -
    default_byte: int
   63         -
   64         -
    default_document_boolean: json_rpc10.types.Document
   65         -
   66         -
    default_document_list: json_rpc10.types.Document
   67         -
   68         -
    default_document_map: json_rpc10.types.Document
   69         -
   70         -
    default_document_string: json_rpc10.types.Document
   71         -
   72         -
    default_double: float
   73         -
   74         -
    default_enum: json_rpc10.model.TestEnum
   75         -
   76         -
    default_float: float
   77         -
   78         -
    default_int_enum: int
   79         -
   80         -
    default_integer: int
   81         -
   82         -
    default_list: typing.List[str]
   83         -
   84         -
    default_long: int
   85         -
   86         -
    default_map: typing.Dict[str, str]
   87         -
   88         -
    default_null_document: typing.Optional[json_rpc10.types.Document]
   89         -
   90         -
    default_short: int
   91         -
   92         -
    default_string: str
   93         -
   94         -
    default_timestamp: json_rpc10.types.DateTime
   95         -
   96         -
    empty_blob: json_rpc10.types.Blob
   97         -
   98         -
    empty_string: str
   99         -
  100         -
    false_boolean: bool
  101         -
  102         -
    zero_byte: int
  103         -
  104         -
    zero_double: float
  105         -
  106         -
    zero_float: float
  107         -
  108         -
    zero_integer: int
  109         -
  110         -
    zero_long: int
  111         -
  112         -
    zero_short: int
  113         -
  114         -
    def __init__(self, default_string: str, default_boolean: bool, default_list: typing.List[str], default_document_map: json_rpc10.types.Document, default_document_string: json_rpc10.types.Document, default_document_boolean: json_rpc10.types.Document, default_document_list: json_rpc10.types.Document, default_timestamp: json_rpc10.types.DateTime, default_blob: json_rpc10.types.Blob, default_byte: int, default_short: int, default_integer: int, default_long: int, default_float: float, default_double: float, default_map: typing.Dict[str, str], default_enum: json_rpc10.model.TestEnum, default_int_enum: int, empty_string: str, false_boolean: bool, empty_blob: json_rpc10.types.Blob, zero_byte: int, zero_short: int, zero_integer: int, zero_long: int, zero_float: float, zero_double: float, default_null_document: typing.Optional[json_rpc10.types.Document] = ...) -> None:
  115         -
        ...
  116         -
  117         -
  118         -
class OperationWithNestedStructureOutput:
  119         -
    dialog: json_rpc10.model.Dialog
  120         -
  121         -
    dialog_list: typing.List[json_rpc10.model.Dialog]
  122         -
  123         -
    dialog_map: typing.Dict[str, json_rpc10.model.Dialog]
  124         -
  125         -
    def __init__(self, dialog: json_rpc10.model.Dialog, dialog_list: typing.List[json_rpc10.model.Dialog], dialog_map: typing.Dict[str, json_rpc10.model.Dialog]) -> None:
  126         -
        ...
  127         -
  128         -
  129         -
class OperationWithRequiredMembersOutput:
  130         -
    required_blob: json_rpc10.types.Blob
  131         -
  132         -
    required_boolean: bool
  133         -
  134         -
    required_byte: int
  135         -
  136         -
    required_double: float
  137         -
  138         -
    required_float: float
  139         -
  140         -
    required_integer: int
  141         -
  142         -
    required_list: typing.List[str]
  143         -
  144         -
    required_long: int
  145         -
  146         -
    required_map: typing.Dict[str, str]
  147         -
  148         -
    required_short: int
  149         -
  150         -
    required_string: str
  151         -
  152         -
    required_timestamp: json_rpc10.types.DateTime
  153         -
  154         -
    def __init__(self, required_string: str, required_boolean: bool, required_list: typing.List[str], required_timestamp: json_rpc10.types.DateTime, required_blob: json_rpc10.types.Blob, required_byte: int, required_short: int, required_integer: int, required_long: int, required_float: float, required_double: float, required_map: typing.Dict[str, str]) -> None:
  155         -
        ...
  156         -
  157         -
  158         -
class OperationWithRequiredMembersWithDefaultsOutput:
  159         -
    required_blob: json_rpc10.types.Blob
  160         -
  161         -
    required_boolean: bool
  162         -
  163         -
    required_byte: int
  164         -
  165         -
    required_double: float
  166         -
  167         -
    required_enum: json_rpc10.model.RequiredEnum
  168         -
  169         -
    required_float: float
  170         -
  171         -
    required_int_enum: int
  172         -
  173         -
    required_integer: int
  174         -
  175         -
    required_list: typing.List[str]
  176         -
  177         -
    required_long: int
  178         -
  179         -
    required_map: typing.Dict[str, str]
  180         -
  181         -
    required_short: int
  182         -
  183         -
    required_string: str
  184         -
  185         -
    required_timestamp: json_rpc10.types.DateTime
  186         -
  187         -
    def __init__(self, required_string: str, required_boolean: bool, required_list: typing.List[str], required_timestamp: json_rpc10.types.DateTime, required_blob: json_rpc10.types.Blob, required_byte: int, required_short: int, required_integer: int, required_long: int, required_float: float, required_double: float, required_map: typing.Dict[str, str], required_enum: json_rpc10.model.RequiredEnum, required_int_enum: int) -> None:
  188         -
        ...
  189         -
  190         -
  191         -
class PutWithContentEncodingOutput:
  192         -
    def __init__(self) -> None:
  193         -
        ...
  194         -
  195         -
  196         -
class QueryIncompatibleOperationOutput:
  197         -
    def __init__(self) -> None:
  198         -
        ...
  199         -
  200         -
  201         -
class SimpleScalarPropertiesOutput:
  202         -
    double_value: typing.Optional[float]
  203         -
  204         -
    float_value: typing.Optional[float]
  205         -
  206         -
    def __init__(self, float_value: typing.Optional[float] = ..., double_value: typing.Optional[float] = ...) -> None:
  207         -
        ...
  208         -