// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`csharp output 1`] = ` Object { "MyPackage/AssemblyInfo.cs": "using Amazon.JSII.Runtime.Deputy; [assembly: JsiiAssembly(\\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060\\", \\"0.0.0\\", \\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060-0.0.0.tgz\\")] ", "MyPackage/MyPackage.csproj": " 4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060 MyPackage UNLICENSED 0.0.0 generated@generated.com en-US http://generated http://generated git true true true true enable snupkg netcoreapp3.1 Major 0612,0618 0108,0109 ", "MyPackage/MyPackage/Calculator.cs": "using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace MyPackage { /// A sophisticaed multi-language calculator. [JsiiClass(nativeType: typeof(MyPackage.Calculator), fullyQualifiedName: \\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Calculator\\")] public class Calculator : DeputyBase { public Calculator(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Calculator(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Calculator(DeputyProps props): base(props) { } /// Adds the two operands. /// operands. [JsiiMethod(name: \\"add\\", returnsJson: \\"{\\\\\\"type\\\\\\":{\\\\\\"primitive\\\\\\":\\\\\\"number\\\\\\"}}\\", parametersJson: \\"[{\\\\\\"docs\\\\\\":{\\\\\\"summary\\\\\\":\\\\\\"operands.\\\\\\"},\\\\\\"name\\\\\\":\\\\\\"ops\\\\\\",\\\\\\"type\\\\\\":{\\\\\\"fqn\\\\\\":\\\\\\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands\\\\\\"}}]\\")] public virtual double Add(MyPackage.IOperands ops) { return InvokeInstanceMethod(new System.Type[]{typeof(MyPackage.IOperands)}, new object[]{ops})!; } /// Multiplies the two operands. /// operands. [JsiiMethod(name: \\"mul\\", returnsJson: \\"{\\\\\\"type\\\\\\":{\\\\\\"primitive\\\\\\":\\\\\\"number\\\\\\"}}\\", parametersJson: \\"[{\\\\\\"docs\\\\\\":{\\\\\\"summary\\\\\\":\\\\\\"operands.\\\\\\"},\\\\\\"name\\\\\\":\\\\\\"ops\\\\\\",\\\\\\"type\\\\\\":{\\\\\\"fqn\\\\\\":\\\\\\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands\\\\\\"}}]\\")] public virtual double Mul(MyPackage.IOperands ops) { return InvokeInstanceMethod(new System.Type[]{typeof(MyPackage.IOperands)}, new object[]{ops})!; } /// Subtracts the two operands. /// operands. [JsiiMethod(name: \\"sub\\", returnsJson: \\"{\\\\\\"type\\\\\\":{\\\\\\"primitive\\\\\\":\\\\\\"number\\\\\\"}}\\", parametersJson: \\"[{\\\\\\"docs\\\\\\":{\\\\\\"summary\\\\\\":\\\\\\"operands.\\\\\\"},\\\\\\"name\\\\\\":\\\\\\"ops\\\\\\",\\\\\\"type\\\\\\":{\\\\\\"fqn\\\\\\":\\\\\\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands\\\\\\"}}]\\")] public virtual double Sub(MyPackage.IOperands ops) { return InvokeInstanceMethod(new System.Type[]{typeof(MyPackage.IOperands)}, new object[]{ops})!; } } } ", "MyPackage/MyPackage/IOperands.cs": "using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace MyPackage { /// Math operands. [JsiiInterface(nativeType: typeof(IOperands), fullyQualifiedName: \\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands\\")] public interface IOperands { /// Left-hand side operand. [JsiiProperty(name: \\"lhs\\", typeJson: \\"{\\\\\\"primitive\\\\\\":\\\\\\"number\\\\\\"}\\")] double Lhs { get; } /// Right-hand side operand. [JsiiProperty(name: \\"rhs\\", typeJson: \\"{\\\\\\"primitive\\\\\\":\\\\\\"number\\\\\\"}\\")] double Rhs { get; } /// Math operands. [JsiiTypeProxy(nativeType: typeof(IOperands), fullyQualifiedName: \\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands\\")] internal sealed class _Proxy : DeputyBase, MyPackage.IOperands { private _Proxy(ByRefValue reference): base(reference) { } /// Left-hand side operand. [JsiiProperty(name: \\"lhs\\", typeJson: \\"{\\\\\\"primitive\\\\\\":\\\\\\"number\\\\\\"}\\")] public double Lhs { get => GetInstanceProperty()!; } /// Right-hand side operand. [JsiiProperty(name: \\"rhs\\", typeJson: \\"{\\\\\\"primitive\\\\\\":\\\\\\"number\\\\\\"}\\")] public double Rhs { get => GetInstanceProperty()!; } } } } ", "MyPackage/MyPackage/Internal/DependencyResolution/Anchor.cs": "#pragma warning disable CS0672,CS0809,CS1591 namespace MyPackage.Internal.DependencyResolution { public sealed class Anchor { public Anchor() { } } } ", "MyPackage/MyPackage/Operands.cs": "using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace MyPackage { #pragma warning disable CS8618 /// Math operands. [JsiiByValue(fqn: \\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands\\")] public class Operands : MyPackage.IOperands { /// Left-hand side operand. [JsiiProperty(name: \\"lhs\\", typeJson: \\"{\\\\\\"primitive\\\\\\":\\\\\\"number\\\\\\"}\\")] public double Lhs { get; set; } /// Right-hand side operand. [JsiiProperty(name: \\"rhs\\", typeJson: \\"{\\\\\\"primitive\\\\\\":\\\\\\"number\\\\\\"}\\")] public double Rhs { get; set; } } } ", } `; exports[`golang output 1`] = ` Object { "package/Calculator.go": "package package import ( _jsii_ \\"github.com/aws/jsii-runtime-go/runtime\\" _init_ \\"github.com/hello/world/package/jsii\\" ) // A sophisticaed multi-language calculator. type Calculator interface { // Adds the two operands. Add(ops *Operands) *float64 // Multiplies the two operands. Mul(ops *Operands) *float64 // Subtracts the two operands. Sub(ops *Operands) *float64 } // The jsii proxy struct for Calculator type jsiiProxy_Calculator struct { _ byte // padding } func NewCalculator() Calculator { _init_.Initialize() j := jsiiProxy_Calculator{} _jsii_.Create( \\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Calculator\\", nil, // no parameters &j, ) return &j } func NewCalculator_Override(c Calculator) { _init_.Initialize() _jsii_.Create( \\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Calculator\\", nil, // no parameters c, ) } func (c *jsiiProxy_Calculator) Add(ops *Operands) *float64 { if err := c.validateAddParameters(ops); err != nil { panic(err) } var returns *float64 _jsii_.Invoke( c, \\"add\\", []interface{}{ops}, &returns, ) return returns } func (c *jsiiProxy_Calculator) Mul(ops *Operands) *float64 { if err := c.validateMulParameters(ops); err != nil { panic(err) } var returns *float64 _jsii_.Invoke( c, \\"mul\\", []interface{}{ops}, &returns, ) return returns } func (c *jsiiProxy_Calculator) Sub(ops *Operands) *float64 { if err := c.validateSubParameters(ops); err != nil { panic(err) } var returns *float64 _jsii_.Invoke( c, \\"sub\\", []interface{}{ops}, &returns, ) return returns } ", "package/Calculator__checks.go": "//go:build !no_runtime_type_checking package package import ( \\"fmt\\" _jsii_ \\"github.com/aws/jsii-runtime-go/runtime\\" ) func (c *jsiiProxy_Calculator) validateAddParameters(ops *Operands) error { if ops == nil { return fmt.Errorf(\\"parameter ops is required, but nil was provided\\") } if err := _jsii_.ValidateStruct(ops, func() string { return \\"parameter ops\\" }); err != nil { return err } return nil } func (c *jsiiProxy_Calculator) validateMulParameters(ops *Operands) error { if ops == nil { return fmt.Errorf(\\"parameter ops is required, but nil was provided\\") } if err := _jsii_.ValidateStruct(ops, func() string { return \\"parameter ops\\" }); err != nil { return err } return nil } func (c *jsiiProxy_Calculator) validateSubParameters(ops *Operands) error { if ops == nil { return fmt.Errorf(\\"parameter ops is required, but nil was provided\\") } if err := _jsii_.ValidateStruct(ops, func() string { return \\"parameter ops\\" }); err != nil { return err } return nil } ", "package/Calculator__no_checks.go": "//go:build no_runtime_type_checking package package // Building without runtime type checking enabled, so all the below just return nil func (c *jsiiProxy_Calculator) validateAddParameters(ops *Operands) error { return nil } func (c *jsiiProxy_Calculator) validateMulParameters(ops *Operands) error { return nil } func (c *jsiiProxy_Calculator) validateSubParameters(ops *Operands) error { return nil } ", "package/Operands.go": "package package // Math operands. type Operands struct { // Left-hand side operand. Lhs *float64 \`field:\\"required\\" json:\\"lhs\\" yaml:\\"lhs\\"\` // Right-hand side operand. Rhs *float64 \`field:\\"required\\" json:\\"rhs\\" yaml:\\"rhs\\"\` } ", "package/jsii/jsii.go": "// Package jsii contains the functionaility needed for jsii packages to // initialize their dependencies and themselves. Users should never need to use this package // directly. If you find you need to - please report a bug at // https://github.com/aws/jsii/issues/new/choose package jsii import ( _ \\"embed\\" _jsii_ \\"github.com/aws/jsii-runtime-go/runtime\\" ) //go:embed 4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060-0.0.0.tgz var tarball []byte // Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. // The implementation is idempotent (and hence safe to be called over and over). func Initialize() { // Load this library into the kernel _jsii_.Load(\\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060\\", \\"0.0.0\\", tarball) } ", "package/main.go": "// 4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060 package package import ( \\"reflect\\" _jsii_ \\"github.com/aws/jsii-runtime-go/runtime\\" ) func init() { _jsii_.RegisterClass( \\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Calculator\\", reflect.TypeOf((*Calculator)(nil)).Elem(), []_jsii_.Member{ _jsii_.MemberMethod{JsiiMethod: \\"add\\", GoMethod: \\"Add\\"}, _jsii_.MemberMethod{JsiiMethod: \\"mul\\", GoMethod: \\"Mul\\"}, _jsii_.MemberMethod{JsiiMethod: \\"sub\\", GoMethod: \\"Sub\\"}, }, func() interface{} { return &jsiiProxy_Calculator{} }, ) _jsii_.RegisterStruct( \\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands\\", reflect.TypeOf((*Operands)(nil)).Elem(), ) } ", "package/version": "0.0.0 ", } `; exports[`java output 1`] = ` Object { "src/main/java/mypackage/$Module.java": "package mypackage; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; import java.io.Reader; import java.io.UncheckedIOException; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; import software.amazon.jsii.JsiiModule; @software.amazon.jsii.Internal public final class $Module extends JsiiModule { private static final Map MODULE_TYPES = load(); private static Map load() { final Map result = new HashMap<>(); final ClassLoader cl = $Module.class.getClassLoader(); try (final InputStream is = cl.getResourceAsStream(\\"mypackage/$Module.txt\\"); final Reader rd = new InputStreamReader(is, StandardCharsets.UTF_8); final BufferedReader br = new BufferedReader(rd)) { br.lines() .filter(line -> !line.trim().isEmpty()) .forEach(line -> { final String[] parts = line.split(\\"=\\", 2); final String fqn = parts[0]; final String className = parts[1]; result.put(fqn, className); }); } catch (final IOException exception) { throw new UncheckedIOException(exception); } return result; } private final Map> cache = new HashMap<>(); public $Module() { super(\\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060\\", \\"0.0.0\\", $Module.class, \\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060@0.0.0.jsii.tgz\\"); } @Override protected Class resolveClass(final String fqn) throws ClassNotFoundException { if (!MODULE_TYPES.containsKey(fqn)) { throw new ClassNotFoundException(\\"Unknown JSII type: \\" + fqn); } String className = MODULE_TYPES.get(fqn); if (!this.cache.containsKey(className)) { this.cache.put(className, this.findClass(className)); } return this.cache.get(className); } private Class findClass(final String binaryName) { try { return Class.forName(binaryName); } catch (final ClassNotFoundException exception) { throw new RuntimeException(exception); } } } ", "src/main/java/mypackage/Calculator.java": "package mypackage; /** * A sophisticaed multi-language calculator. */ @software.amazon.jsii.Jsii(module = mypackage.$Module.class, fqn = \\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Calculator\\") public class Calculator extends software.amazon.jsii.JsiiObject { protected Calculator(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected Calculator(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } public Calculator() { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this); } /** * Adds the two operands. *

* @param ops operands. This parameter is required. */ public @org.jetbrains.annotations.NotNull java.lang.Number add(final @org.jetbrains.annotations.NotNull mypackage.Operands ops) { return software.amazon.jsii.Kernel.call(this, \\"add\\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(ops, \\"ops is required\\") }); } /** * Multiplies the two operands. *

* @param ops operands. This parameter is required. */ public @org.jetbrains.annotations.NotNull java.lang.Number mul(final @org.jetbrains.annotations.NotNull mypackage.Operands ops) { return software.amazon.jsii.Kernel.call(this, \\"mul\\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(ops, \\"ops is required\\") }); } /** * Subtracts the two operands. *

* @param ops operands. This parameter is required. */ public @org.jetbrains.annotations.NotNull java.lang.Number sub(final @org.jetbrains.annotations.NotNull mypackage.Operands ops) { return software.amazon.jsii.Kernel.call(this, \\"sub\\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class), new Object[] { java.util.Objects.requireNonNull(ops, \\"ops is required\\") }); } } ", "src/main/java/mypackage/Operands.java": "package mypackage; /** * Math operands. */ @software.amazon.jsii.Jsii(module = mypackage.$Module.class, fqn = \\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands\\") @software.amazon.jsii.Jsii.Proxy(Operands.Jsii$Proxy.class) public interface Operands extends software.amazon.jsii.JsiiSerializable { /** * Left-hand side operand. */ @org.jetbrains.annotations.NotNull java.lang.Number getLhs(); /** * Right-hand side operand. */ @org.jetbrains.annotations.NotNull java.lang.Number getRhs(); /** * @return a {@link Builder} of {@link Operands} */ static Builder builder() { return new Builder(); } /** * A builder for {@link Operands} */ public static final class Builder implements software.amazon.jsii.Builder { java.lang.Number lhs; java.lang.Number rhs; /** * Sets the value of {@link Operands#getLhs} * @param lhs Left-hand side operand. This parameter is required. * @return {@code this} */ public Builder lhs(java.lang.Number lhs) { this.lhs = lhs; return this; } /** * Sets the value of {@link Operands#getRhs} * @param rhs Right-hand side operand. This parameter is required. * @return {@code this} */ public Builder rhs(java.lang.Number rhs) { this.rhs = rhs; return this; } /** * Builds the configured instance. * @return a new instance of {@link Operands} * @throws NullPointerException if any required attribute was not provided */ @Override public Operands build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link Operands} */ @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Operands { private final java.lang.Number lhs; private final java.lang.Number rhs; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.lhs = software.amazon.jsii.Kernel.get(this, \\"lhs\\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.rhs = software.amazon.jsii.Kernel.get(this, \\"rhs\\", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.lhs = java.util.Objects.requireNonNull(builder.lhs, \\"lhs is required\\"); this.rhs = java.util.Objects.requireNonNull(builder.rhs, \\"rhs is required\\"); } @Override public final java.lang.Number getLhs() { return this.lhs; } @Override public final java.lang.Number getRhs() { return this.rhs; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set(\\"lhs\\", om.valueToTree(this.getLhs())); data.set(\\"rhs\\", om.valueToTree(this.getRhs())); final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set(\\"fqn\\", om.valueToTree(\\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands\\")); struct.set(\\"data\\", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set(\\"$jsii.struct\\", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Operands.Jsii$Proxy that = (Operands.Jsii$Proxy) o; if (!lhs.equals(that.lhs)) return false; return this.rhs.equals(that.rhs); } @Override public final int hashCode() { int result = this.lhs.hashCode(); result = 31 * result + (this.rhs.hashCode()); return result; } } } ", "src/main/resources/mypackage/$Module.txt": "4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Calculator=mypackage.Calculator 4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands=mypackage.Operands ", } `; exports[`jsii output 1`] = ` Object { "author": Object { "name": "generated@generated.com", "roles": Array [ "author", ], }, "description": "4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060", "fingerprint": "jEYc9fQOnPKOdif15XcY4uxEGn37bZ/OcX3ItJRtDnc=", "homepage": "http://generated", "jsiiVersion": "5.1.10 (build 041401a)", "license": "UNLICENSED", "metadata": Object { "jsii": Object { "pacmak": Object { "hasDefaultInterfaces": true, }, }, }, "name": "4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060", "repository": Object { "type": "git", "url": "http://generated", }, "schema": "jsii/0.10.0", "targets": Object { "js": Object { "npm": "4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060", }, }, "types": Object { "4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Calculator": Object { "assembly": "4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060", "docs": Object { "summary": "A sophisticaed multi-language calculator.", }, "fqn": "4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Calculator", "initializer": Object {}, "kind": "class", "locationInModule": Object { "filename": "lib/main.ts", "line": 19, }, "methods": Array [ Object { "docs": Object { "summary": "Adds the two operands.", }, "locationInModule": Object { "filename": "lib/main.ts", "line": 24, }, "name": "add", "parameters": Array [ Object { "docs": Object { "summary": "operands.", }, "name": "ops", "type": Object { "fqn": "4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands", }, }, ], "returns": Object { "type": Object { "primitive": "number", }, }, }, Object { "docs": Object { "summary": "Multiplies the two operands.", }, "locationInModule": Object { "filename": "lib/main.ts", "line": 40, }, "name": "mul", "parameters": Array [ Object { "docs": Object { "summary": "operands.", }, "name": "ops", "type": Object { "fqn": "4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands", }, }, ], "returns": Object { "type": Object { "primitive": "number", }, }, }, Object { "docs": Object { "summary": "Subtracts the two operands.", }, "locationInModule": Object { "filename": "lib/main.ts", "line": 32, }, "name": "sub", "parameters": Array [ Object { "docs": Object { "summary": "operands.", }, "name": "ops", "type": Object { "fqn": "4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands", }, }, ], "returns": Object { "type": Object { "primitive": "number", }, }, }, ], "name": "Calculator", "symbolId": "lib/main:Calculator", }, "4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands": Object { "assembly": "4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060", "datatype": true, "docs": Object { "summary": "Math operands.", }, "fqn": "4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands", "kind": "interface", "locationInModule": Object { "filename": "lib/main.ts", "line": 4, }, "name": "Operands", "properties": Array [ Object { "abstract": true, "docs": Object { "summary": "Left-hand side operand.", }, "immutable": true, "locationInModule": Object { "filename": "lib/main.ts", "line": 8, }, "name": "lhs", "type": Object { "primitive": "number", }, }, Object { "abstract": true, "docs": Object { "summary": "Right-hand side operand.", }, "immutable": true, "locationInModule": Object { "filename": "lib/main.ts", "line": 13, }, "name": "rhs", "type": Object { "primitive": "number", }, }, ], "symbolId": "lib/main:Operands", }, }, "version": "0.0.0", } `; exports[`python output 1`] = ` Object { "my/python/module/__init__.py": "import abc import builtins import datetime import enum import typing import jsii import publication import typing_extensions from typeguard import check_type from ._jsii import * class Calculator( metaclass=jsii.JSIIMeta, jsii_type=\\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Calculator\\", ): '''A sophisticaed multi-language calculator.''' def __init__(self) -> None: jsii.create(self.__class__, self, []) @jsii.member(jsii_name=\\"add\\") def add(self, *, lhs: jsii.Number, rhs: jsii.Number) -> jsii.Number: '''Adds the two operands. :param lhs: Left-hand side operand. :param rhs: Right-hand side operand. ''' ops = Operands(lhs=lhs, rhs=rhs) return typing.cast(jsii.Number, jsii.invoke(self, \\"add\\", [ops])) @jsii.member(jsii_name=\\"mul\\") def mul(self, *, lhs: jsii.Number, rhs: jsii.Number) -> jsii.Number: '''Multiplies the two operands. :param lhs: Left-hand side operand. :param rhs: Right-hand side operand. ''' ops = Operands(lhs=lhs, rhs=rhs) return typing.cast(jsii.Number, jsii.invoke(self, \\"mul\\", [ops])) @jsii.member(jsii_name=\\"sub\\") def sub(self, *, lhs: jsii.Number, rhs: jsii.Number) -> jsii.Number: '''Subtracts the two operands. :param lhs: Left-hand side operand. :param rhs: Right-hand side operand. ''' ops = Operands(lhs=lhs, rhs=rhs) return typing.cast(jsii.Number, jsii.invoke(self, \\"sub\\", [ops])) @jsii.data_type( jsii_type=\\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060.Operands\\", jsii_struct_bases=[], name_mapping={\\"lhs\\": \\"lhs\\", \\"rhs\\": \\"rhs\\"}, ) class Operands: def __init__(self, *, lhs: jsii.Number, rhs: jsii.Number) -> None: '''Math operands. :param lhs: Left-hand side operand. :param rhs: Right-hand side operand. ''' if __debug__: type_hints = typing.get_type_hints(_typecheckingstub__62b72180950e738f3da9d30928f89aeb536b4a0ac6dbb349ce3eb7a1e3c2a293) check_type(argname=\\"argument lhs\\", value=lhs, expected_type=type_hints[\\"lhs\\"]) check_type(argname=\\"argument rhs\\", value=rhs, expected_type=type_hints[\\"rhs\\"]) self._values: typing.Dict[builtins.str, typing.Any] = { \\"lhs\\": lhs, \\"rhs\\": rhs, } @builtins.property def lhs(self) -> jsii.Number: '''Left-hand side operand.''' result = self._values.get(\\"lhs\\") assert result is not None, \\"Required property 'lhs' is missing\\" return typing.cast(jsii.Number, result) @builtins.property def rhs(self) -> jsii.Number: '''Right-hand side operand.''' result = self._values.get(\\"rhs\\") assert result is not None, \\"Required property 'rhs' is missing\\" return typing.cast(jsii.Number, result) def __eq__(self, rhs: typing.Any) -> builtins.bool: return isinstance(rhs, self.__class__) and rhs._values == self._values def __ne__(self, rhs: typing.Any) -> builtins.bool: return not (rhs == self) def __repr__(self) -> str: return \\"Operands(%s)\\" % \\", \\".join( k + \\"=\\" + repr(v) for k, v in self._values.items() ) __all__ = [ \\"Calculator\\", \\"Operands\\", ] publication.publish() def _typecheckingstub__62b72180950e738f3da9d30928f89aeb536b4a0ac6dbb349ce3eb7a1e3c2a293( *, lhs: jsii.Number, rhs: jsii.Number, ) -> None: \\"\\"\\"Type checking stubs\\"\\"\\" pass ", "my/python/module/_jsii/__init__.py": "import abc import builtins import datetime import enum import typing import jsii import publication import typing_extensions from typeguard import check_type __jsii_assembly__ = jsii.JSIIAssembly.load( \\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060\\", \\"0.0.0\\", __name__[0:-6], \\"4c6b576fbe7e27053874813d9754cb2e46811d806c1e0aa9aae8add4c3763060@0.0.0.jsii.tgz\\", ) __all__ = [ \\"__jsii_assembly__\\", ] publication.publish() ", "my/python/module/py.typed": " ", } `;