diff --git a/packages/jsii-pacmak/lib/targets/go/package.ts b/packages/jsii-pacmak/lib/targets/go/package.ts index c06fd43143..b388401b65 100644 --- a/packages/jsii-pacmak/lib/targets/go/package.ts +++ b/packages/jsii-pacmak/lib/targets/go/package.ts @@ -203,7 +203,7 @@ export abstract class Package { if (this.types.length > 0) { const { code } = context; - const initFile = join(this.directory, `${this.packageName}.go`); + const initFile = join(this.directory, `main.go`); code.openFile(initFile); code.line(`package ${this.packageName}`); code.line(); @@ -238,10 +238,7 @@ export abstract class Package { private emitTypes(context: EmitContext) { for (const type of this.types) { - const filePath = join( - this.directory, - `${this.packageName}_${type.name}.go`, - ); + const filePath = join(this.directory, `${type.name}.go`); context.code.openFile(filePath); this.emitHeader(context.code); @@ -266,23 +263,9 @@ export abstract class Package { return; } - emit.call( - this, - join( - this.directory, - `${this.packageName}_${type.name}__runtime_type_checks.go`, - ), - false, - ); + emit.call(this, join(this.directory, `${type.name}__checks.go`), false); - emit.call( - this, - join( - this.directory, - `${this.packageName}_${type.name}__no_runtime_type_checking.go`, - ), - true, - ); + emit.call(this, join(this.directory, `${type.name}__no_checks.go`), true); function emit(this: Package, filePath: string, forNoOp: boolean) { code.openFile(filePath); diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap index ac1bf7249b..c6d4b04771 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap @@ -21,16 +21,16 @@ exports[`diamond-struct-parameter.ts: / 1`] = ` ┃ ┗━ 📄 Example.Test.Demo.csproj ┣━ 📁 go ┃ ┗━ 📁 testpkg + ┃ ┣━ 📄 Baz.go + ┃ ┣━ 📄 Consumer__checks.go + ┃ ┣━ 📄 Consumer__no_checks.go + ┃ ┣━ 📄 Consumer.go + ┃ ┣━ 📄 Foo.go + ┃ ┣━ 📄 FooBar.go ┃ ┣━ 📄 go.mod ┃ ┣━ 📁 jsii ┃ ┃ ┗━ 📄 jsii.go - ┃ ┣━ 📄 testpkg_Baz.go - ┃ ┣━ 📄 testpkg_Consumer__no_runtime_type_checking.go - ┃ ┣━ 📄 testpkg_Consumer__runtime_type_checks.go - ┃ ┣━ 📄 testpkg_Consumer.go - ┃ ┣━ 📄 testpkg_Foo.go - ┃ ┣━ 📄 testpkg_FooBar.go - ┃ ┗━ 📄 testpkg.go + ┃ ┗━ 📄 main.go ┣━ 📁 java ┃ ┣━ 📄 pom.xml ┃ ┗━ 📁 src @@ -380,77 +380,7 @@ namespace Example.Test.Demo.Internal.DependencyResolution `; -exports[`diamond-struct-parameter.ts: /go/testpkg/go.mod 1`] = ` -module example.test/demo/testpkg - -go 1.18 - -require ( - github.com/aws/jsii-runtime-go v0.0.0 -) - -`; - -exports[`diamond-struct-parameter.ts: /go/testpkg/jsii/jsii.go 1`] = ` -// 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 testpkg-0.0.1.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("testpkg", "0.0.1", tarball) -} - -`; - -exports[`diamond-struct-parameter.ts: /go/testpkg/testpkg.go 1`] = ` -package testpkg - -import ( - "reflect" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -func init() { - _jsii_.RegisterStruct( - "testpkg.Baz", - reflect.TypeOf((*Baz)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "testpkg.Consumer", - reflect.TypeOf((*Consumer)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_Consumer{} - }, - ) - _jsii_.RegisterStruct( - "testpkg.Foo", - reflect.TypeOf((*Foo)(nil)).Elem(), - ) - _jsii_.RegisterStruct( - "testpkg.FooBar", - reflect.TypeOf((*FooBar)(nil)).Elem(), - ) -} - -`; - -exports[`diamond-struct-parameter.ts: /go/testpkg/testpkg_Baz.go 1`] = ` +exports[`diamond-struct-parameter.ts: /go/testpkg/Baz.go 1`] = ` // testpkg package testpkg @@ -464,7 +394,7 @@ type Baz struct { `; -exports[`diamond-struct-parameter.ts: /go/testpkg/testpkg_Consumer.go 1`] = ` +exports[`diamond-struct-parameter.ts: /go/testpkg/Consumer.go 1`] = ` // testpkg package testpkg @@ -497,22 +427,7 @@ func Consumer_ConsumeBaz(baz *Baz) { `; -exports[`diamond-struct-parameter.ts: /go/testpkg/testpkg_Consumer__no_runtime_type_checking.go 1`] = ` -//go:build no_runtime_type_checking - -// testpkg -package testpkg - -// Building without runtime type checking enabled, so all the below just return nil - -func validateConsumer_ConsumeBazParameters(baz *Baz) error { - return nil -} - - -`; - -exports[`diamond-struct-parameter.ts: /go/testpkg/testpkg_Consumer__runtime_type_checks.go 1`] = ` +exports[`diamond-struct-parameter.ts: /go/testpkg/Consumer__checks.go 1`] = ` //go:build !no_runtime_type_checking // testpkg @@ -538,7 +453,22 @@ func validateConsumer_ConsumeBazParameters(baz *Baz) error { `; -exports[`diamond-struct-parameter.ts: /go/testpkg/testpkg_Foo.go 1`] = ` +exports[`diamond-struct-parameter.ts: /go/testpkg/Consumer__no_checks.go 1`] = ` +//go:build no_runtime_type_checking + +// testpkg +package testpkg + +// Building without runtime type checking enabled, so all the below just return nil + +func validateConsumer_ConsumeBazParameters(baz *Baz) error { + return nil +} + + +`; + +exports[`diamond-struct-parameter.ts: /go/testpkg/Foo.go 1`] = ` // testpkg package testpkg @@ -550,7 +480,7 @@ type Foo struct { `; -exports[`diamond-struct-parameter.ts: /go/testpkg/testpkg_FooBar.go 1`] = ` +exports[`diamond-struct-parameter.ts: /go/testpkg/FooBar.go 1`] = ` // testpkg package testpkg @@ -561,6 +491,76 @@ type FooBar struct { } +`; + +exports[`diamond-struct-parameter.ts: /go/testpkg/go.mod 1`] = ` +module example.test/demo/testpkg + +go 1.18 + +require ( + github.com/aws/jsii-runtime-go v0.0.0 +) + +`; + +exports[`diamond-struct-parameter.ts: /go/testpkg/jsii/jsii.go 1`] = ` +// 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 testpkg-0.0.1.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("testpkg", "0.0.1", tarball) +} + +`; + +exports[`diamond-struct-parameter.ts: /go/testpkg/main.go 1`] = ` +package testpkg + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterStruct( + "testpkg.Baz", + reflect.TypeOf((*Baz)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "testpkg.Consumer", + reflect.TypeOf((*Consumer)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_Consumer{} + }, + ) + _jsii_.RegisterStruct( + "testpkg.Foo", + reflect.TypeOf((*Foo)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "testpkg.FooBar", + reflect.TypeOf((*FooBar)(nil)).Elem(), + ) +} + `; exports[`diamond-struct-parameter.ts: /java/pom.xml 1`] = ` @@ -1560,13 +1560,13 @@ exports[`nested-types.ts: / 1`] = ` ┃ ┣━ 📄 go.mod ┃ ┣━ 📁 jsii ┃ ┃ ┗━ 📄 jsii.go - ┃ ┣━ 📄 testpkg_Namespace1_Foo.go - ┃ ┣━ 📄 testpkg_Namespace1_IBar.go - ┃ ┣━ 📄 testpkg_Namespace1.go - ┃ ┣━ 📄 testpkg_Namespace2_Foo_Final.go - ┃ ┣━ 📄 testpkg_Namespace2_Foo.go - ┃ ┣━ 📄 testpkg_Namespace2.go - ┃ ┗━ 📄 testpkg.go + ┃ ┣━ 📄 main.go + ┃ ┣━ 📄 Namespace1_Foo.go + ┃ ┣━ 📄 Namespace1_IBar.go + ┃ ┣━ 📄 Namespace1.go + ┃ ┣━ 📄 Namespace2_Foo_Final.go + ┃ ┣━ 📄 Namespace2_Foo.go + ┃ ┗━ 📄 Namespace2.go ┣━ 📁 java ┃ ┣━ 📄 pom.xml ┃ ┗━ 📁 src @@ -1852,110 +1852,7 @@ namespace Example.Test.Demo `; -exports[`nested-types.ts: /go/testpkg/go.mod 1`] = ` -module example.test/demo/testpkg - -go 1.18 - -require ( - github.com/aws/jsii-runtime-go v0.0.0 -) - -`; - -exports[`nested-types.ts: /go/testpkg/jsii/jsii.go 1`] = ` -// 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 testpkg-0.0.1.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("testpkg", "0.0.1", tarball) -} - -`; - -exports[`nested-types.ts: /go/testpkg/testpkg.go 1`] = ` -package testpkg - -import ( - "reflect" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -func init() { - _jsii_.RegisterClass( - "testpkg.Namespace1", - reflect.TypeOf((*Namespace1)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, - }, - func() interface{} { - return &jsiiProxy_Namespace1{} - }, - ) - _jsii_.RegisterStruct( - "testpkg.Namespace1.Foo", - reflect.TypeOf((*Namespace1_Foo)(nil)).Elem(), - ) - _jsii_.RegisterInterface( - "testpkg.Namespace1.IBar", - reflect.TypeOf((*Namespace1_IBar)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "bar", GoGetter: "Bar"}, - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - }, - func() interface{} { - return &jsiiProxy_Namespace1_IBar{} - }, - ) - _jsii_.RegisterClass( - "testpkg.Namespace2", - reflect.TypeOf((*Namespace2)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, - }, - func() interface{} { - return &jsiiProxy_Namespace2{} - }, - ) - _jsii_.RegisterEnum( - "testpkg.Namespace2.Foo", - reflect.TypeOf((*Namespace2_Foo)(nil)).Elem(), - map[string]interface{}{ - "BAR": Namespace2_Foo_BAR, - "BAZ": Namespace2_Foo_BAZ, - }, - ) - _jsii_.RegisterClass( - "testpkg.Namespace2.Foo.Final", - reflect.TypeOf((*Namespace2_Foo_Final)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "done", GoGetter: "Done"}, - }, - func() interface{} { - return &jsiiProxy_Namespace2_Foo_Final{} - }, - ) -} - -`; - -exports[`nested-types.ts: /go/testpkg/testpkg_Namespace1.go 1`] = ` +exports[`nested-types.ts: /go/testpkg/Namespace1.go 1`] = ` // testpkg package testpkg @@ -2008,7 +1905,7 @@ func (n *jsiiProxy_Namespace1) Foo() { `; -exports[`nested-types.ts: /go/testpkg/testpkg_Namespace1_Foo.go 1`] = ` +exports[`nested-types.ts: /go/testpkg/Namespace1_Foo.go 1`] = ` // testpkg package testpkg @@ -2020,7 +1917,7 @@ type Namespace1_Foo struct { `; -exports[`nested-types.ts: /go/testpkg/testpkg_Namespace1_IBar.go 1`] = ` +exports[`nested-types.ts: /go/testpkg/Namespace1_IBar.go 1`] = ` // testpkg package testpkg @@ -2059,7 +1956,7 @@ func (j *jsiiProxy_Namespace1_IBar) Bar() *string { `; -exports[`nested-types.ts: /go/testpkg/testpkg_Namespace2.go 1`] = ` +exports[`nested-types.ts: /go/testpkg/Namespace2.go 1`] = ` // testpkg package testpkg @@ -2112,7 +2009,7 @@ func (n *jsiiProxy_Namespace2) Foo() { `; -exports[`nested-types.ts: /go/testpkg/testpkg_Namespace2_Foo.go 1`] = ` +exports[`nested-types.ts: /go/testpkg/Namespace2_Foo.go 1`] = ` // testpkg package testpkg @@ -2127,7 +2024,7 @@ const ( `; -exports[`nested-types.ts: /go/testpkg/testpkg_Namespace2_Foo_Final.go 1`] = ` +exports[`nested-types.ts: /go/testpkg/Namespace2_Foo_Final.go 1`] = ` // testpkg package testpkg @@ -2181,6 +2078,109 @@ func NewNamespace2_Foo_Final_Override(n Namespace2_Foo_Final) { } +`; + +exports[`nested-types.ts: /go/testpkg/go.mod 1`] = ` +module example.test/demo/testpkg + +go 1.18 + +require ( + github.com/aws/jsii-runtime-go v0.0.0 +) + +`; + +exports[`nested-types.ts: /go/testpkg/jsii/jsii.go 1`] = ` +// 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 testpkg-0.0.1.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("testpkg", "0.0.1", tarball) +} + +`; + +exports[`nested-types.ts: /go/testpkg/main.go 1`] = ` +package testpkg + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "testpkg.Namespace1", + reflect.TypeOf((*Namespace1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + }, + func() interface{} { + return &jsiiProxy_Namespace1{} + }, + ) + _jsii_.RegisterStruct( + "testpkg.Namespace1.Foo", + reflect.TypeOf((*Namespace1_Foo)(nil)).Elem(), + ) + _jsii_.RegisterInterface( + "testpkg.Namespace1.IBar", + reflect.TypeOf((*Namespace1_IBar)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "bar", GoGetter: "Bar"}, + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + }, + func() interface{} { + return &jsiiProxy_Namespace1_IBar{} + }, + ) + _jsii_.RegisterClass( + "testpkg.Namespace2", + reflect.TypeOf((*Namespace2)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + }, + func() interface{} { + return &jsiiProxy_Namespace2{} + }, + ) + _jsii_.RegisterEnum( + "testpkg.Namespace2.Foo", + reflect.TypeOf((*Namespace2_Foo)(nil)).Elem(), + map[string]interface{}{ + "BAR": Namespace2_Foo_BAR, + "BAZ": Namespace2_Foo_BAZ, + }, + ) + _jsii_.RegisterClass( + "testpkg.Namespace2.Foo.Final", + reflect.TypeOf((*Namespace2_Foo_Final)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "done", GoGetter: "Done"}, + }, + func() interface{} { + return &jsiiProxy_Namespace2_Foo_Final{} + }, + ) +} + `; exports[`nested-types.ts: /java/pom.xml 1`] = ` diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap index 38673b87a0..f161783572 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-dotnet.test.js.snap @@ -4630,7 +4630,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// Here's how you use it: /// /// /// - /// var calculator = new Calculator(); + /// Calculator calculator = new Calculator(); /// calculator.Add(5); /// calculator.Mul(3); /// Console.WriteLine(calculator.Expression.Value); @@ -7086,11 +7086,11 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// Multiple paragraphs are separated by an empty line. /// /// - /// var x = 12 + 44; - /// var s1 = "string"; - /// var s2 = @"string + /// int x = 12 + 44; + /// string s1 = "string"; + /// string s2 = @"string /// with new newlines"; // see https://github.com/aws/jsii/issues/2569 - /// var s3 = @"string + /// string s3 = @"string /// with /// new lines"; /// @@ -15947,7 +15947,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// First, create a calculator: /// /// /// /// Then call some operations: @@ -15960,7 +15960,7 @@ namespace Amazon.JSII.Tests.CalculatorNamespace /// /// /// [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap index 83d963d183..d1b711aee5 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap @@ -4,22 +4,116 @@ exports[`Generated code for "@scope/jsii-calc-base": / 1`] = ` ┗━ 📁 go ┗━ 📁 jcb + ┣━ 📄 Base.go + ┣━ 📄 BaseProps.go ┣━ 📄 go.mod + ┣━ 📄 IBaseInterface.go ┣━ 📁 internal ┃ ┗━ 📄 types.go - ┣━ 📄 jcb_Base.go - ┣━ 📄 jcb_BaseProps.go - ┣━ 📄 jcb_IBaseInterface.go - ┣━ 📄 jcb_StaticConsumer.go - ┣━ 📄 jcb.go ┣━ 📁 jsii ┃ ┣━ 📄 jsii.go ┃ ┗━ 📄 scope-jsii-calc-base-0.0.0.tgz ┣━ 📄 LICENSE + ┣━ 📄 main.go ┣━ 📄 NOTICE + ┣━ 📄 StaticConsumer.go ┗━ 📄 version `; +exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/Base.go 1`] = ` +// An example direct dependency for jsii-calc. +package jcb + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jcb/jsii" +) + +// A base class. +type Base interface { + // Returns: the name of the class (to verify native type names are created for derived classes). + TypeName() interface{} +} + +// The jsii proxy struct for Base +type jsiiProxy_Base struct { + _ byte // padding +} + +func NewBase_Override(b Base) { + _init_.Initialize() + + _jsii_.Create( + "@scope/jsii-calc-base.Base", + nil, // no parameters + b, + ) +} + +func (b *jsiiProxy_Base) TypeName() interface{} { + var returns interface{} + + _jsii_.Invoke( + b, + "typeName", + nil, // no parameters + &returns, + ) + + return returns +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/BaseProps.go 1`] = ` +// An example direct dependency for jsii-calc. +package jcb + +import ( + "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" +) + +type BaseProps struct { + Foo scopejsiicalcbaseofbase.Very \`field:"required" json:"foo" yaml:"foo"\` + Bar *string \`field:"required" json:"bar" yaml:"bar"\` +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/IBaseInterface.go 1`] = ` +// An example direct dependency for jsii-calc. +package jcb + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + + "github.com/aws/jsii/jsii-calc/go/jcb/internal" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" +) + +type IBaseInterface interface { + scopejsiicalcbaseofbase.IVeryBaseInterface + Bar() +} + +// The jsii proxy for IBaseInterface +type jsiiProxy_IBaseInterface struct { + internal.Type__scopejsiicalcbaseofbaseIVeryBaseInterface +} + +func (i *jsiiProxy_IBaseInterface) Bar() { + _jsii_.InvokeVoid( + i, + "bar", + nil, // no parameters + ) +} + + +`; + exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/LICENSE 1`] = ` Apache License @@ -231,171 +325,7 @@ Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. `; -exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/go.mod 1`] = ` -module github.com/aws/jsii/jsii-calc/go/jcb - -go 1.18 - -require ( - github.com/aws/jsii-runtime-go v0.0.0 - github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 v2.1.1 -) - -`; - -exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/internal/types.go 1`] = ` -package internal -import ( - "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" -) -type Type__scopejsiicalcbaseofbaseIVeryBaseInterface = scopejsiicalcbaseofbase.IVeryBaseInterface - -`; - -exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/jcb.go 1`] = ` -package jcb - -import ( - "reflect" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -func init() { - _jsii_.RegisterClass( - "@scope/jsii-calc-base.Base", - reflect.TypeOf((*Base)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, - }, - func() interface{} { - return &jsiiProxy_Base{} - }, - ) - _jsii_.RegisterStruct( - "@scope/jsii-calc-base.BaseProps", - reflect.TypeOf((*BaseProps)(nil)).Elem(), - ) - _jsii_.RegisterInterface( - "@scope/jsii-calc-base.IBaseInterface", - reflect.TypeOf((*IBaseInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, - }, - func() interface{} { - j := jsiiProxy_IBaseInterface{} - _jsii_.InitJsiiProxy(&j.Type__scopejsiicalcbaseofbaseIVeryBaseInterface) - return &j - }, - ) - _jsii_.RegisterClass( - "@scope/jsii-calc-base.StaticConsumer", - reflect.TypeOf((*StaticConsumer)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_StaticConsumer{} - }, - ) -} - -`; - -exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/jcb_Base.go 1`] = ` -// An example direct dependency for jsii-calc. -package jcb - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jcb/jsii" -) - -// A base class. -type Base interface { - // Returns: the name of the class (to verify native type names are created for derived classes). - TypeName() interface{} -} - -// The jsii proxy struct for Base -type jsiiProxy_Base struct { - _ byte // padding -} - -func NewBase_Override(b Base) { - _init_.Initialize() - - _jsii_.Create( - "@scope/jsii-calc-base.Base", - nil, // no parameters - b, - ) -} - -func (b *jsiiProxy_Base) TypeName() interface{} { - var returns interface{} - - _jsii_.Invoke( - b, - "typeName", - nil, // no parameters - &returns, - ) - - return returns -} - - -`; - -exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/jcb_BaseProps.go 1`] = ` -// An example direct dependency for jsii-calc. -package jcb - -import ( - "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" -) - -type BaseProps struct { - Foo scopejsiicalcbaseofbase.Very \`field:"required" json:"foo" yaml:"foo"\` - Bar *string \`field:"required" json:"bar" yaml:"bar"\` -} - - -`; - -exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/jcb_IBaseInterface.go 1`] = ` -// An example direct dependency for jsii-calc. -package jcb - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - - "github.com/aws/jsii/jsii-calc/go/jcb/internal" - "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" -) - -type IBaseInterface interface { - scopejsiicalcbaseofbase.IVeryBaseInterface - Bar() -} - -// The jsii proxy for IBaseInterface -type jsiiProxy_IBaseInterface struct { - internal.Type__scopejsiicalcbaseofbaseIVeryBaseInterface -} - -func (i *jsiiProxy_IBaseInterface) Bar() { - _jsii_.InvokeVoid( - i, - "bar", - nil, // no parameters - ) -} - - -`; - -exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/jcb_StaticConsumer.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/StaticConsumer.go 1`] = ` // An example direct dependency for jsii-calc. package jcb @@ -453,6 +383,27 @@ func StaticConsumer_Consume(args ...interface{}) { } +`; + +exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/go.mod 1`] = ` +module github.com/aws/jsii/jsii-calc/go/jcb + +go 1.18 + +require ( + github.com/aws/jsii-runtime-go v0.0.0 + github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 v2.1.1 +) + +`; + +exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/internal/types.go 1`] = ` +package internal +import ( + "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" +) +type Type__scopejsiicalcbaseofbaseIVeryBaseInterface = scopejsiicalcbaseofbase.IVeryBaseInterface + `; exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/jsii/jsii.go 1`] = ` @@ -487,6 +438,55 @@ func Initialize() { exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/jsii/scope-jsii-calc-base-0.0.0.tgz 1`] = `go/jcb/jsii/scope-jsii-calc-base-0.0.0.tgz is a tarball`; +exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/main.go 1`] = ` +package jcb + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "@scope/jsii-calc-base.Base", + reflect.TypeOf((*Base)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, + }, + func() interface{} { + return &jsiiProxy_Base{} + }, + ) + _jsii_.RegisterStruct( + "@scope/jsii-calc-base.BaseProps", + reflect.TypeOf((*BaseProps)(nil)).Elem(), + ) + _jsii_.RegisterInterface( + "@scope/jsii-calc-base.IBaseInterface", + reflect.TypeOf((*IBaseInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + }, + func() interface{} { + j := jsiiProxy_IBaseInterface{} + _jsii_.InitJsiiProxy(&j.Type__scopejsiicalcbaseofbaseIVeryBaseInterface) + return &j + }, + ) + _jsii_.RegisterClass( + "@scope/jsii-calc-base.StaticConsumer", + reflect.TypeOf((*StaticConsumer)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_StaticConsumer{} + }, + ) +} + +`; + exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/version 1`] = ` 0.0.0 @@ -502,17 +502,45 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = ` ┗━ 📁 go ┗━ 📁 scopejsiicalcbaseofbase ┣━ 📄 go.mod + ┣━ 📄 IVeryBaseInterface.go ┣━ 📁 jsii ┃ ┣━ 📄 jsii.go ┃ ┗━ 📄 scope-jsii-calc-base-of-base-2.1.1.tgz ┣━ 📄 LICENSE + ┣━ 📄 main.go ┣━ 📄 NOTICE - ┣━ 📄 scopejsiicalcbaseofbase_IVeryBaseInterface.go - ┣━ 📄 scopejsiicalcbaseofbase_StaticConsumer.go - ┣━ 📄 scopejsiicalcbaseofbase_Very.go - ┣━ 📄 scopejsiicalcbaseofbase_VeryBaseProps.go - ┣━ 📄 scopejsiicalcbaseofbase.go - ┗━ 📄 version + ┣━ 📄 StaticConsumer.go + ┣━ 📄 version + ┣━ 📄 Very.go + ┗━ 📄 VeryBaseProps.go +`; + +exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/IVeryBaseInterface.go 1`] = ` +// An example transitive dependency for jsii-calc. +package scopejsiicalcbaseofbase + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +type IVeryBaseInterface interface { + Foo() +} + +// The jsii proxy for IVeryBaseInterface +type jsiiProxy_IVeryBaseInterface struct { + _ byte // padding +} + +func (i *jsiiProxy_IVeryBaseInterface) Foo() { + _jsii_.InvokeVoid( + i, + "foo", + nil, // no parameters + ) +} + + `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/LICENSE 1`] = ` @@ -726,119 +754,7 @@ Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. `; -exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/go.mod 1`] = ` -module github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 - -go 1.18 - -require ( - github.com/aws/jsii-runtime-go v0.0.0 -) - -`; - -exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/jsii/jsii.go 1`] = ` -// 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 scope-jsii-calc-base-of-base-2.1.1.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("@scope/jsii-calc-base-of-base", "2.1.1", tarball) -} - -`; - -exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/jsii/scope-jsii-calc-base-of-base-2.1.1.tgz 1`] = `go/scopejsiicalcbaseofbase/jsii/scope-jsii-calc-base-of-base-2.1.1.tgz is a tarball`; - -exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/scopejsiicalcbaseofbase.go 1`] = ` -package scopejsiicalcbaseofbase - -import ( - "reflect" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -func init() { - _jsii_.RegisterInterface( - "@scope/jsii-calc-base-of-base.IVeryBaseInterface", - reflect.TypeOf((*IVeryBaseInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, - }, - func() interface{} { - return &jsiiProxy_IVeryBaseInterface{} - }, - ) - _jsii_.RegisterClass( - "@scope/jsii-calc-base-of-base.StaticConsumer", - reflect.TypeOf((*StaticConsumer)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_StaticConsumer{} - }, - ) - _jsii_.RegisterClass( - "@scope/jsii-calc-base-of-base.Very", - reflect.TypeOf((*Very)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "hey", GoMethod: "Hey"}, - }, - func() interface{} { - return &jsiiProxy_Very{} - }, - ) - _jsii_.RegisterStruct( - "@scope/jsii-calc-base-of-base.VeryBaseProps", - reflect.TypeOf((*VeryBaseProps)(nil)).Elem(), - ) -} - -`; - -exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/scopejsiicalcbaseofbase_IVeryBaseInterface.go 1`] = ` -// An example transitive dependency for jsii-calc. -package scopejsiicalcbaseofbase - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -type IVeryBaseInterface interface { - Foo() -} - -// The jsii proxy for IVeryBaseInterface -type jsiiProxy_IVeryBaseInterface struct { - _ byte // padding -} - -func (i *jsiiProxy_IVeryBaseInterface) Foo() { - _jsii_.InvokeVoid( - i, - "foo", - nil, // no parameters - ) -} - - -`; - -exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/scopejsiicalcbaseofbase_StaticConsumer.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/StaticConsumer.go 1`] = ` // An example transitive dependency for jsii-calc. package scopejsiicalcbaseofbase @@ -873,7 +789,7 @@ func StaticConsumer_Consume(_args ...interface{}) { `; -exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/scopejsiicalcbaseofbase_Very.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/Very.go 1`] = ` // An example transitive dependency for jsii-calc. package scopejsiicalcbaseofbase @@ -936,7 +852,7 @@ func (v *jsiiProxy_Very) Hey() *float64 { `; -exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/scopejsiicalcbaseofbase_VeryBaseProps.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/VeryBaseProps.go 1`] = ` // An example transitive dependency for jsii-calc. package scopejsiicalcbaseofbase @@ -948,74 +864,389 @@ type VeryBaseProps struct { `; -exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/version 1`] = ` -2.1.1 +exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/go.mod 1`] = ` +module github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 -`; +go 1.18 -exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = ` - -┗━ 🕳 There is nothing here -`; +require ( + github.com/aws/jsii-runtime-go v0.0.0 +) -exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` - - ┗━ 📁 go - ┗━ 📁 scopejsiicalclib - ┣━ 📁 customsubmodulename - ┃ ┣━ 📄 customsubmodulename_IReflectable.go - ┃ ┣━ 📄 customsubmodulename_NestingClass_NestedClass.go - ┃ ┣━ 📄 customsubmodulename_NestingClass_NestedStruct.go - ┃ ┣━ 📄 customsubmodulename_NestingClass.go - ┃ ┣━ 📄 customsubmodulename_ReflectableEntry.go - ┃ ┣━ 📄 customsubmodulename_Reflector.go - ┃ ┣━ 📄 customsubmodulename.go - ┃ ┗━ 📄 README.md - ┣━ 📁 deprecationremoval - ┃ ┣━ 📄 deprecationremoval_IInterface.go - ┃ ┣━ 📄 deprecationremoval_InterfaceFactory.go - ┃ ┗━ 📄 deprecationremoval.go - ┣━ 📄 go.mod - ┣━ 📁 internal - ┃ ┗━ 📄 types.go - ┣━ 📁 jsii - ┃ ┣━ 📄 jsii.go - ┃ ┗━ 📄 scope-jsii-calc-lib-0.0.0.tgz - ┣━ 📄 LICENSE - ┣━ 📄 NOTICE - ┣━ 📄 scopejsiicalclib_BaseFor2647.go - ┣━ 📄 scopejsiicalclib_DiamondLeft.go - ┣━ 📄 scopejsiicalclib_DiamondRight.go - ┣━ 📄 scopejsiicalclib_EnumFromScopedModule.go - ┣━ 📄 scopejsiicalclib_IDoublable.go - ┣━ 📄 scopejsiicalclib_IFriendly.go - ┣━ 📄 scopejsiicalclib_IThreeLevelsInterface.go - ┣━ 📄 scopejsiicalclib_MyFirstStruct.go - ┣━ 📄 scopejsiicalclib_Number.go - ┣━ 📄 scopejsiicalclib_NumericValue.go - ┣━ 📄 scopejsiicalclib_Operation.go - ┣━ 📄 scopejsiicalclib_StructWithOnlyOptionals.go - ┣━ 📄 scopejsiicalclib.go - ┗━ 📄 version `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/LICENSE 1`] = ` - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/jsii/jsii.go 1`] = ` +// 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 - 1. Definitions. +import ( + _ "embed" - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. +//go:embed scope-jsii-calc-base-of-base-2.1.1.tgz +var tarball []byte - "Legal Entity" shall mean the union of the acting entity and all +// 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("@scope/jsii-calc-base-of-base", "2.1.1", tarball) +} + +`; + +exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/jsii/scope-jsii-calc-base-of-base-2.1.1.tgz 1`] = `go/scopejsiicalcbaseofbase/jsii/scope-jsii-calc-base-of-base-2.1.1.tgz is a tarball`; + +exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/main.go 1`] = ` +package scopejsiicalcbaseofbase + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterInterface( + "@scope/jsii-calc-base-of-base.IVeryBaseInterface", + reflect.TypeOf((*IVeryBaseInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + }, + func() interface{} { + return &jsiiProxy_IVeryBaseInterface{} + }, + ) + _jsii_.RegisterClass( + "@scope/jsii-calc-base-of-base.StaticConsumer", + reflect.TypeOf((*StaticConsumer)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_StaticConsumer{} + }, + ) + _jsii_.RegisterClass( + "@scope/jsii-calc-base-of-base.Very", + reflect.TypeOf((*Very)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "hey", GoMethod: "Hey"}, + }, + func() interface{} { + return &jsiiProxy_Very{} + }, + ) + _jsii_.RegisterStruct( + "@scope/jsii-calc-base-of-base.VeryBaseProps", + reflect.TypeOf((*VeryBaseProps)(nil)).Elem(), + ) +} + +`; + +exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/version 1`] = ` +2.1.1 + +`; + +exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = ` + +┗━ 🕳 There is nothing here +`; + +exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` + + ┗━ 📁 go + ┗━ 📁 scopejsiicalclib + ┣━ 📄 BaseFor2647.go + ┣━ 📁 customsubmodulename + ┃ ┣━ 📄 IReflectable.go + ┃ ┣━ 📄 main.go + ┃ ┣━ 📄 NestingClass_NestedClass.go + ┃ ┣━ 📄 NestingClass_NestedStruct.go + ┃ ┣━ 📄 NestingClass.go + ┃ ┣━ 📄 README.md + ┃ ┣━ 📄 ReflectableEntry.go + ┃ ┗━ 📄 Reflector.go + ┣━ 📁 deprecationremoval + ┃ ┣━ 📄 IInterface.go + ┃ ┣━ 📄 InterfaceFactory.go + ┃ ┗━ 📄 main.go + ┣━ 📄 DiamondLeft.go + ┣━ 📄 DiamondRight.go + ┣━ 📄 EnumFromScopedModule.go + ┣━ 📄 go.mod + ┣━ 📄 IDoublable.go + ┣━ 📄 IFriendly.go + ┣━ 📁 internal + ┃ ┗━ 📄 types.go + ┣━ 📄 IThreeLevelsInterface.go + ┣━ 📁 jsii + ┃ ┣━ 📄 jsii.go + ┃ ┗━ 📄 scope-jsii-calc-lib-0.0.0.tgz + ┣━ 📄 LICENSE + ┣━ 📄 main.go + ┣━ 📄 MyFirstStruct.go + ┣━ 📄 NOTICE + ┣━ 📄 Number.go + ┣━ 📄 NumericValue.go + ┣━ 📄 Operation.go + ┣━ 📄 StructWithOnlyOptionals.go + ┗━ 📄 version +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/BaseFor2647.go 1`] = ` +// A simple calcuator library built on JSII. +package scopejsiicalclib + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" + + "github.com/aws/jsii/jsii-calc/go/jcb" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" +) + +// A base class for testing #2647. +// +// The method \`foo\` has a parameter that uses a type +// from a dependent module. Since Go "reimplments" this method, it will also need +// to include an "import" statement for the calc-base module. +// See: https://github.com/aws/jsii/issues/2647 +// +// Deprecated. +type BaseFor2647 interface { + // Deprecated. + Foo(obj jcb.IBaseInterface) +} + +// The jsii proxy struct for BaseFor2647 +type jsiiProxy_BaseFor2647 struct { + _ byte // padding +} + +// Deprecated. +func NewBaseFor2647(very scopejsiicalcbaseofbase.Very) BaseFor2647 { + _init_.Initialize() + + j := jsiiProxy_BaseFor2647{} + + _jsii_.Create( + "@scope/jsii-calc-lib.BaseFor2647", + []interface{}{very}, + &j, + ) + + return &j +} + +// Deprecated. +func NewBaseFor2647_Override(b BaseFor2647, very scopejsiicalcbaseofbase.Very) { + _init_.Initialize() + + _jsii_.Create( + "@scope/jsii-calc-lib.BaseFor2647", + []interface{}{very}, + b, + ) +} + +func (b *jsiiProxy_BaseFor2647) Foo(obj jcb.IBaseInterface) { + _jsii_.InvokeVoid( + b, + "foo", + []interface{}{obj}, + ) +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/DiamondLeft.go 1`] = ` +// A simple calcuator library built on JSII. +package scopejsiicalclib + + +// Deprecated. +type DiamondLeft struct { + // Deprecated. + HoistedTop *string \`field:"optional" json:"hoistedTop" yaml:"hoistedTop"\` + // Deprecated. + Left *float64 \`field:"optional" json:"left" yaml:"left"\` +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/DiamondRight.go 1`] = ` +// A simple calcuator library built on JSII. +package scopejsiicalclib + + +// Deprecated. +type DiamondRight struct { + // Deprecated. + HoistedTop *string \`field:"optional" json:"hoistedTop" yaml:"hoistedTop"\` + // Deprecated. + Right *bool \`field:"optional" json:"right" yaml:"right"\` +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/EnumFromScopedModule.go 1`] = ` +// A simple calcuator library built on JSII. +package scopejsiicalclib + + +// Check that enums from \\@scoped packages can be references. +// +// See awslabs/jsii#138. +// Deprecated. +type EnumFromScopedModule string + +const ( + // Deprecated. + EnumFromScopedModule_VALUE1 EnumFromScopedModule = "VALUE1" + // Deprecated. + EnumFromScopedModule_VALUE2 EnumFromScopedModule = "VALUE2" +) + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/IDoublable.go 1`] = ` +// A simple calcuator library built on JSII. +package scopejsiicalclib + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +// The general contract for a concrete number. +// Deprecated. +type IDoublable interface { + // Deprecated. + DoubleValue() *float64 +} + +// The jsii proxy for IDoublable +type jsiiProxy_IDoublable struct { + _ byte // padding +} + +func (j *jsiiProxy_IDoublable) DoubleValue() *float64 { + var returns *float64 + _jsii_.Get( + j, + "doubleValue", + &returns, + ) + return returns +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/IFriendly.go 1`] = ` +// A simple calcuator library built on JSII. +package scopejsiicalclib + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +// Applies to classes that are considered friendly. +// +// These classes can be greeted with +// a "hello" or "goodbye" blessing and they will respond back in a fun and friendly manner. +// Deprecated. +type IFriendly interface { + // Say hello! + // Deprecated. + Hello() *string +} + +// The jsii proxy for IFriendly +type jsiiProxy_IFriendly struct { + _ byte // padding +} + +func (i *jsiiProxy_IFriendly) Hello() *string { + var returns *string + + _jsii_.Invoke( + i, + "hello", + nil, // no parameters + &returns, + ) + + return returns +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/IThreeLevelsInterface.go 1`] = ` +// A simple calcuator library built on JSII. +package scopejsiicalclib + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + + "github.com/aws/jsii/jsii-calc/go/jcb" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/internal" +) + +// Interface that inherits from packages 2 levels up the tree. +// +// Their presence validates that .NET/Java/jsii-reflect can track all fields +// far enough up the tree. +// Deprecated. +type IThreeLevelsInterface interface { + jcb.IBaseInterface + // Deprecated. + Baz() +} + +// The jsii proxy for IThreeLevelsInterface +type jsiiProxy_IThreeLevelsInterface struct { + internal.Type__jcbIBaseInterface +} + +func (i *jsiiProxy_IThreeLevelsInterface) Baz() { + _jsii_.InvokeVoid( + i, + "baz", + nil, // no parameters + ) +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/LICENSE 1`] = ` + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the @@ -1204,189 +1435,438 @@ exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib limitations under the License. `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/NOTICE 1`] = ` -jsii -Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/MyFirstStruct.go 1`] = ` +// A simple calcuator library built on JSII. +package scopejsiicalclib -`; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/README.md 1`] = ` -# Submodule Readme +// This is the first struct we have created in jsii. +// Deprecated. +type MyFirstStruct struct { + // An awesome number value. + // Deprecated. + Anumber *float64 \`field:"required" json:"anumber" yaml:"anumber"\` + // A string value. + // Deprecated. + Astring *string \`field:"required" json:"astring" yaml:"astring"\` + // Deprecated. + FirstOptional *[]*string \`field:"optional" json:"firstOptional" yaml:"firstOptional"\` +} -This is a submodule readme. `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename.go 1`] = ` -package customsubmodulename - -import ( - "reflect" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -func init() { - _jsii_.RegisterInterface( - "@scope/jsii-calc-lib.submodule.IReflectable", - reflect.TypeOf((*IReflectable)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "entries", GoGetter: "Entries"}, - }, - func() interface{} { - return &jsiiProxy_IReflectable{} - }, - ) - _jsii_.RegisterClass( - "@scope/jsii-calc-lib.submodule.NestingClass", - reflect.TypeOf((*NestingClass)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_NestingClass{} - }, - ) - _jsii_.RegisterClass( - "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass", - reflect.TypeOf((*NestingClass_NestedClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, - }, - func() interface{} { - return &jsiiProxy_NestingClass_NestedClass{} - }, - ) - _jsii_.RegisterStruct( - "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct", - reflect.TypeOf((*NestingClass_NestedStruct)(nil)).Elem(), - ) - _jsii_.RegisterStruct( - "@scope/jsii-calc-lib.submodule.ReflectableEntry", - reflect.TypeOf((*ReflectableEntry)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "@scope/jsii-calc-lib.submodule.Reflector", - reflect.TypeOf((*Reflector)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "asMap", GoMethod: "AsMap"}, - }, - func() interface{} { - return &jsiiProxy_Reflector{} - }, - ) -} +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/NOTICE 1`] = ` +jsii +Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_IReflectable.go 1`] = ` -package customsubmodulename +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/Number.go 1`] = ` +// A simple calcuator library built on JSII. +package scopejsiicalclib import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" ) +// Represents a concrete number. // Deprecated. -type IReflectable interface { +type Number interface { + NumericValue + IDoublable + // The number multiplied by 2. // Deprecated. - Entries() *[]*ReflectableEntry + DoubleValue() *float64 + // The number. + // Deprecated. + Value() *float64 + // String representation of the value. + // Deprecated. + ToString() *string + // Returns: the name of the class (to verify native type names are created for derived classes). + // Deprecated. + TypeName() interface{} } -// The jsii proxy for IReflectable -type jsiiProxy_IReflectable struct { - _ byte // padding +// The jsii proxy struct for Number +type jsiiProxy_Number struct { + jsiiProxy_NumericValue + jsiiProxy_IDoublable } -func (j *jsiiProxy_IReflectable) Entries() *[]*ReflectableEntry { - var returns *[]*ReflectableEntry +func (j *jsiiProxy_Number) DoubleValue() *float64 { + var returns *float64 _jsii_.Get( j, - "entries", + "doubleValue", &returns, ) return returns } - -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_NestingClass.go 1`] = ` -package customsubmodulename - - -// This class is here to show we can use nested classes across module boundaries. -// Deprecated. -type NestingClass interface { -} - -// The jsii proxy struct for NestingClass -type jsiiProxy_NestingClass struct { - _ byte // padding -} - - -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_NestingClass_NestedClass.go 1`] = ` -package customsubmodulename - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" -) - -// This class is here to show we can use nested classes across module boundaries. -// Deprecated. -type NestingClass_NestedClass interface { - // Deprecated. - Property() *string -} - -// The jsii proxy struct for NestingClass_NestedClass -type jsiiProxy_NestingClass_NestedClass struct { - _ byte // padding -} - -func (j *jsiiProxy_NestingClass_NestedClass) Property() *string { - var returns *string +func (j *jsiiProxy_Number) Value() *float64 { + var returns *float64 _jsii_.Get( j, - "property", + "value", &returns, ) return returns } +// Creates a Number object. // Deprecated. -func NewNestingClass_NestedClass() NestingClass_NestedClass { +func NewNumber(value *float64) Number { _init_.Initialize() - j := jsiiProxy_NestingClass_NestedClass{} + j := jsiiProxy_Number{} _jsii_.Create( - "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass", - nil, // no parameters + "@scope/jsii-calc-lib.Number", + []interface{}{value}, &j, ) return &j } +// Creates a Number object. // Deprecated. -func NewNestingClass_NestedClass_Override(n NestingClass_NestedClass) { +func NewNumber_Override(n Number, value *float64) { _init_.Initialize() _jsii_.Create( - "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass", - nil, // no parameters + "@scope/jsii-calc-lib.Number", + []interface{}{value}, n, ) } +func (n *jsiiProxy_Number) ToString() *string { + var returns *string -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_NestingClass_NestedStruct.go 1`] = ` -package customsubmodulename + _jsii_.Invoke( + n, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +func (n *jsiiProxy_Number) TypeName() interface{} { + var returns interface{} + + _jsii_.Invoke( + n, + "typeName", + nil, // no parameters + &returns, + ) + + return returns +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/NumericValue.go 1`] = ` +// A simple calcuator library built on JSII. +package scopejsiicalclib + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" + + "github.com/aws/jsii/jsii-calc/go/jcb" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/internal" +) + +// Abstract class which represents a numeric value. +// Deprecated. +type NumericValue interface { + jcb.Base + // The value. + // Deprecated. + Value() *float64 + // String representation of the value. + // Deprecated. + ToString() *string + // Returns: the name of the class (to verify native type names are created for derived classes). + // Deprecated. + TypeName() interface{} +} + +// The jsii proxy struct for NumericValue +type jsiiProxy_NumericValue struct { + internal.Type__jcbBase +} + +func (j *jsiiProxy_NumericValue) Value() *float64 { + var returns *float64 + _jsii_.Get( + j, + "value", + &returns, + ) + return returns +} + + +// Deprecated. +func NewNumericValue_Override(n NumericValue) { + _init_.Initialize() + + _jsii_.Create( + "@scope/jsii-calc-lib.NumericValue", + nil, // no parameters + n, + ) +} + +func (n *jsiiProxy_NumericValue) ToString() *string { + var returns *string + + _jsii_.Invoke( + n, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +func (n *jsiiProxy_NumericValue) TypeName() interface{} { + var returns interface{} + + _jsii_.Invoke( + n, + "typeName", + nil, // no parameters + &returns, + ) + + return returns +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/Operation.go 1`] = ` +// A simple calcuator library built on JSII. +package scopejsiicalclib + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" +) + +// Represents an operation on values. +// Deprecated. +type Operation interface { + NumericValue + // The value. + // Deprecated. + Value() *float64 + // String representation of the value. + // Deprecated. + ToString() *string + // Returns: the name of the class (to verify native type names are created for derived classes). + // Deprecated. + TypeName() interface{} +} + +// The jsii proxy struct for Operation +type jsiiProxy_Operation struct { + jsiiProxy_NumericValue +} + +func (j *jsiiProxy_Operation) Value() *float64 { + var returns *float64 + _jsii_.Get( + j, + "value", + &returns, + ) + return returns +} + + +// Deprecated. +func NewOperation_Override(o Operation) { + _init_.Initialize() + + _jsii_.Create( + "@scope/jsii-calc-lib.Operation", + nil, // no parameters + o, + ) +} + +func (o *jsiiProxy_Operation) ToString() *string { + var returns *string + + _jsii_.Invoke( + o, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +func (o *jsiiProxy_Operation) TypeName() interface{} { + var returns interface{} + + _jsii_.Invoke( + o, + "typeName", + nil, // no parameters + &returns, + ) + + return returns +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/StructWithOnlyOptionals.go 1`] = ` +// A simple calcuator library built on JSII. +package scopejsiicalclib + + +// This is a struct with only optional properties. +// Deprecated. +type StructWithOnlyOptionals struct { + // The first optional! + // Deprecated. + Optional1 *string \`field:"optional" json:"optional1" yaml:"optional1"\` + // Deprecated. + Optional2 *float64 \`field:"optional" json:"optional2" yaml:"optional2"\` + // Deprecated. + Optional3 *bool \`field:"optional" json:"optional3" yaml:"optional3"\` +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/IReflectable.go 1`] = ` +package customsubmodulename + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +// Deprecated. +type IReflectable interface { + // Deprecated. + Entries() *[]*ReflectableEntry +} + +// The jsii proxy for IReflectable +type jsiiProxy_IReflectable struct { + _ byte // padding +} + +func (j *jsiiProxy_IReflectable) Entries() *[]*ReflectableEntry { + var returns *[]*ReflectableEntry + _jsii_.Get( + j, + "entries", + &returns, + ) + return returns +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/NestingClass.go 1`] = ` +package customsubmodulename + + +// This class is here to show we can use nested classes across module boundaries. +// Deprecated. +type NestingClass interface { +} + +// The jsii proxy struct for NestingClass +type jsiiProxy_NestingClass struct { + _ byte // padding +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/NestingClass_NestedClass.go 1`] = ` +package customsubmodulename + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" +) + +// This class is here to show we can use nested classes across module boundaries. +// Deprecated. +type NestingClass_NestedClass interface { + // Deprecated. + Property() *string +} + +// The jsii proxy struct for NestingClass_NestedClass +type jsiiProxy_NestingClass_NestedClass struct { + _ byte // padding +} + +func (j *jsiiProxy_NestingClass_NestedClass) Property() *string { + var returns *string + _jsii_.Get( + j, + "property", + &returns, + ) + return returns +} + + +// Deprecated. +func NewNestingClass_NestedClass() NestingClass_NestedClass { + _init_.Initialize() + + j := jsiiProxy_NestingClass_NestedClass{} + + _jsii_.Create( + "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass", + nil, // no parameters + &j, + ) + + return &j +} + +// Deprecated. +func NewNestingClass_NestedClass_Override(n NestingClass_NestedClass) { + _init_.Initialize() + + _jsii_.Create( + "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass", + nil, // no parameters + n, + ) +} + + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/NestingClass_NestedStruct.go 1`] = ` +package customsubmodulename // This is a struct, nested within a class. @@ -1401,7 +1881,14 @@ type NestingClass_NestedStruct struct { `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_ReflectableEntry.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/README.md 1`] = ` +# Submodule Readme + +This is a submodule readme. + +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/ReflectableEntry.go 1`] = ` package customsubmodulename @@ -1416,7 +1903,7 @@ type ReflectableEntry struct { `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/Reflector.go 1`] = ` package customsubmodulename import ( @@ -1477,8 +1964,8 @@ func (r *jsiiProxy_Reflector) AsMap(reflectable IReflectable) *map[string]interf `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/deprecationremoval/deprecationremoval.go 1`] = ` -package deprecationremoval +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/main.go 1`] = ` +package customsubmodulename import ( "reflect" @@ -1488,28 +1975,56 @@ import ( func init() { _jsii_.RegisterInterface( - "@scope/jsii-calc-lib.deprecationRemoval.IInterface", - reflect.TypeOf((*IInterface)(nil)).Elem(), + "@scope/jsii-calc-lib.submodule.IReflectable", + reflect.TypeOf((*IReflectable)(nil)).Elem(), []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + _jsii_.MemberProperty{JsiiProperty: "entries", GoGetter: "Entries"}, }, func() interface{} { - return &jsiiProxy_IInterface{} + return &jsiiProxy_IReflectable{} }, ) _jsii_.RegisterClass( - "@scope/jsii-calc-lib.deprecationRemoval.InterfaceFactory", - reflect.TypeOf((*InterfaceFactory)(nil)).Elem(), + "@scope/jsii-calc-lib.submodule.NestingClass", + reflect.TypeOf((*NestingClass)(nil)).Elem(), nil, // no members func() interface{} { - return &jsiiProxy_InterfaceFactory{} + return &jsiiProxy_NestingClass{} + }, + ) + _jsii_.RegisterClass( + "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass", + reflect.TypeOf((*NestingClass_NestedClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, + }, + func() interface{} { + return &jsiiProxy_NestingClass_NestedClass{} + }, + ) + _jsii_.RegisterStruct( + "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct", + reflect.TypeOf((*NestingClass_NestedStruct)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "@scope/jsii-calc-lib.submodule.ReflectableEntry", + reflect.TypeOf((*ReflectableEntry)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "@scope/jsii-calc-lib.submodule.Reflector", + reflect.TypeOf((*Reflector)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "asMap", GoMethod: "AsMap"}, + }, + func() interface{} { + return &jsiiProxy_Reflector{} }, ) } `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/deprecationremoval/deprecationremoval_IInterface.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/deprecationremoval/IInterface.go 1`] = ` package deprecationremoval import ( @@ -1538,7 +2053,7 @@ func (i *jsiiProxy_IInterface) Method() { `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/deprecationremoval/deprecationremoval_InterfaceFactory.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/deprecationremoval/InterfaceFactory.go 1`] = ` package deprecationremoval import ( @@ -1572,6 +2087,38 @@ func InterfaceFactory_Create() IInterface { } +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/deprecationremoval/main.go 1`] = ` +package deprecationremoval + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterInterface( + "@scope/jsii-calc-lib.deprecationRemoval.IInterface", + reflect.TypeOf((*IInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + }, + func() interface{} { + return &jsiiProxy_IInterface{} + }, + ) + _jsii_.RegisterClass( + "@scope/jsii-calc-lib.deprecationRemoval.InterfaceFactory", + reflect.TypeOf((*InterfaceFactory)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_InterfaceFactory{} + }, + ) +} + `; exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/go.mod 1`] = ` @@ -1631,7 +2178,7 @@ func Initialize() { exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/jsii/scope-jsii-calc-lib-0.0.0.tgz 1`] = `go/scopejsiicalclib/jsii/scope-jsii-calc-lib-0.0.0.tgz is a tarball`; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib.go 1`] = ` +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/main.go 1`] = ` package scopejsiicalclib import ( @@ -1757,189 +2304,707 @@ func init() { `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_BaseFor2647.go 1`] = ` -// A simple calcuator library built on JSII. -package scopejsiicalclib - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" - - "github.com/aws/jsii/jsii-calc/go/jcb" - "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" -) - -// A base class for testing #2647. -// -// The method \`foo\` has a parameter that uses a type -// from a dependent module. Since Go "reimplments" this method, it will also need -// to include an "import" statement for the calc-base module. -// See: https://github.com/aws/jsii/issues/2647 -// -// Deprecated. -type BaseFor2647 interface { - // Deprecated. - Foo(obj jcb.IBaseInterface) -} - -// The jsii proxy struct for BaseFor2647 -type jsiiProxy_BaseFor2647 struct { - _ byte // padding -} - -// Deprecated. -func NewBaseFor2647(very scopejsiicalcbaseofbase.Very) BaseFor2647 { - _init_.Initialize() - - j := jsiiProxy_BaseFor2647{} - - _jsii_.Create( - "@scope/jsii-calc-lib.BaseFor2647", - []interface{}{very}, - &j, - ) - - return &j -} - -// Deprecated. -func NewBaseFor2647_Override(b BaseFor2647, very scopejsiicalcbaseofbase.Very) { - _init_.Initialize() - - _jsii_.Create( - "@scope/jsii-calc-lib.BaseFor2647", - []interface{}{very}, - b, - ) -} - -func (b *jsiiProxy_BaseFor2647) Foo(obj jcb.IBaseInterface) { - _jsii_.InvokeVoid( - b, - "foo", - []interface{}{obj}, - ) -} - +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/version 1`] = ` +0.0.0-devpreview `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_DiamondLeft.go 1`] = ` -// A simple calcuator library built on JSII. -package scopejsiicalclib - - -// Deprecated. -type DiamondLeft struct { - // Deprecated. - HoistedTop *string \`field:"optional" json:"hoistedTop" yaml:"hoistedTop"\` - // Deprecated. - Left *float64 \`field:"optional" json:"left" yaml:"left"\` -} - - +exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` + + ┗━ 📁 go + ┗━ 📁 scopejsiicalclib + ┣━ 🆕 BaseFor2647__checks.go + ┣━ 🆕 BaseFor2647__no_checks.go + ┣━ 📄 BaseFor2647.go.diff + ┣━ 📁 customsubmodulename + ┃ ┣━ 🆕 Reflector__checks.go + ┃ ┣━ 🆕 Reflector__no_checks.go + ┃ ┗━ 📄 Reflector.go.diff + ┣━ 🆕 Number__checks.go + ┣━ 🆕 Number__no_checks.go + ┗━ 📄 Number.go.diff `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_DiamondRight.go 1`] = ` -// A simple calcuator library built on JSII. -package scopejsiicalclib - - -// Deprecated. -type DiamondRight struct { - // Deprecated. - HoistedTop *string \`field:"optional" json:"hoistedTop" yaml:"hoistedTop"\` - // Deprecated. - Right *bool \`field:"optional" json:"right" yaml:"right"\` -} - - +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/BaseFor2647.go.diff 1`] = ` +--- go/scopejsiicalclib/BaseFor2647.go --no-runtime-type-checking ++++ go/scopejsiicalclib/BaseFor2647.go --runtime-type-checking +@@ -29,10 +29,13 @@ + + // Deprecated. + func NewBaseFor2647(very scopejsiicalcbaseofbase.Very) BaseFor2647 { + _init_.Initialize() + ++ if err := validateNewBaseFor2647Parameters(very); err != nil { ++ panic(err) ++ } + j := jsiiProxy_BaseFor2647{} + + _jsii_.Create( + "@scope/jsii-calc-lib.BaseFor2647", + []interface{}{very}, +@@ -52,10 +55,13 @@ + b, + ) + } + + func (b *jsiiProxy_BaseFor2647) Foo(obj jcb.IBaseInterface) { ++ if err := b.validateFooParameters(obj); err != nil { ++ panic(err) ++ } + _jsii_.InvokeVoid( + b, + "foo", + []interface{}{obj}, + ) `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_EnumFromScopedModule.go 1`] = ` -// A simple calcuator library built on JSII. -package scopejsiicalclib +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/BaseFor2647__checks.go.diff 1`] = ` +--- go/scopejsiicalclib/BaseFor2647__checks.go --no-runtime-type-checking ++++ go/scopejsiicalclib/BaseFor2647__checks.go --runtime-type-checking +@@ -0,0 +1,28 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator library built on JSII. ++package scopejsiicalclib ++ ++import ( ++ "fmt" ++ ++ "github.com/aws/jsii/jsii-calc/go/jcb" ++ "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" ++) ++ ++func (b *jsiiProxy_BaseFor2647) validateFooParameters(obj jcb.IBaseInterface) error { ++ if obj == nil { ++ return fmt.Errorf("parameter obj is required, but nil was provided") ++ } ++ ++ return nil ++} ++ ++func validateNewBaseFor2647Parameters(very scopejsiicalcbaseofbase.Very) error { ++ if very == nil { ++ return fmt.Errorf("parameter very is required, but nil was provided") ++ } ++ ++ return nil ++} ++ +`; +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/BaseFor2647__no_checks.go.diff 1`] = ` +--- go/scopejsiicalclib/BaseFor2647__no_checks.go --no-runtime-type-checking ++++ go/scopejsiicalclib/BaseFor2647__no_checks.go --runtime-type-checking +@@ -0,0 +1,15 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator library built on JSII. ++package scopejsiicalclib ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (b *jsiiProxy_BaseFor2647) validateFooParameters(obj jcb.IBaseInterface) error { ++ return nil ++} ++ ++func validateNewBaseFor2647Parameters(very scopejsiicalcbaseofbase.Very) error { ++ return nil ++} ++ +`; -// Check that enums from \\@scoped packages can be references. -// -// See awslabs/jsii#138. -// Deprecated. -type EnumFromScopedModule string +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/Number.go.diff 1`] = ` +--- go/scopejsiicalclib/Number.go --no-runtime-type-checking ++++ go/scopejsiicalclib/Number.go --runtime-type-checking +@@ -55,10 +55,13 @@ + // Creates a Number object. + // Deprecated. + func NewNumber(value *float64) Number { + _init_.Initialize() + ++ if err := validateNewNumberParameters(value); err != nil { ++ panic(err) ++ } + j := jsiiProxy_Number{} + + _jsii_.Create( + "@scope/jsii-calc-lib.Number", + []interface{}{value}, +`; -const ( - // Deprecated. - EnumFromScopedModule_VALUE1 EnumFromScopedModule = "VALUE1" - // Deprecated. - EnumFromScopedModule_VALUE2 EnumFromScopedModule = "VALUE2" -) +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/Number__checks.go.diff 1`] = ` +--- go/scopejsiicalclib/Number__checks.go --no-runtime-type-checking ++++ go/scopejsiicalclib/Number__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator library built on JSII. ++package scopejsiicalclib ++ ++import ( ++ "fmt" ++) ++ ++func validateNewNumberParameters(value *float64) error { ++ if value == nil { ++ return fmt.Errorf("parameter value is required, but nil was provided") ++ } ++ ++ return nil ++} ++ +`; +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/Number__no_checks.go.diff 1`] = ` +--- go/scopejsiicalclib/Number__no_checks.go --no-runtime-type-checking ++++ go/scopejsiicalclib/Number__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator library built on JSII. ++package scopejsiicalclib ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateNewNumberParameters(value *float64) error { ++ return nil ++} ++ +`; +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/Reflector.go.diff 1`] = ` +--- go/scopejsiicalclib/customsubmodulename/Reflector.go --no-runtime-type-checking ++++ go/scopejsiicalclib/customsubmodulename/Reflector.go --runtime-type-checking +@@ -41,10 +41,13 @@ + r, + ) + } + + func (r *jsiiProxy_Reflector) AsMap(reflectable IReflectable) *map[string]interface{} { ++ if err := r.validateAsMapParameters(reflectable); err != nil { ++ panic(err) ++ } + var returns *map[string]interface{} + + _jsii_.Invoke( + r, + "asMap", `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_IDoublable.go 1`] = ` -// A simple calcuator library built on JSII. -package scopejsiicalclib +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/Reflector__checks.go.diff 1`] = ` +--- go/scopejsiicalclib/customsubmodulename/Reflector__checks.go --no-runtime-type-checking ++++ go/scopejsiicalclib/customsubmodulename/Reflector__checks.go --runtime-type-checking +@@ -0,0 +1,16 @@ ++//go:build !no_runtime_type_checking ++ ++package customsubmodulename ++ ++import ( ++ "fmt" ++) ++ ++func (r *jsiiProxy_Reflector) validateAsMapParameters(reflectable IReflectable) error { ++ if reflectable == nil { ++ return fmt.Errorf("parameter reflectable is required, but nil was provided") ++ } ++ ++ return nil ++} ++ +`; + +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/Reflector__no_checks.go.diff 1`] = ` +--- go/scopejsiicalclib/customsubmodulename/Reflector__no_checks.go --no-runtime-type-checking ++++ go/scopejsiicalclib/customsubmodulename/Reflector__no_checks.go --runtime-type-checking +@@ -0,0 +1,10 @@ ++//go:build no_runtime_type_checking ++ ++package customsubmodulename ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (r *jsiiProxy_Reflector) validateAsMapParameters(reflectable IReflectable) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": / 1`] = ` + + ┗━ 📁 go + ┗━ 📁 jsiicalc + ┣━ 📄 AbstractClass.go + ┣━ 📄 AbstractClassBase.go + ┣━ 📄 AbstractClassReturner.go + ┣━ 📄 AbstractSuite.go + ┣━ 📄 Add.go + ┣━ 📄 AllowedMethodNames.go + ┣━ 📄 AllTypes.go + ┣━ 📄 AllTypesEnum.go + ┣━ 📄 AmbiguousParameters.go + ┣━ 📁 anonymous + ┃ ┣━ 📄 IOptionA.go + ┃ ┣━ 📄 IOptionB.go + ┃ ┣━ 📄 main.go + ┃ ┗━ 📄 UseOptions.go + ┣━ 📄 AnonymousImplementationProvider.go + ┣━ 📄 AsyncVirtualMethods.go + ┣━ 📄 AugmentableClass.go + ┣━ 📄 BaseClass.go + ┣━ 📄 BaseJsii976.go + ┣━ 📄 Bell.go + ┣━ 📄 BinaryOperation.go + ┣━ 📄 BurriedAnonymousObject.go + ┣━ 📄 Calculator.go + ┣━ 📄 CalculatorProps.go + ┣━ 📁 cdk16625 + ┃ ┣━ 📄 Cdk16625.go + ┃ ┣━ 📁 donotimport + ┃ ┃ ┣━ 📁 internal + ┃ ┃ ┃ ┗━ 📄 types.go + ┃ ┃ ┣━ 📄 main.go + ┃ ┃ ┗━ 📄 UnimportedSubmoduleType.go + ┃ ┗━ 📄 main.go + ┣━ 📁 cdk22369 + ┃ ┣━ 📄 AcceptsPath.go + ┃ ┣━ 📄 AcceptsPathProps.go + ┃ ┗━ 📄 main.go + ┣━ 📄 ChildStruct982.go + ┣━ 📄 ClassThatImplementsTheInternalInterface.go + ┣━ 📄 ClassThatImplementsThePrivateInterface.go + ┣━ 📄 ClassWithCollectionOfUnions.go + ┣━ 📄 ClassWithCollections.go + ┣━ 📄 ClassWithContainerTypes.go + ┣━ 📄 ClassWithDocs.go + ┣━ 📄 ClassWithJavaReservedWords.go + ┣━ 📄 ClassWithMutableObjectLiteralProperty.go + ┣━ 📄 ClassWithNestedUnion.go + ┣━ 📄 ClassWithPrivateConstructorAndAutomaticProperties.go + ┣━ 📁 composition + ┃ ┣━ 📄 CompositeOperation_CompositionStringStyle.go + ┃ ┣━ 📄 CompositeOperation.go + ┃ ┣━ 📁 internal + ┃ ┃ ┗━ 📄 types.go + ┃ ┗━ 📄 main.go + ┣━ 📄 ConfusingToJackson.go + ┣━ 📄 ConfusingToJacksonStruct.go + ┣━ 📄 ConstructorPassesThisOut.go + ┣━ 📄 Constructors.go + ┣━ 📄 ConsumePureInterface.go + ┣━ 📄 ConsumerCanRingBell.go + ┣━ 📄 ConsumersOfThisCrazyTypeSystem.go + ┣━ 📄 ContainerProps.go + ┣━ 📄 DataRenderer.go + ┣━ 📄 Default.go + ┣━ 📄 DefaultedConstructorArgument.go + ┣━ 📄 Demonstrate982.go + ┣━ 📄 DeprecatedClass.go + ┣━ 📄 DeprecatedEnum.go + ┣━ 📄 DeprecatedStruct.go + ┣━ 📁 derivedclasshasnoproperties + ┃ ┣━ 📄 Base.go + ┃ ┣━ 📄 Derived.go + ┃ ┗━ 📄 main.go + ┣━ 📄 DerivedStruct.go + ┣━ 📄 DiamondBottom.go + ┣━ 📄 DiamondInheritanceBaseLevelStruct.go + ┣━ 📄 DiamondInheritanceFirstMidLevelStruct.go + ┣━ 📄 DiamondInheritanceSecondMidLevelStruct.go + ┣━ 📄 DiamondInheritanceTopLevelStruct.go + ┣━ 📄 DisappointingCollectionSource.go + ┣━ 📄 DocumentedClass.go + ┣━ 📄 DoNotOverridePrivates.go + ┣━ 📄 DoNotRecognizeAnyAsOptional.go + ┣━ 📄 DontComplainAboutVariadicAfterOptional.go + ┣━ 📄 DoubleTrouble.go + ┣━ 📄 DummyObj.go + ┣━ 📄 DynamicPropertyBearer.go + ┣━ 📄 DynamicPropertyBearerChild.go + ┣━ 📄 Entropy.go + ┣━ 📄 EnumDispenser.go + ┣━ 📄 EraseUndefinedHashValues.go + ┣━ 📄 EraseUndefinedHashValuesOptions.go + ┣━ 📄 ExperimentalClass.go + ┣━ 📄 ExperimentalEnum.go + ┣━ 📄 ExperimentalStruct.go + ┣━ 📄 ExportedBaseClass.go + ┣━ 📄 ExtendsInternalInterface.go + ┣━ 📄 ExternalClass.go + ┣━ 📄 ExternalEnum.go + ┣━ 📄 ExternalStruct.go + ┣━ 📄 FullCombo.go + ┣━ 📄 GiveMeStructs.go + ┣━ 📄 go.mod + ┣━ 📄 Greetee.go + ┣━ 📄 GreetingAugmenter.go + ┣━ 📁 homonymousforwardreferences + ┃ ┣━ 📁 bar + ┃ ┃ ┣━ 📄 Consumer.go + ┃ ┃ ┣━ 📄 ConsumerProps.go + ┃ ┃ ┣━ 📄 Homonymous.go + ┃ ┃ ┗━ 📄 main.go + ┃ ┣━ 📁 foo + ┃ ┃ ┣━ 📄 Consumer.go + ┃ ┃ ┣━ 📄 ConsumerProps.go + ┃ ┃ ┣━ 📄 Homonymous.go + ┃ ┃ ┗━ 📄 main.go + ┃ ┗━ 📄 README.md + ┣━ 📄 IAnonymousImplementationProvider.go + ┣━ 📄 IAnonymouslyImplementMe.go + ┣━ 📄 IAnotherPublicInterface.go + ┣━ 📄 IBell.go + ┣━ 📄 IBellRinger.go + ┣━ 📄 IConcreteBellRinger.go + ┣━ 📄 IDeprecatedInterface.go + ┣━ 📄 IExperimentalInterface.go + ┣━ 📄 IExtendsPrivateInterface.go + ┣━ 📄 IExternalInterface.go + ┣━ 📄 IFriendlier.go + ┣━ 📄 IFriendlyRandomGenerator.go + ┣━ 📄 IIndirectlyImplemented.go + ┣━ 📄 IInterfaceImplementedByAbstractClass.go + ┣━ 📄 IInterfaceThatShouldNotBeADataType.go + ┣━ 📄 IInterfaceWithInternal.go + ┣━ 📄 IInterfaceWithMethods.go + ┣━ 📄 IInterfaceWithOptionalMethodArguments.go + ┣━ 📄 IInterfaceWithProperties.go + ┣━ 📄 IInterfaceWithPropertiesExtension.go + ┣━ 📄 IJavaReservedWordsInAnInterface.go + ┣━ 📄 IJSII417Derived.go + ┣━ 📄 IJSII417PublicBaseOfBase.go + ┣━ 📄 IJsii487External.go + ┣━ 📄 IJsii487External2.go + ┣━ 📄 IJsii496.go + ┣━ 📄 Implementation.go + ┣━ 📄 ImplementInternalInterface.go + ┣━ 📄 ImplementsInterfaceWithInternal.go + ┣━ 📄 ImplementsInterfaceWithInternalSubclass.go + ┣━ 📄 ImplementsPrivateInterface.go + ┣━ 📄 ImplictBaseOfBase.go + ┣━ 📄 IMutableObjectLiteral.go + ┣━ 📄 InbetweenClass.go + ┣━ 📄 INonInternalInterface.go + ┣━ 📄 InterfaceCollections.go + ┣━ 📁 interfaceinnamespaceincludesclasses + ┃ ┣━ 📄 Foo.go + ┃ ┣━ 📄 Hello.go + ┃ ┗━ 📄 main.go + ┣━ 📁 interfaceinnamespaceonlyinterface + ┃ ┣━ 📄 Hello.go + ┃ ┗━ 📄 main.go + ┣━ 📄 InterfacesMaker.go + ┣━ 📁 internal + ┃ ┗━ 📄 types.go + ┣━ 📄 IObjectWithProperty.go + ┣━ 📄 IOptionalMethod.go + ┣━ 📄 IPrivatelyImplemented.go + ┣━ 📄 IPublicInterface.go + ┣━ 📄 IPublicInterface2.go + ┣━ 📄 IRandomNumberGenerator.go + ┣━ 📄 IReturnJsii976.go + ┣━ 📄 IReturnsNumber.go + ┣━ 📄 Isomorphism.go + ┣━ 📄 Issue2638.go + ┣━ 📄 Issue2638B.go + ┣━ 📄 IStableInterface.go + ┣━ 📄 IStructReturningDelegate.go + ┣━ 📄 IWallClock.go + ┣━ 📄 JavaReservedWords.go + ┣━ 📁 jsii + ┃ ┣━ 📄 jsii-calc-3.20.120.tgz + ┃ ┗━ 📄 jsii.go + ┣━ 📁 jsii3656 + ┃ ┣━ 📄 ImplementMeOpts.go + ┃ ┣━ 📄 main.go + ┃ ┗━ 📄 OverrideMe.go + ┣━ 📄 JSII417Derived.go + ┣━ 📄 JSII417PublicBaseOfBase.go + ┣━ 📄 Jsii487Derived.go + ┣━ 📄 Jsii496Derived.go + ┣━ 📄 JsiiAgent.go + ┣━ 📄 JSObjectLiteralForInterface.go + ┣━ 📄 JSObjectLiteralToNative.go + ┣━ 📄 JSObjectLiteralToNativeClass.go + ┣━ 📄 JsonFormatter.go + ┣━ 📄 LevelOne_PropBooleanValue.go + ┣━ 📄 LevelOne_PropProperty.go + ┣━ 📄 LevelOne.go + ┣━ 📄 LevelOneProps.go + ┣━ 📄 LICENSE + ┣━ 📄 LoadBalancedFargateServiceProps.go + ┣━ 📄 main.go + ┣━ 📄 MethodNamedProperty.go + ┣━ 📁 module2530 + ┃ ┣━ 📄 main.go + ┃ ┗━ 📄 MyClass.go + ┣━ 📁 module2617 + ┃ ┣━ 📄 main.go + ┃ ┗━ 📄 OnlyStatics.go + ┣━ 📁 module2647 + ┃ ┣━ 📄 ExtendAndImplement.go + ┃ ┣━ 📁 internal + ┃ ┃ ┗━ 📄 types.go + ┃ ┗━ 📄 main.go + ┣━ 📁 module2689 + ┃ ┣━ 📁 methods + ┃ ┃ ┣━ 📄 main.go + ┃ ┃ ┗━ 📄 MyClass.go + ┃ ┣━ 📁 props + ┃ ┃ ┣━ 📄 main.go + ┃ ┃ ┗━ 📄 MyClass.go + ┃ ┣━ 📁 retval + ┃ ┃ ┣━ 📄 main.go + ┃ ┃ ┗━ 📄 MyClass.go + ┃ ┗━ 📁 structs + ┃ ┣━ 📄 main.go + ┃ ┗━ 📄 MyStruct.go + ┣━ 📁 module2692 + ┃ ┣━ 📁 submodule1 + ┃ ┃ ┣━ 📄 Bar.go + ┃ ┃ ┗━ 📄 main.go + ┃ ┗━ 📁 submodule2 + ┃ ┣━ 📄 Bar.go + ┃ ┣━ 📄 Foo.go + ┃ ┗━ 📄 main.go + ┣━ 📁 module2700 + ┃ ┣━ 📄 Base.go + ┃ ┣━ 📄 Derived.go + ┃ ┣━ 📄 IFoo.go + ┃ ┗━ 📄 main.go + ┣━ 📁 module2702 + ┃ ┣━ 📄 Baz.go + ┃ ┣━ 📄 Class1.go + ┃ ┣━ 📄 Class2.go + ┃ ┣━ 📄 Class3.go + ┃ ┣━ 📄 Construct.go + ┃ ┣━ 📄 IBaz.go + ┃ ┣━ 📄 IConstruct.go + ┃ ┣━ 📄 IFoo.go + ┃ ┣━ 📁 internal + ┃ ┃ ┗━ 📄 types.go + ┃ ┣━ 📄 IResource.go + ┃ ┣━ 📄 IVpc.go + ┃ ┣━ 📄 main.go + ┃ ┣━ 📄 Resource.go + ┃ ┗━ 📄 Vpc.go + ┣━ 📄 Multiply.go + ┣━ 📄 Negate.go + ┣━ 📄 NestedClassInstance.go + ┣━ 📄 NestedStruct.go + ┣━ 📄 NodeStandardLibrary.go + ┣━ 📁 nodirect + ┃ ┣━ 📁 sub1 + ┃ ┃ ┣━ 📄 main.go + ┃ ┃ ┗━ 📄 TypeFromSub1.go + ┃ ┗━ 📁 sub2 + ┃ ┣━ 📄 main.go + ┃ ┗━ 📄 TypeFromSub2.go + ┣━ 📄 NOTICE + ┣━ 📄 NullShouldBeTreatedAsUndefined.go + ┣━ 📄 NullShouldBeTreatedAsUndefinedData.go + ┣━ 📄 NumberGenerator.go + ┣━ 📄 ObjectRefsInCollections.go + ┣━ 📄 ObjectWithPropertyProvider.go + ┣━ 📄 Old.go + ┣━ 📁 onlystatic + ┃ ┣━ 📄 main.go + ┃ ┗━ 📄 OnlyStaticMethods.go + ┣━ 📄 OptionalArgumentInvoker.go + ┣━ 📄 OptionalConstructorArgument.go + ┣━ 📄 OptionalStruct.go + ┣━ 📄 OptionalStructConsumer.go + ┣━ 📄 OverridableProtectedMember.go + ┣━ 📄 OverrideReturnsObject.go + ┣━ 📄 ParamShadowsBuiltins.go + ┣━ 📄 ParamShadowsBuiltinsProps.go + ┣━ 📄 ParamShadowsScope.go + ┣━ 📄 ParentStruct982.go + ┣━ 📄 PartiallyInitializedThisConsumer.go + ┣━ 📄 Polymorphism.go + ┣━ 📄 Power.go + ┣━ 📄 PromiseNothing.go + ┣━ 📄 PropertyNamedProperty.go + ┣━ 📄 PublicClass.go + ┣━ 📄 PythonReservedWords.go + ┣━ 📁 pythonself + ┃ ┣━ 📄 ClassWithSelf.go + ┃ ┣━ 📄 ClassWithSelfKwarg.go + ┃ ┣━ 📄 IInterfaceWithSelf.go + ┃ ┣━ 📄 main.go + ┃ ┗━ 📄 StructWithSelf.go + ┣━ 📄 README.md + ┣━ 📄 ReferenceEnumFromScopedPackage.go + ┣━ 📄 ReturnsPrivateImplementationOfInterface.go + ┣━ 📄 RootStruct.go + ┣━ 📄 RootStructValidator.go + ┣━ 📄 RuntimeTypeChecking.go + ┣━ 📄 SecondLevelStruct.go + ┣━ 📄 SingleInstanceTwoTypes.go + ┣━ 📄 SingletonInt.go + ┣━ 📄 SingletonIntEnum.go + ┣━ 📄 SingletonString.go + ┣━ 📄 SingletonStringEnum.go + ┣━ 📄 SmellyStruct.go + ┣━ 📄 SomeTypeJsii976.go + ┣━ 📄 StableClass.go + ┣━ 📄 StableEnum.go + ┣━ 📄 StableStruct.go + ┣━ 📄 StaticContext.go + ┣━ 📄 StaticHelloChild.go + ┣━ 📄 StaticHelloParent.go + ┣━ 📄 Statics.go + ┣━ 📄 StringEnum.go + ┣━ 📄 StripInternal.go + ┣━ 📄 StructA.go + ┣━ 📄 StructB.go + ┣━ 📄 StructParameterType.go + ┣━ 📄 StructPassing.go + ┣━ 📄 StructUnionConsumer.go + ┣━ 📄 StructWithCollectionOfUnionts.go + ┣━ 📄 StructWithEnum.go + ┣━ 📄 StructWithJavaReservedWords.go + ┣━ 📁 submodule + ┃ ┣━ 📁 backreferences + ┃ ┃ ┣━ 📄 main.go + ┃ ┃ ┗━ 📄 MyClassReference.go + ┃ ┣━ 📁 child + ┃ ┃ ┣━ 📄 Awesomeness.go + ┃ ┃ ┣━ 📄 Goodness.go + ┃ ┃ ┣━ 📄 InnerClass.go + ┃ ┃ ┣━ 📄 KwargsProps.go + ┃ ┃ ┣━ 📄 main.go + ┃ ┃ ┣━ 📄 OuterClass.go + ┃ ┃ ┣━ 📄 SomeEnum.go + ┃ ┃ ┣━ 📄 SomeStruct.go + ┃ ┃ ┗━ 📄 Structure.go + ┃ ┣━ 📄 Default.go + ┃ ┣━ 📁 internal + ┃ ┃ ┗━ 📄 types.go + ┃ ┣━ 📁 isolated + ┃ ┃ ┣━ 📄 Kwargs.go + ┃ ┃ ┣━ 📄 main.go + ┃ ┃ ┗━ 📄 README.md + ┃ ┣━ 📄 main.go + ┃ ┣━ 📄 MyClass.go + ┃ ┣━ 📁 nestedsubmodule + ┃ ┃ ┣━ 📁 deeplynested + ┃ ┃ ┃ ┣━ 📄 INamespaced.go + ┃ ┃ ┃ ┗━ 📄 main.go + ┃ ┃ ┣━ 📁 internal + ┃ ┃ ┃ ┗━ 📄 types.go + ┃ ┃ ┣━ 📄 main.go + ┃ ┃ ┗━ 📄 Namespaced.go + ┃ ┣━ 📁 param + ┃ ┃ ┣━ 📄 main.go + ┃ ┃ ┗━ 📄 SpecialParameter.go + ┃ ┣━ 📄 README.md + ┃ ┗━ 📁 returnsparam + ┃ ┣━ 📄 main.go + ┃ ┗━ 📄 ReturnsSpecialParameter.go + ┣━ 📄 Sum.go + ┣━ 📄 SupportsNiceJavaBuilder.go + ┣━ 📄 SupportsNiceJavaBuilderProps.go + ┣━ 📄 SupportsNiceJavaBuilderWithRequiredProps.go + ┣━ 📄 SyncVirtualMethods.go + ┣━ 📄 TestStructWithEnum.go + ┣━ 📄 Thrower.go + ┣━ 📄 TopLevelStruct.go + ┣━ 📄 TwoMethodsWithSimilarCapitalization.go + ┣━ 📄 UmaskCheck.go + ┣━ 📄 UnaryOperation.go + ┣━ 📁 union + ┃ ┣━ 📄 ConsumesUnion.go + ┃ ┣━ 📄 IResolvable.go + ┃ ┣━ 📄 main.go + ┃ ┗━ 📄 Resolvable.go + ┣━ 📄 UnionProperties.go + ┣━ 📄 UpcasingReflectable.go + ┣━ 📄 UseBundledDependency.go + ┣━ 📄 UseCalcBase.go + ┣━ 📄 UsesInterfaceWithProperties.go + ┣━ 📄 VariadicInvoker.go + ┣━ 📄 VariadicMethod.go + ┣━ 📄 VariadicTypeUnion.go + ┣━ 📄 version + ┣━ 📄 VirtualMethodPlayground.go + ┣━ 📄 VoidCallback.go + ┗━ 📄 WithPrivatePropertyInConstructor.go +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/AbstractClass.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// The general contract for a concrete number. -// Deprecated. -type IDoublable interface { - // Deprecated. - DoubleValue() *float64 +type AbstractClass interface { + AbstractClassBase + IInterfaceImplementedByAbstractClass + AbstractProperty() *string + PropFromInterface() *string + AbstractMethod(name *string) *string + NonAbstractMethod() *float64 } -// The jsii proxy for IDoublable -type jsiiProxy_IDoublable struct { - _ byte // padding +// The jsii proxy struct for AbstractClass +type jsiiProxy_AbstractClass struct { + jsiiProxy_AbstractClassBase + jsiiProxy_IInterfaceImplementedByAbstractClass } -func (j *jsiiProxy_IDoublable) DoubleValue() *float64 { - var returns *float64 +func (j *jsiiProxy_AbstractClass) AbstractProperty() *string { + var returns *string _jsii_.Get( j, - "doubleValue", + "abstractProperty", &returns, ) return returns } +func (j *jsiiProxy_AbstractClass) PropFromInterface() *string { + var returns *string + _jsii_.Get( + j, + "propFromInterface", + &returns, + ) + return returns +} -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_IFriendly.go 1`] = ` -// A simple calcuator library built on JSII. -package scopejsiicalclib -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) +func NewAbstractClass_Override(a AbstractClass) { + _init_.Initialize() -// Applies to classes that are considered friendly. -// -// These classes can be greeted with -// a "hello" or "goodbye" blessing and they will respond back in a fun and friendly manner. -// Deprecated. -type IFriendly interface { - // Say hello! - // Deprecated. - Hello() *string + _jsii_.Create( + "jsii-calc.AbstractClass", + nil, // no parameters + a, + ) } -// The jsii proxy for IFriendly -type jsiiProxy_IFriendly struct { - _ byte // padding +func (a *jsiiProxy_AbstractClass) AbstractMethod(name *string) *string { + var returns *string + + _jsii_.Invoke( + a, + "abstractMethod", + []interface{}{name}, + &returns, + ) + + return returns } -func (i *jsiiProxy_IFriendly) Hello() *string { - var returns *string +func (a *jsiiProxy_AbstractClass) NonAbstractMethod() *float64 { + var returns *float64 _jsii_.Invoke( - i, - "hello", + a, + "nonAbstractMethod", nil, // no parameters &returns, ) @@ -1950,154 +3015,109 @@ func (i *jsiiProxy_IFriendly) Hello() *string { `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_IThreeLevelsInterface.go 1`] = ` -// A simple calcuator library built on JSII. -package scopejsiicalclib +exports[`Generated code for "jsii-calc": /go/jsiicalc/AbstractClassBase.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - - "github.com/aws/jsii/jsii-calc/go/jcb" - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/internal" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Interface that inherits from packages 2 levels up the tree. -// -// Their presence validates that .NET/Java/jsii-reflect can track all fields -// far enough up the tree. -// Deprecated. -type IThreeLevelsInterface interface { - jcb.IBaseInterface - // Deprecated. - Baz() +type AbstractClassBase interface { + AbstractProperty() *string } -// The jsii proxy for IThreeLevelsInterface -type jsiiProxy_IThreeLevelsInterface struct { - internal.Type__jcbIBaseInterface +// The jsii proxy struct for AbstractClassBase +type jsiiProxy_AbstractClassBase struct { + _ byte // padding } -func (i *jsiiProxy_IThreeLevelsInterface) Baz() { - _jsii_.InvokeVoid( - i, - "baz", - nil, // no parameters +func (j *jsiiProxy_AbstractClassBase) AbstractProperty() *string { + var returns *string + _jsii_.Get( + j, + "abstractProperty", + &returns, ) + return returns } -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_MyFirstStruct.go 1`] = ` -// A simple calcuator library built on JSII. -package scopejsiicalclib - +func NewAbstractClassBase_Override(a AbstractClassBase) { + _init_.Initialize() -// This is the first struct we have created in jsii. -// Deprecated. -type MyFirstStruct struct { - // An awesome number value. - // Deprecated. - Anumber *float64 \`field:"required" json:"anumber" yaml:"anumber"\` - // A string value. - // Deprecated. - Astring *string \`field:"required" json:"astring" yaml:"astring"\` - // Deprecated. - FirstOptional *[]*string \`field:"optional" json:"firstOptional" yaml:"firstOptional"\` + _jsii_.Create( + "jsii-calc.AbstractClassBase", + nil, // no parameters + a, + ) } `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_Number.go 1`] = ` -// A simple calcuator library built on JSII. -package scopejsiicalclib +exports[`Generated code for "jsii-calc": /go/jsiicalc/AbstractClassReturner.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Represents a concrete number. -// Deprecated. -type Number interface { - NumericValue - IDoublable - // The number multiplied by 2. - // Deprecated. - DoubleValue() *float64 - // The number. - // Deprecated. - Value() *float64 - // String representation of the value. - // Deprecated. - ToString() *string - // Returns: the name of the class (to verify native type names are created for derived classes). - // Deprecated. - TypeName() interface{} -} - -// The jsii proxy struct for Number -type jsiiProxy_Number struct { - jsiiProxy_NumericValue - jsiiProxy_IDoublable +type AbstractClassReturner interface { + ReturnAbstractFromProperty() AbstractClassBase + GiveMeAbstract() AbstractClass + GiveMeInterface() IInterfaceImplementedByAbstractClass } -func (j *jsiiProxy_Number) DoubleValue() *float64 { - var returns *float64 - _jsii_.Get( - j, - "doubleValue", - &returns, - ) - return returns +// The jsii proxy struct for AbstractClassReturner +type jsiiProxy_AbstractClassReturner struct { + _ byte // padding } -func (j *jsiiProxy_Number) Value() *float64 { - var returns *float64 +func (j *jsiiProxy_AbstractClassReturner) ReturnAbstractFromProperty() AbstractClassBase { + var returns AbstractClassBase _jsii_.Get( j, - "value", + "returnAbstractFromProperty", &returns, ) return returns } -// Creates a Number object. -// Deprecated. -func NewNumber(value *float64) Number { +func NewAbstractClassReturner() AbstractClassReturner { _init_.Initialize() - j := jsiiProxy_Number{} + j := jsiiProxy_AbstractClassReturner{} _jsii_.Create( - "@scope/jsii-calc-lib.Number", - []interface{}{value}, + "jsii-calc.AbstractClassReturner", + nil, // no parameters &j, ) return &j } -// Creates a Number object. -// Deprecated. -func NewNumber_Override(n Number, value *float64) { +func NewAbstractClassReturner_Override(a AbstractClassReturner) { _init_.Initialize() _jsii_.Create( - "@scope/jsii-calc-lib.Number", - []interface{}{value}, - n, + "jsii-calc.AbstractClassReturner", + nil, // no parameters + a, ) } -func (n *jsiiProxy_Number) ToString() *string { - var returns *string +func (a *jsiiProxy_AbstractClassReturner) GiveMeAbstract() AbstractClass { + var returns AbstractClass _jsii_.Invoke( - n, - "toString", + a, + "giveMeAbstract", nil, // no parameters &returns, ) @@ -2105,12 +3125,12 @@ func (n *jsiiProxy_Number) ToString() *string { return returns } -func (n *jsiiProxy_Number) TypeName() interface{} { - var returns interface{} +func (a *jsiiProxy_AbstractClassReturner) GiveMeInterface() IInterfaceImplementedByAbstractClass { + var returns IInterfaceImplementedByAbstractClass _jsii_.Invoke( - n, - "typeName", + a, + "giveMeInterface", nil, // no parameters &returns, ) @@ -2121,80 +3141,78 @@ func (n *jsiiProxy_Number) TypeName() interface{} { `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_NumericValue.go 1`] = ` -// A simple calcuator library built on JSII. -package scopejsiicalclib +exports[`Generated code for "jsii-calc": /go/jsiicalc/AbstractSuite.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" - - "github.com/aws/jsii/jsii-calc/go/jcb" - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/internal" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Abstract class which represents a numeric value. -// Deprecated. -type NumericValue interface { - jcb.Base - // The value. - // Deprecated. - Value() *float64 - // String representation of the value. - // Deprecated. - ToString() *string - // Returns: the name of the class (to verify native type names are created for derived classes). - // Deprecated. - TypeName() interface{} +// Ensures abstract members implementations correctly register overrides in various languages. +type AbstractSuite interface { + Property() *string + SetProperty(val *string) + SomeMethod(str *string) *string + // Sets \`seed\` to \`this.property\`, then calls \`someMethod\` with \`this.property\` and returns the result. + WorkItAll(seed *string) *string } -// The jsii proxy struct for NumericValue -type jsiiProxy_NumericValue struct { - internal.Type__jcbBase +// The jsii proxy struct for AbstractSuite +type jsiiProxy_AbstractSuite struct { + _ byte // padding } -func (j *jsiiProxy_NumericValue) Value() *float64 { - var returns *float64 +func (j *jsiiProxy_AbstractSuite) Property() *string { + var returns *string _jsii_.Get( j, - "value", + "property", &returns, ) return returns } -// Deprecated. -func NewNumericValue_Override(n NumericValue) { +func NewAbstractSuite_Override(a AbstractSuite) { _init_.Initialize() _jsii_.Create( - "@scope/jsii-calc-lib.NumericValue", + "jsii-calc.AbstractSuite", nil, // no parameters - n, + a, ) } -func (n *jsiiProxy_NumericValue) ToString() *string { +func (j *jsiiProxy_AbstractSuite)SetProperty(val *string) { + _jsii_.Set( + j, + "property", + val, + ) +} + +func (a *jsiiProxy_AbstractSuite) SomeMethod(str *string) *string { var returns *string _jsii_.Invoke( - n, - "toString", - nil, // no parameters + a, + "someMethod", + []interface{}{str}, &returns, ) return returns } -func (n *jsiiProxy_NumericValue) TypeName() interface{} { - var returns interface{} +func (a *jsiiProxy_AbstractSuite) WorkItAll(seed *string) *string { + var returns *string _jsii_.Invoke( - n, - "typeName", - nil, // no parameters + a, + "workItAll", + []interface{}{seed}, &returns, ) @@ -2204,36 +3222,60 @@ func (n *jsiiProxy_NumericValue) TypeName() interface{} { `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_Operation.go 1`] = ` -// A simple calcuator library built on JSII. -package scopejsiicalclib +exports[`Generated code for "jsii-calc": /go/jsiicalc/Add.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -// Represents an operation on values. -// Deprecated. -type Operation interface { - NumericValue +// The "+" binary operation. +type Add interface { + BinaryOperation + // Left-hand side operand. + Lhs() scopejsiicalclib.NumericValue + // Right-hand side operand. + Rhs() scopejsiicalclib.NumericValue // The value. - // Deprecated. Value() *float64 + // Say hello! + Hello() *string // String representation of the value. - // Deprecated. ToString() *string // Returns: the name of the class (to verify native type names are created for derived classes). - // Deprecated. TypeName() interface{} } -// The jsii proxy struct for Operation -type jsiiProxy_Operation struct { - jsiiProxy_NumericValue +// The jsii proxy struct for Add +type jsiiProxy_Add struct { + jsiiProxy_BinaryOperation } -func (j *jsiiProxy_Operation) Value() *float64 { +func (j *jsiiProxy_Add) Lhs() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue + _jsii_.Get( + j, + "lhs", + &returns, + ) + return returns +} + +func (j *jsiiProxy_Add) Rhs() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue + _jsii_.Get( + j, + "rhs", + &returns, + ) + return returns +} + +func (j *jsiiProxy_Add) Value() *float64 { var returns *float64 _jsii_.Get( j, @@ -2244,22 +3286,50 @@ func (j *jsiiProxy_Operation) Value() *float64 { } -// Deprecated. -func NewOperation_Override(o Operation) { +// Creates a BinaryOperation. +func NewAdd(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) Add { _init_.Initialize() + j := jsiiProxy_Add{} + _jsii_.Create( - "@scope/jsii-calc-lib.Operation", + "jsii-calc.Add", + []interface{}{lhs, rhs}, + &j, + ) + + return &j +} + +// Creates a BinaryOperation. +func NewAdd_Override(a Add, lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.Add", + []interface{}{lhs, rhs}, + a, + ) +} + +func (a *jsiiProxy_Add) Hello() *string { + var returns *string + + _jsii_.Invoke( + a, + "hello", nil, // no parameters - o, + &returns, ) + + return returns } -func (o *jsiiProxy_Operation) ToString() *string { +func (a *jsiiProxy_Add) ToString() *string { var returns *string _jsii_.Invoke( - o, + a, "toString", nil, // no parameters &returns, @@ -2268,11 +3338,11 @@ func (o *jsiiProxy_Operation) ToString() *string { return returns } -func (o *jsiiProxy_Operation) TypeName() interface{} { +func (a *jsiiProxy_Add) TypeName() interface{} { var returns interface{} _jsii_.Invoke( - o, + a, "typeName", nil, // no parameters &returns, @@ -2284,1053 +3354,701 @@ func (o *jsiiProxy_Operation) TypeName() interface{} { `; -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_StructWithOnlyOptionals.go 1`] = ` -// A simple calcuator library built on JSII. -package scopejsiicalclib +exports[`Generated code for "jsii-calc": /go/jsiicalc/AllTypes.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc +import ( + "time" -// This is a struct with only optional properties. -// Deprecated. -type StructWithOnlyOptionals struct { - // The first optional! - // Deprecated. - Optional1 *string \`field:"optional" json:"optional1" yaml:"optional1"\` - // Deprecated. - Optional2 *float64 \`field:"optional" json:"optional2" yaml:"optional2"\` - // Deprecated. - Optional3 *bool \`field:"optional" json:"optional3" yaml:"optional3"\` + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + +// This class includes property for all types supported by jsii. +// +// The setters will validate +// that the value set is of the expected type and throw otherwise. +type AllTypes interface { + AnyArrayProperty() *[]interface{} + SetAnyArrayProperty(val *[]interface{}) + AnyMapProperty() *map[string]interface{} + SetAnyMapProperty(val *map[string]interface{}) + AnyProperty() interface{} + SetAnyProperty(val interface{}) + ArrayProperty() *[]*string + SetArrayProperty(val *[]*string) + BooleanProperty() *bool + SetBooleanProperty(val *bool) + DateProperty() *time.Time + SetDateProperty(val *time.Time) + EnumProperty() AllTypesEnum + SetEnumProperty(val AllTypesEnum) + EnumPropertyValue() *float64 + JsonProperty() *map[string]interface{} + SetJsonProperty(val *map[string]interface{}) + MapProperty() *map[string]scopejsiicalclib.Number + SetMapProperty(val *map[string]scopejsiicalclib.Number) + NumberProperty() *float64 + SetNumberProperty(val *float64) + OptionalEnumValue() StringEnum + SetOptionalEnumValue(val StringEnum) + StringProperty() *string + SetStringProperty(val *string) + UnionArrayProperty() *[]interface{} + SetUnionArrayProperty(val *[]interface{}) + UnionMapProperty() *map[string]interface{} + SetUnionMapProperty(val *map[string]interface{}) + UnionProperty() interface{} + SetUnionProperty(val interface{}) + UnknownArrayProperty() *[]interface{} + SetUnknownArrayProperty(val *[]interface{}) + UnknownMapProperty() *map[string]interface{} + SetUnknownMapProperty(val *map[string]interface{}) + UnknownProperty() interface{} + SetUnknownProperty(val interface{}) + AnyIn(inp interface{}) + AnyOut() interface{} + EnumMethod(value StringEnum) StringEnum } +// The jsii proxy struct for AllTypes +type jsiiProxy_AllTypes struct { + _ byte // padding +} -`; +func (j *jsiiProxy_AllTypes) AnyArrayProperty() *[]interface{} { + var returns *[]interface{} + _jsii_.Get( + j, + "anyArrayProperty", + &returns, + ) + return returns +} -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/version 1`] = ` -0.0.0-devpreview +func (j *jsiiProxy_AllTypes) AnyMapProperty() *map[string]interface{} { + var returns *map[string]interface{} + _jsii_.Get( + j, + "anyMapProperty", + &returns, + ) + return returns +} -`; +func (j *jsiiProxy_AllTypes) AnyProperty() interface{} { + var returns interface{} + _jsii_.Get( + j, + "anyProperty", + &returns, + ) + return returns +} -exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` - - ┗━ 📁 go - ┗━ 📁 scopejsiicalclib - ┣━ 📁 customsubmodulename - ┃ ┣━ 🆕 customsubmodulename_Reflector__no_runtime_type_checking.go - ┃ ┣━ 🆕 customsubmodulename_Reflector__runtime_type_checks.go - ┃ ┗━ 📄 customsubmodulename_Reflector.go.diff - ┣━ 🆕 scopejsiicalclib_BaseFor2647__no_runtime_type_checking.go - ┣━ 🆕 scopejsiicalclib_BaseFor2647__runtime_type_checks.go - ┣━ 📄 scopejsiicalclib_BaseFor2647.go.diff - ┣━ 🆕 scopejsiicalclib_Number__no_runtime_type_checking.go - ┣━ 🆕 scopejsiicalclib_Number__runtime_type_checks.go - ┗━ 📄 scopejsiicalclib_Number.go.diff -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector.go.diff 1`] = ` ---- go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector.go --no-runtime-type-checking -+++ go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector.go --runtime-type-checking -@@ -41,10 +41,13 @@ - r, - ) - } - - func (r *jsiiProxy_Reflector) AsMap(reflectable IReflectable) *map[string]interface{} { -+ if err := r.validateAsMapParameters(reflectable); err != nil { -+ panic(err) -+ } - var returns *map[string]interface{} - - _jsii_.Invoke( - r, - "asMap", -`; +func (j *jsiiProxy_AllTypes) ArrayProperty() *[]*string { + var returns *[]*string + _jsii_.Get( + j, + "arrayProperty", + &returns, + ) + return returns +} -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector__no_runtime_type_checking.go.diff 1`] = ` ---- go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,10 @@ -+//go:build no_runtime_type_checking -+ -+package customsubmodulename -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (r *jsiiProxy_Reflector) validateAsMapParameters(reflectable IReflectable) error { -+ return nil -+} -+ -`; +func (j *jsiiProxy_AllTypes) BooleanProperty() *bool { + var returns *bool + _jsii_.Get( + j, + "booleanProperty", + &returns, + ) + return returns +} -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector__runtime_type_checks.go.diff 1`] = ` ---- go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector__runtime_type_checks.go --no-runtime-type-checking -+++ go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,16 @@ -+//go:build !no_runtime_type_checking -+ -+package customsubmodulename -+ -+import ( -+ "fmt" -+) -+ -+func (r *jsiiProxy_Reflector) validateAsMapParameters(reflectable IReflectable) error { -+ if reflectable == nil { -+ return fmt.Errorf("parameter reflectable is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -`; +func (j *jsiiProxy_AllTypes) DateProperty() *time.Time { + var returns *time.Time + _jsii_.Get( + j, + "dateProperty", + &returns, + ) + return returns +} -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_BaseFor2647.go.diff 1`] = ` ---- go/scopejsiicalclib/scopejsiicalclib_BaseFor2647.go --no-runtime-type-checking -+++ go/scopejsiicalclib/scopejsiicalclib_BaseFor2647.go --runtime-type-checking -@@ -29,10 +29,13 @@ - - // Deprecated. - func NewBaseFor2647(very scopejsiicalcbaseofbase.Very) BaseFor2647 { - _init_.Initialize() - -+ if err := validateNewBaseFor2647Parameters(very); err != nil { -+ panic(err) -+ } - j := jsiiProxy_BaseFor2647{} - - _jsii_.Create( - "@scope/jsii-calc-lib.BaseFor2647", - []interface{}{very}, -@@ -52,10 +55,13 @@ - b, - ) - } - - func (b *jsiiProxy_BaseFor2647) Foo(obj jcb.IBaseInterface) { -+ if err := b.validateFooParameters(obj); err != nil { -+ panic(err) -+ } - _jsii_.InvokeVoid( - b, - "foo", - []interface{}{obj}, - ) -`; +func (j *jsiiProxy_AllTypes) EnumProperty() AllTypesEnum { + var returns AllTypesEnum + _jsii_.Get( + j, + "enumProperty", + &returns, + ) + return returns +} -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_BaseFor2647__no_runtime_type_checking.go.diff 1`] = ` ---- go/scopejsiicalclib/scopejsiicalclib_BaseFor2647__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/scopejsiicalclib/scopejsiicalclib_BaseFor2647__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,15 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator library built on JSII. -+package scopejsiicalclib -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (b *jsiiProxy_BaseFor2647) validateFooParameters(obj jcb.IBaseInterface) error { -+ return nil -+} -+ -+func validateNewBaseFor2647Parameters(very scopejsiicalcbaseofbase.Very) error { -+ return nil -+} -+ -`; +func (j *jsiiProxy_AllTypes) EnumPropertyValue() *float64 { + var returns *float64 + _jsii_.Get( + j, + "enumPropertyValue", + &returns, + ) + return returns +} -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_BaseFor2647__runtime_type_checks.go.diff 1`] = ` ---- go/scopejsiicalclib/scopejsiicalclib_BaseFor2647__runtime_type_checks.go --no-runtime-type-checking -+++ go/scopejsiicalclib/scopejsiicalclib_BaseFor2647__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,28 @@ -+//go:build !no_runtime_type_checking -+ -+// A simple calcuator library built on JSII. -+package scopejsiicalclib -+ -+import ( -+ "fmt" -+ -+ "github.com/aws/jsii/jsii-calc/go/jcb" -+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" -+) -+ -+func (b *jsiiProxy_BaseFor2647) validateFooParameters(obj jcb.IBaseInterface) error { -+ if obj == nil { -+ return fmt.Errorf("parameter obj is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -+func validateNewBaseFor2647Parameters(very scopejsiicalcbaseofbase.Very) error { -+ if very == nil { -+ return fmt.Errorf("parameter very is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -`; +func (j *jsiiProxy_AllTypes) JsonProperty() *map[string]interface{} { + var returns *map[string]interface{} + _jsii_.Get( + j, + "jsonProperty", + &returns, + ) + return returns +} -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_Number.go.diff 1`] = ` ---- go/scopejsiicalclib/scopejsiicalclib_Number.go --no-runtime-type-checking -+++ go/scopejsiicalclib/scopejsiicalclib_Number.go --runtime-type-checking -@@ -55,10 +55,13 @@ - // Creates a Number object. - // Deprecated. - func NewNumber(value *float64) Number { - _init_.Initialize() - -+ if err := validateNewNumberParameters(value); err != nil { -+ panic(err) -+ } - j := jsiiProxy_Number{} - - _jsii_.Create( - "@scope/jsii-calc-lib.Number", - []interface{}{value}, -`; +func (j *jsiiProxy_AllTypes) MapProperty() *map[string]scopejsiicalclib.Number { + var returns *map[string]scopejsiicalclib.Number + _jsii_.Get( + j, + "mapProperty", + &returns, + ) + return returns +} -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_Number__no_runtime_type_checking.go.diff 1`] = ` ---- go/scopejsiicalclib/scopejsiicalclib_Number__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/scopejsiicalclib/scopejsiicalclib_Number__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator library built on JSII. -+package scopejsiicalclib -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateNewNumberParameters(value *float64) error { -+ return nil -+} -+ -`; +func (j *jsiiProxy_AllTypes) NumberProperty() *float64 { + var returns *float64 + _jsii_.Get( + j, + "numberProperty", + &returns, + ) + return returns +} -exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_Number__runtime_type_checks.go.diff 1`] = ` ---- go/scopejsiicalclib/scopejsiicalclib_Number__runtime_type_checks.go --no-runtime-type-checking -+++ go/scopejsiicalclib/scopejsiicalclib_Number__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking -+ -+// A simple calcuator library built on JSII. -+package scopejsiicalclib -+ -+import ( -+ "fmt" -+) -+ -+func validateNewNumberParameters(value *float64) error { -+ if value == nil { -+ return fmt.Errorf("parameter value is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -`; +func (j *jsiiProxy_AllTypes) OptionalEnumValue() StringEnum { + var returns StringEnum + _jsii_.Get( + j, + "optionalEnumValue", + &returns, + ) + return returns +} -exports[`Generated code for "jsii-calc": / 1`] = ` - - ┗━ 📁 go - ┗━ 📁 jsiicalc - ┣━ 📁 anonymous - ┃ ┣━ 📄 anonymous_IOptionA.go - ┃ ┣━ 📄 anonymous_IOptionB.go - ┃ ┣━ 📄 anonymous_UseOptions.go - ┃ ┗━ 📄 anonymous.go - ┣━ 📁 cdk16625 - ┃ ┣━ 📄 cdk16625_Cdk16625.go - ┃ ┣━ 📄 cdk16625.go - ┃ ┗━ 📁 donotimport - ┃ ┣━ 📄 donotimport_UnimportedSubmoduleType.go - ┃ ┣━ 📄 donotimport.go - ┃ ┗━ 📁 internal - ┃ ┗━ 📄 types.go - ┣━ 📁 cdk22369 - ┃ ┣━ 📄 cdk22369_AcceptsPath.go - ┃ ┣━ 📄 cdk22369_AcceptsPathProps.go - ┃ ┗━ 📄 cdk22369.go - ┣━ 📁 composition - ┃ ┣━ 📄 composition_CompositeOperation_CompositionStringStyle.go - ┃ ┣━ 📄 composition_CompositeOperation.go - ┃ ┣━ 📄 composition.go - ┃ ┗━ 📁 internal - ┃ ┗━ 📄 types.go - ┣━ 📁 derivedclasshasnoproperties - ┃ ┣━ 📄 derivedclasshasnoproperties_Base.go - ┃ ┣━ 📄 derivedclasshasnoproperties_Derived.go - ┃ ┗━ 📄 derivedclasshasnoproperties.go - ┣━ 📄 go.mod - ┣━ 📁 homonymousforwardreferences - ┃ ┣━ 📁 bar - ┃ ┃ ┣━ 📄 bar_Consumer.go - ┃ ┃ ┣━ 📄 bar_ConsumerProps.go - ┃ ┃ ┣━ 📄 bar_Homonymous.go - ┃ ┃ ┗━ 📄 bar.go - ┃ ┣━ 📁 foo - ┃ ┃ ┣━ 📄 foo_Consumer.go - ┃ ┃ ┣━ 📄 foo_ConsumerProps.go - ┃ ┃ ┣━ 📄 foo_Homonymous.go - ┃ ┃ ┗━ 📄 foo.go - ┃ ┗━ 📄 README.md - ┣━ 📁 interfaceinnamespaceincludesclasses - ┃ ┣━ 📄 interfaceinnamespaceincludesclasses_Foo.go - ┃ ┣━ 📄 interfaceinnamespaceincludesclasses_Hello.go - ┃ ┗━ 📄 interfaceinnamespaceincludesclasses.go - ┣━ 📁 interfaceinnamespaceonlyinterface - ┃ ┣━ 📄 interfaceinnamespaceonlyinterface_Hello.go - ┃ ┗━ 📄 interfaceinnamespaceonlyinterface.go - ┣━ 📁 internal - ┃ ┗━ 📄 types.go - ┣━ 📁 jsii - ┃ ┣━ 📄 jsii-calc-3.20.120.tgz - ┃ ┗━ 📄 jsii.go - ┣━ 📁 jsii3656 - ┃ ┣━ 📄 jsii3656_ImplementMeOpts.go - ┃ ┣━ 📄 jsii3656_OverrideMe.go - ┃ ┗━ 📄 jsii3656.go - ┣━ 📄 jsiicalc_AbstractClass.go - ┣━ 📄 jsiicalc_AbstractClassBase.go - ┣━ 📄 jsiicalc_AbstractClassReturner.go - ┣━ 📄 jsiicalc_AbstractSuite.go - ┣━ 📄 jsiicalc_Add.go - ┣━ 📄 jsiicalc_AllowedMethodNames.go - ┣━ 📄 jsiicalc_AllTypes.go - ┣━ 📄 jsiicalc_AllTypesEnum.go - ┣━ 📄 jsiicalc_AmbiguousParameters.go - ┣━ 📄 jsiicalc_AnonymousImplementationProvider.go - ┣━ 📄 jsiicalc_AsyncVirtualMethods.go - ┣━ 📄 jsiicalc_AugmentableClass.go - ┣━ 📄 jsiicalc_BaseClass.go - ┣━ 📄 jsiicalc_BaseJsii976.go - ┣━ 📄 jsiicalc_Bell.go - ┣━ 📄 jsiicalc_BinaryOperation.go - ┣━ 📄 jsiicalc_BurriedAnonymousObject.go - ┣━ 📄 jsiicalc_Calculator.go - ┣━ 📄 jsiicalc_CalculatorProps.go - ┣━ 📄 jsiicalc_ChildStruct982.go - ┣━ 📄 jsiicalc_ClassThatImplementsTheInternalInterface.go - ┣━ 📄 jsiicalc_ClassThatImplementsThePrivateInterface.go - ┣━ 📄 jsiicalc_ClassWithCollectionOfUnions.go - ┣━ 📄 jsiicalc_ClassWithCollections.go - ┣━ 📄 jsiicalc_ClassWithContainerTypes.go - ┣━ 📄 jsiicalc_ClassWithDocs.go - ┣━ 📄 jsiicalc_ClassWithJavaReservedWords.go - ┣━ 📄 jsiicalc_ClassWithMutableObjectLiteralProperty.go - ┣━ 📄 jsiicalc_ClassWithNestedUnion.go - ┣━ 📄 jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties.go - ┣━ 📄 jsiicalc_ConfusingToJackson.go - ┣━ 📄 jsiicalc_ConfusingToJacksonStruct.go - ┣━ 📄 jsiicalc_ConstructorPassesThisOut.go - ┣━ 📄 jsiicalc_Constructors.go - ┣━ 📄 jsiicalc_ConsumePureInterface.go - ┣━ 📄 jsiicalc_ConsumerCanRingBell.go - ┣━ 📄 jsiicalc_ConsumersOfThisCrazyTypeSystem.go - ┣━ 📄 jsiicalc_ContainerProps.go - ┣━ 📄 jsiicalc_DataRenderer.go - ┣━ 📄 jsiicalc_Default.go - ┣━ 📄 jsiicalc_DefaultedConstructorArgument.go - ┣━ 📄 jsiicalc_Demonstrate982.go - ┣━ 📄 jsiicalc_DeprecatedClass.go - ┣━ 📄 jsiicalc_DeprecatedEnum.go - ┣━ 📄 jsiicalc_DeprecatedStruct.go - ┣━ 📄 jsiicalc_DerivedStruct.go - ┣━ 📄 jsiicalc_DiamondBottom.go - ┣━ 📄 jsiicalc_DiamondInheritanceBaseLevelStruct.go - ┣━ 📄 jsiicalc_DiamondInheritanceFirstMidLevelStruct.go - ┣━ 📄 jsiicalc_DiamondInheritanceSecondMidLevelStruct.go - ┣━ 📄 jsiicalc_DiamondInheritanceTopLevelStruct.go - ┣━ 📄 jsiicalc_DisappointingCollectionSource.go - ┣━ 📄 jsiicalc_DocumentedClass.go - ┣━ 📄 jsiicalc_DoNotOverridePrivates.go - ┣━ 📄 jsiicalc_DoNotRecognizeAnyAsOptional.go - ┣━ 📄 jsiicalc_DontComplainAboutVariadicAfterOptional.go - ┣━ 📄 jsiicalc_DoubleTrouble.go - ┣━ 📄 jsiicalc_DummyObj.go - ┣━ 📄 jsiicalc_DynamicPropertyBearer.go - ┣━ 📄 jsiicalc_DynamicPropertyBearerChild.go - ┣━ 📄 jsiicalc_Entropy.go - ┣━ 📄 jsiicalc_EnumDispenser.go - ┣━ 📄 jsiicalc_EraseUndefinedHashValues.go - ┣━ 📄 jsiicalc_EraseUndefinedHashValuesOptions.go - ┣━ 📄 jsiicalc_ExperimentalClass.go - ┣━ 📄 jsiicalc_ExperimentalEnum.go - ┣━ 📄 jsiicalc_ExperimentalStruct.go - ┣━ 📄 jsiicalc_ExportedBaseClass.go - ┣━ 📄 jsiicalc_ExtendsInternalInterface.go - ┣━ 📄 jsiicalc_ExternalClass.go - ┣━ 📄 jsiicalc_ExternalEnum.go - ┣━ 📄 jsiicalc_ExternalStruct.go - ┣━ 📄 jsiicalc_FullCombo.go - ┣━ 📄 jsiicalc_GiveMeStructs.go - ┣━ 📄 jsiicalc_Greetee.go - ┣━ 📄 jsiicalc_GreetingAugmenter.go - ┣━ 📄 jsiicalc_IAnonymousImplementationProvider.go - ┣━ 📄 jsiicalc_IAnonymouslyImplementMe.go - ┣━ 📄 jsiicalc_IAnotherPublicInterface.go - ┣━ 📄 jsiicalc_IBell.go - ┣━ 📄 jsiicalc_IBellRinger.go - ┣━ 📄 jsiicalc_IConcreteBellRinger.go - ┣━ 📄 jsiicalc_IDeprecatedInterface.go - ┣━ 📄 jsiicalc_IExperimentalInterface.go - ┣━ 📄 jsiicalc_IExtendsPrivateInterface.go - ┣━ 📄 jsiicalc_IExternalInterface.go - ┣━ 📄 jsiicalc_IFriendlier.go - ┣━ 📄 jsiicalc_IFriendlyRandomGenerator.go - ┣━ 📄 jsiicalc_IIndirectlyImplemented.go - ┣━ 📄 jsiicalc_IInterfaceImplementedByAbstractClass.go - ┣━ 📄 jsiicalc_IInterfaceThatShouldNotBeADataType.go - ┣━ 📄 jsiicalc_IInterfaceWithInternal.go - ┣━ 📄 jsiicalc_IInterfaceWithMethods.go - ┣━ 📄 jsiicalc_IInterfaceWithOptionalMethodArguments.go - ┣━ 📄 jsiicalc_IInterfaceWithProperties.go - ┣━ 📄 jsiicalc_IInterfaceWithPropertiesExtension.go - ┣━ 📄 jsiicalc_IJavaReservedWordsInAnInterface.go - ┣━ 📄 jsiicalc_IJSII417Derived.go - ┣━ 📄 jsiicalc_IJSII417PublicBaseOfBase.go - ┣━ 📄 jsiicalc_IJsii487External.go - ┣━ 📄 jsiicalc_IJsii487External2.go - ┣━ 📄 jsiicalc_IJsii496.go - ┣━ 📄 jsiicalc_Implementation.go - ┣━ 📄 jsiicalc_ImplementInternalInterface.go - ┣━ 📄 jsiicalc_ImplementsInterfaceWithInternal.go - ┣━ 📄 jsiicalc_ImplementsInterfaceWithInternalSubclass.go - ┣━ 📄 jsiicalc_ImplementsPrivateInterface.go - ┣━ 📄 jsiicalc_ImplictBaseOfBase.go - ┣━ 📄 jsiicalc_IMutableObjectLiteral.go - ┣━ 📄 jsiicalc_InbetweenClass.go - ┣━ 📄 jsiicalc_INonInternalInterface.go - ┣━ 📄 jsiicalc_InterfaceCollections.go - ┣━ 📄 jsiicalc_InterfacesMaker.go - ┣━ 📄 jsiicalc_IObjectWithProperty.go - ┣━ 📄 jsiicalc_IOptionalMethod.go - ┣━ 📄 jsiicalc_IPrivatelyImplemented.go - ┣━ 📄 jsiicalc_IPublicInterface.go - ┣━ 📄 jsiicalc_IPublicInterface2.go - ┣━ 📄 jsiicalc_IRandomNumberGenerator.go - ┣━ 📄 jsiicalc_IReturnJsii976.go - ┣━ 📄 jsiicalc_IReturnsNumber.go - ┣━ 📄 jsiicalc_Isomorphism.go - ┣━ 📄 jsiicalc_Issue2638.go - ┣━ 📄 jsiicalc_Issue2638B.go - ┣━ 📄 jsiicalc_IStableInterface.go - ┣━ 📄 jsiicalc_IStructReturningDelegate.go - ┣━ 📄 jsiicalc_IWallClock.go - ┣━ 📄 jsiicalc_JavaReservedWords.go - ┣━ 📄 jsiicalc_JSII417Derived.go - ┣━ 📄 jsiicalc_JSII417PublicBaseOfBase.go - ┣━ 📄 jsiicalc_Jsii487Derived.go - ┣━ 📄 jsiicalc_Jsii496Derived.go - ┣━ 📄 jsiicalc_JsiiAgent.go - ┣━ 📄 jsiicalc_JSObjectLiteralForInterface.go - ┣━ 📄 jsiicalc_JSObjectLiteralToNative.go - ┣━ 📄 jsiicalc_JSObjectLiteralToNativeClass.go - ┣━ 📄 jsiicalc_JsonFormatter.go - ┣━ 📄 jsiicalc_LevelOne_PropBooleanValue.go - ┣━ 📄 jsiicalc_LevelOne_PropProperty.go - ┣━ 📄 jsiicalc_LevelOne.go - ┣━ 📄 jsiicalc_LevelOneProps.go - ┣━ 📄 jsiicalc_LoadBalancedFargateServiceProps.go - ┣━ 📄 jsiicalc_MethodNamedProperty.go - ┣━ 📄 jsiicalc_Multiply.go - ┣━ 📄 jsiicalc_Negate.go - ┣━ 📄 jsiicalc_NestedClassInstance.go - ┣━ 📄 jsiicalc_NestedStruct.go - ┣━ 📄 jsiicalc_NodeStandardLibrary.go - ┣━ 📄 jsiicalc_NullShouldBeTreatedAsUndefined.go - ┣━ 📄 jsiicalc_NullShouldBeTreatedAsUndefinedData.go - ┣━ 📄 jsiicalc_NumberGenerator.go - ┣━ 📄 jsiicalc_ObjectRefsInCollections.go - ┣━ 📄 jsiicalc_ObjectWithPropertyProvider.go - ┣━ 📄 jsiicalc_Old.go - ┣━ 📄 jsiicalc_OptionalArgumentInvoker.go - ┣━ 📄 jsiicalc_OptionalConstructorArgument.go - ┣━ 📄 jsiicalc_OptionalStruct.go - ┣━ 📄 jsiicalc_OptionalStructConsumer.go - ┣━ 📄 jsiicalc_OverridableProtectedMember.go - ┣━ 📄 jsiicalc_OverrideReturnsObject.go - ┣━ 📄 jsiicalc_ParamShadowsBuiltins.go - ┣━ 📄 jsiicalc_ParamShadowsBuiltinsProps.go - ┣━ 📄 jsiicalc_ParamShadowsScope.go - ┣━ 📄 jsiicalc_ParentStruct982.go - ┣━ 📄 jsiicalc_PartiallyInitializedThisConsumer.go - ┣━ 📄 jsiicalc_Polymorphism.go - ┣━ 📄 jsiicalc_Power.go - ┣━ 📄 jsiicalc_PromiseNothing.go - ┣━ 📄 jsiicalc_PropertyNamedProperty.go - ┣━ 📄 jsiicalc_PublicClass.go - ┣━ 📄 jsiicalc_PythonReservedWords.go - ┣━ 📄 jsiicalc_ReferenceEnumFromScopedPackage.go - ┣━ 📄 jsiicalc_ReturnsPrivateImplementationOfInterface.go - ┣━ 📄 jsiicalc_RootStruct.go - ┣━ 📄 jsiicalc_RootStructValidator.go - ┣━ 📄 jsiicalc_RuntimeTypeChecking.go - ┣━ 📄 jsiicalc_SecondLevelStruct.go - ┣━ 📄 jsiicalc_SingleInstanceTwoTypes.go - ┣━ 📄 jsiicalc_SingletonInt.go - ┣━ 📄 jsiicalc_SingletonIntEnum.go - ┣━ 📄 jsiicalc_SingletonString.go - ┣━ 📄 jsiicalc_SingletonStringEnum.go - ┣━ 📄 jsiicalc_SmellyStruct.go - ┣━ 📄 jsiicalc_SomeTypeJsii976.go - ┣━ 📄 jsiicalc_StableClass.go - ┣━ 📄 jsiicalc_StableEnum.go - ┣━ 📄 jsiicalc_StableStruct.go - ┣━ 📄 jsiicalc_StaticContext.go - ┣━ 📄 jsiicalc_StaticHelloChild.go - ┣━ 📄 jsiicalc_StaticHelloParent.go - ┣━ 📄 jsiicalc_Statics.go - ┣━ 📄 jsiicalc_StringEnum.go - ┣━ 📄 jsiicalc_StripInternal.go - ┣━ 📄 jsiicalc_StructA.go - ┣━ 📄 jsiicalc_StructB.go - ┣━ 📄 jsiicalc_StructParameterType.go - ┣━ 📄 jsiicalc_StructPassing.go - ┣━ 📄 jsiicalc_StructUnionConsumer.go - ┣━ 📄 jsiicalc_StructWithCollectionOfUnionts.go - ┣━ 📄 jsiicalc_StructWithEnum.go - ┣━ 📄 jsiicalc_StructWithJavaReservedWords.go - ┣━ 📄 jsiicalc_Sum.go - ┣━ 📄 jsiicalc_SupportsNiceJavaBuilder.go - ┣━ 📄 jsiicalc_SupportsNiceJavaBuilderProps.go - ┣━ 📄 jsiicalc_SupportsNiceJavaBuilderWithRequiredProps.go - ┣━ 📄 jsiicalc_SyncVirtualMethods.go - ┣━ 📄 jsiicalc_TestStructWithEnum.go - ┣━ 📄 jsiicalc_Thrower.go - ┣━ 📄 jsiicalc_TopLevelStruct.go - ┣━ 📄 jsiicalc_TwoMethodsWithSimilarCapitalization.go - ┣━ 📄 jsiicalc_UmaskCheck.go - ┣━ 📄 jsiicalc_UnaryOperation.go - ┣━ 📄 jsiicalc_UnionProperties.go - ┣━ 📄 jsiicalc_UpcasingReflectable.go - ┣━ 📄 jsiicalc_UseBundledDependency.go - ┣━ 📄 jsiicalc_UseCalcBase.go - ┣━ 📄 jsiicalc_UsesInterfaceWithProperties.go - ┣━ 📄 jsiicalc_VariadicInvoker.go - ┣━ 📄 jsiicalc_VariadicMethod.go - ┣━ 📄 jsiicalc_VariadicTypeUnion.go - ┣━ 📄 jsiicalc_VirtualMethodPlayground.go - ┣━ 📄 jsiicalc_VoidCallback.go - ┣━ 📄 jsiicalc_WithPrivatePropertyInConstructor.go - ┣━ 📄 jsiicalc.go - ┣━ 📄 LICENSE - ┣━ 📁 module2530 - ┃ ┣━ 📄 module2530_MyClass.go - ┃ ┗━ 📄 module2530.go - ┣━ 📁 module2617 - ┃ ┣━ 📄 module2617_OnlyStatics.go - ┃ ┗━ 📄 module2617.go - ┣━ 📁 module2647 - ┃ ┣━ 📁 internal - ┃ ┃ ┗━ 📄 types.go - ┃ ┣━ 📄 module2647_ExtendAndImplement.go - ┃ ┗━ 📄 module2647.go - ┣━ 📁 module2689 - ┃ ┣━ 📁 methods - ┃ ┃ ┣━ 📄 methods_MyClass.go - ┃ ┃ ┗━ 📄 methods.go - ┃ ┣━ 📁 props - ┃ ┃ ┣━ 📄 props_MyClass.go - ┃ ┃ ┗━ 📄 props.go - ┃ ┣━ 📁 retval - ┃ ┃ ┣━ 📄 retval_MyClass.go - ┃ ┃ ┗━ 📄 retval.go - ┃ ┗━ 📁 structs - ┃ ┣━ 📄 structs_MyStruct.go - ┃ ┗━ 📄 structs.go - ┣━ 📁 module2692 - ┃ ┣━ 📁 submodule1 - ┃ ┃ ┣━ 📄 submodule1_Bar.go - ┃ ┃ ┗━ 📄 submodule1.go - ┃ ┗━ 📁 submodule2 - ┃ ┣━ 📄 submodule2_Bar.go - ┃ ┣━ 📄 submodule2_Foo.go - ┃ ┗━ 📄 submodule2.go - ┣━ 📁 module2700 - ┃ ┣━ 📄 module2700_Base.go - ┃ ┣━ 📄 module2700_Derived.go - ┃ ┣━ 📄 module2700_IFoo.go - ┃ ┗━ 📄 module2700.go - ┣━ 📁 module2702 - ┃ ┣━ 📁 internal - ┃ ┃ ┗━ 📄 types.go - ┃ ┣━ 📄 module2702_Baz.go - ┃ ┣━ 📄 module2702_Class1.go - ┃ ┣━ 📄 module2702_Class2.go - ┃ ┣━ 📄 module2702_Class3.go - ┃ ┣━ 📄 module2702_Construct.go - ┃ ┣━ 📄 module2702_IBaz.go - ┃ ┣━ 📄 module2702_IConstruct.go - ┃ ┣━ 📄 module2702_IFoo.go - ┃ ┣━ 📄 module2702_IResource.go - ┃ ┣━ 📄 module2702_IVpc.go - ┃ ┣━ 📄 module2702_Resource.go - ┃ ┣━ 📄 module2702_Vpc.go - ┃ ┗━ 📄 module2702.go - ┣━ 📁 nodirect - ┃ ┣━ 📁 sub1 - ┃ ┃ ┣━ 📄 sub1_TypeFromSub1.go - ┃ ┃ ┗━ 📄 sub1.go - ┃ ┗━ 📁 sub2 - ┃ ┣━ 📄 sub2_TypeFromSub2.go - ┃ ┗━ 📄 sub2.go - ┣━ 📄 NOTICE - ┣━ 📁 onlystatic - ┃ ┣━ 📄 onlystatic_OnlyStaticMethods.go - ┃ ┗━ 📄 onlystatic.go - ┣━ 📁 pythonself - ┃ ┣━ 📄 pythonself_ClassWithSelf.go - ┃ ┣━ 📄 pythonself_ClassWithSelfKwarg.go - ┃ ┣━ 📄 pythonself_IInterfaceWithSelf.go - ┃ ┣━ 📄 pythonself_StructWithSelf.go - ┃ ┗━ 📄 pythonself.go - ┣━ 📄 README.md - ┣━ 📁 submodule - ┃ ┣━ 📁 backreferences - ┃ ┃ ┣━ 📄 backreferences_MyClassReference.go - ┃ ┃ ┗━ 📄 backreferences.go - ┃ ┣━ 📁 child - ┃ ┃ ┣━ 📄 child_Awesomeness.go - ┃ ┃ ┣━ 📄 child_Goodness.go - ┃ ┃ ┣━ 📄 child_InnerClass.go - ┃ ┃ ┣━ 📄 child_KwargsProps.go - ┃ ┃ ┣━ 📄 child_OuterClass.go - ┃ ┃ ┣━ 📄 child_SomeEnum.go - ┃ ┃ ┣━ 📄 child_SomeStruct.go - ┃ ┃ ┣━ 📄 child_Structure.go - ┃ ┃ ┗━ 📄 child.go - ┃ ┣━ 📁 internal - ┃ ┃ ┗━ 📄 types.go - ┃ ┣━ 📁 isolated - ┃ ┃ ┣━ 📄 isolated_Kwargs.go - ┃ ┃ ┣━ 📄 isolated.go - ┃ ┃ ┗━ 📄 README.md - ┃ ┣━ 📁 nestedsubmodule - ┃ ┃ ┣━ 📁 deeplynested - ┃ ┃ ┃ ┣━ 📄 deeplynested_INamespaced.go - ┃ ┃ ┃ ┗━ 📄 deeplynested.go - ┃ ┃ ┣━ 📁 internal - ┃ ┃ ┃ ┗━ 📄 types.go - ┃ ┃ ┣━ 📄 nestedsubmodule_Namespaced.go - ┃ ┃ ┗━ 📄 nestedsubmodule.go - ┃ ┣━ 📁 param - ┃ ┃ ┣━ 📄 param_SpecialParameter.go - ┃ ┃ ┗━ 📄 param.go - ┃ ┣━ 📄 README.md - ┃ ┣━ 📁 returnsparam - ┃ ┃ ┣━ 📄 returnsparam_ReturnsSpecialParameter.go - ┃ ┃ ┗━ 📄 returnsparam.go - ┃ ┣━ 📄 submodule_Default.go - ┃ ┣━ 📄 submodule_MyClass.go - ┃ ┗━ 📄 submodule.go - ┣━ 📁 union - ┃ ┣━ 📄 union_ConsumesUnion.go - ┃ ┣━ 📄 union_IResolvable.go - ┃ ┣━ 📄 union_Resolvable.go - ┃ ┗━ 📄 union.go - ┗━ 📄 version -`; +func (j *jsiiProxy_AllTypes) StringProperty() *string { + var returns *string + _jsii_.Get( + j, + "stringProperty", + &returns, + ) + return returns +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/LICENSE 1`] = ` +func (j *jsiiProxy_AllTypes) UnionArrayProperty() *[]interface{} { + var returns *[]interface{} + _jsii_.Get( + j, + "unionArrayProperty", + &returns, + ) + return returns +} - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +func (j *jsiiProxy_AllTypes) UnionMapProperty() *map[string]interface{} { + var returns *map[string]interface{} + _jsii_.Get( + j, + "unionMapProperty", + &returns, + ) + return returns +} - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +func (j *jsiiProxy_AllTypes) UnionProperty() interface{} { + var returns interface{} + _jsii_.Get( + j, + "unionProperty", + &returns, + ) + return returns +} - 1. Definitions. +func (j *jsiiProxy_AllTypes) UnknownArrayProperty() *[]interface{} { + var returns *[]interface{} + _jsii_.Get( + j, + "unknownArrayProperty", + &returns, + ) + return returns +} - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +func (j *jsiiProxy_AllTypes) UnknownMapProperty() *map[string]interface{} { + var returns *map[string]interface{} + _jsii_.Get( + j, + "unknownMapProperty", + &returns, + ) + return returns +} - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. +func (j *jsiiProxy_AllTypes) UnknownProperty() interface{} { + var returns interface{} + _jsii_.Get( + j, + "unknownProperty", + &returns, + ) + return returns +} - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. +func NewAllTypes() AllTypes { + _init_.Initialize() - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + j := jsiiProxy_AllTypes{} - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + _jsii_.Create( + "jsii-calc.AllTypes", + nil, // no parameters + &j, + ) - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). + return &j +} - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. +func NewAllTypes_Override(a AllTypes) { + _init_.Initialize() - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." + _jsii_.Create( + "jsii-calc.AllTypes", + nil, // no parameters + a, + ) +} - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. +func (j *jsiiProxy_AllTypes)SetAnyArrayProperty(val *[]interface{}) { + _jsii_.Set( + j, + "anyArrayProperty", + val, + ) +} - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. +func (j *jsiiProxy_AllTypes)SetAnyMapProperty(val *map[string]interface{}) { + _jsii_.Set( + j, + "anyMapProperty", + val, + ) +} - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. +func (j *jsiiProxy_AllTypes)SetAnyProperty(val interface{}) { + _jsii_.Set( + j, + "anyProperty", + val, + ) +} - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: +func (j *jsiiProxy_AllTypes)SetArrayProperty(val *[]*string) { + _jsii_.Set( + j, + "arrayProperty", + val, + ) +} - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and +func (j *jsiiProxy_AllTypes)SetBooleanProperty(val *bool) { + _jsii_.Set( + j, + "booleanProperty", + val, + ) +} - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and +func (j *jsiiProxy_AllTypes)SetDateProperty(val *time.Time) { + _jsii_.Set( + j, + "dateProperty", + val, + ) +} - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and +func (j *jsiiProxy_AllTypes)SetEnumProperty(val AllTypesEnum) { + _jsii_.Set( + j, + "enumProperty", + val, + ) +} - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. +func (j *jsiiProxy_AllTypes)SetJsonProperty(val *map[string]interface{}) { + _jsii_.Set( + j, + "jsonProperty", + val, + ) +} - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. +func (j *jsiiProxy_AllTypes)SetMapProperty(val *map[string]scopejsiicalclib.Number) { + _jsii_.Set( + j, + "mapProperty", + val, + ) +} - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. +func (j *jsiiProxy_AllTypes)SetNumberProperty(val *float64) { + _jsii_.Set( + j, + "numberProperty", + val, + ) +} - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. +func (j *jsiiProxy_AllTypes)SetOptionalEnumValue(val StringEnum) { + _jsii_.Set( + j, + "optionalEnumValue", + val, + ) +} - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. +func (j *jsiiProxy_AllTypes)SetStringProperty(val *string) { + _jsii_.Set( + j, + "stringProperty", + val, + ) +} - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. +func (j *jsiiProxy_AllTypes)SetUnionArrayProperty(val *[]interface{}) { + _jsii_.Set( + j, + "unionArrayProperty", + val, + ) +} - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. +func (j *jsiiProxy_AllTypes)SetUnionMapProperty(val *map[string]interface{}) { + _jsii_.Set( + j, + "unionMapProperty", + val, + ) +} - END OF TERMS AND CONDITIONS +func (j *jsiiProxy_AllTypes)SetUnionProperty(val interface{}) { + _jsii_.Set( + j, + "unionProperty", + val, + ) +} - APPENDIX: How to apply the Apache License to your work. +func (j *jsiiProxy_AllTypes)SetUnknownArrayProperty(val *[]interface{}) { + _jsii_.Set( + j, + "unknownArrayProperty", + val, + ) +} - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. +func (j *jsiiProxy_AllTypes)SetUnknownMapProperty(val *map[string]interface{}) { + _jsii_.Set( + j, + "unknownMapProperty", + val, + ) +} - Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +func (j *jsiiProxy_AllTypes)SetUnknownProperty(val interface{}) { + _jsii_.Set( + j, + "unknownProperty", + val, + ) +} - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +func (a *jsiiProxy_AllTypes) AnyIn(inp interface{}) { + _jsii_.InvokeVoid( + a, + "anyIn", + []interface{}{inp}, + ) +} - http://www.apache.org/licenses/LICENSE-2.0 +func (a *jsiiProxy_AllTypes) AnyOut() interface{} { + var returns interface{} - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -`; + _jsii_.Invoke( + a, + "anyOut", + nil, // no parameters + &returns, + ) -exports[`Generated code for "jsii-calc": /go/jsiicalc/NOTICE 1`] = ` -jsii -Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + return returns +} -`; +func (a *jsiiProxy_AllTypes) EnumMethod(value StringEnum) StringEnum { + var returns StringEnum -exports[`Generated code for "jsii-calc": /go/jsiicalc/README.md 1`] = ` -# jsii Calculator + _jsii_.Invoke( + a, + "enumMethod", + []interface{}{value}, + &returns, + ) -This library is used to demonstrate and test the features of JSII + return returns +} -## How to use running sum API: -First, create a calculator: +`; -\`\`\`go -calculator := calc.NewCalculator() -\`\`\` +exports[`Generated code for "jsii-calc": /go/jsiicalc/AllTypesEnum.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -Then call some operations: -\`\`\`go -calculator.Add(jsii.Number(10)) -\`\`\` +type AllTypesEnum string -## Code Samples +const ( + AllTypesEnum_MY_ENUM_VALUE AllTypesEnum = "MY_ENUM_VALUE" + AllTypesEnum_YOUR_ENUM_VALUE AllTypesEnum = "YOUR_ENUM_VALUE" + AllTypesEnum_THIS_IS_GREAT AllTypesEnum = "THIS_IS_GREAT" +) -\`\`\`go -/* This is totes a magic comment in here, just you wait! */ -foo := "bar" -\`\`\` `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/anonymous.go 1`] = ` -package anonymous +exports[`Generated code for "jsii-calc": /go/jsiicalc/AllowedMethodNames.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( - "reflect" - _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -func init() { - _jsii_.RegisterInterface( - "jsii-calc.anonymous.IOptionA", - reflect.TypeOf((*IOptionA)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "doSomething", GoMethod: "DoSomething"}, - }, - func() interface{} { - return &jsiiProxy_IOptionA{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.anonymous.IOptionB", - reflect.TypeOf((*IOptionB)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "doSomethingElse", GoMethod: "DoSomethingElse"}, - }, - func() interface{} { - return &jsiiProxy_IOptionB{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.anonymous.UseOptions", - reflect.TypeOf((*UseOptions)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_UseOptions{} - }, - ) +type AllowedMethodNames interface { + GetBar(_p1 *string, _p2 *float64) + // getXxx() is not allowed (see negatives), but getXxx(a, ...) is okay. + GetFoo(withParam *string) *string + SetBar(_x *string, _y *float64, _z *bool) + // setFoo(x) is not allowed (see negatives), but setXxx(a, b, ...) is okay. + SetFoo(_x *string, _y *float64) } -`; +// The jsii proxy struct for AllowedMethodNames +type jsiiProxy_AllowedMethodNames struct { + _ byte // padding +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/anonymous_IOptionA.go 1`] = ` -package anonymous +func NewAllowedMethodNames() AllowedMethodNames { + _init_.Initialize() -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) + j := jsiiProxy_AllowedMethodNames{} -type IOptionA interface { - DoSomething() *string -} + _jsii_.Create( + "jsii-calc.AllowedMethodNames", + nil, // no parameters + &j, + ) -// The jsii proxy for IOptionA -type jsiiProxy_IOptionA struct { - _ byte // padding + return &j } -func (i *jsiiProxy_IOptionA) DoSomething() *string { +func NewAllowedMethodNames_Override(a AllowedMethodNames) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.AllowedMethodNames", + nil, // no parameters + a, + ) +} + +func (a *jsiiProxy_AllowedMethodNames) GetBar(_p1 *string, _p2 *float64) { + _jsii_.InvokeVoid( + a, + "getBar", + []interface{}{_p1, _p2}, + ) +} + +func (a *jsiiProxy_AllowedMethodNames) GetFoo(withParam *string) *string { var returns *string _jsii_.Invoke( - i, - "doSomething", - nil, // no parameters + a, + "getFoo", + []interface{}{withParam}, &returns, ) return returns } +func (a *jsiiProxy_AllowedMethodNames) SetBar(_x *string, _y *float64, _z *bool) { + _jsii_.InvokeVoid( + a, + "setBar", + []interface{}{_x, _y, _z}, + ) +} + +func (a *jsiiProxy_AllowedMethodNames) SetFoo(_x *string, _y *float64) { + _jsii_.InvokeVoid( + a, + "setFoo", + []interface{}{_x, _y}, + ) +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/anonymous_IOptionB.go 1`] = ` -package anonymous +exports[`Generated code for "jsii-calc": /go/jsiicalc/AmbiguousParameters.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type IOptionB interface { - DoSomethingElse() *string +type AmbiguousParameters interface { + Props() *StructParameterType + Scope() Bell } -// The jsii proxy for IOptionB -type jsiiProxy_IOptionB struct { +// The jsii proxy struct for AmbiguousParameters +type jsiiProxy_AmbiguousParameters struct { _ byte // padding } -func (i *jsiiProxy_IOptionB) DoSomethingElse() *string { - var returns *string - - _jsii_.Invoke( - i, - "doSomethingElse", - nil, // no parameters +func (j *jsiiProxy_AmbiguousParameters) Props() *StructParameterType { + var returns *StructParameterType + _jsii_.Get( + j, + "props", &returns, ) + return returns +} +func (j *jsiiProxy_AmbiguousParameters) Scope() Bell { + var returns Bell + _jsii_.Get( + j, + "scope", + &returns, + ) return returns } +func NewAmbiguousParameters(scope Bell, props *StructParameterType) AmbiguousParameters { + _init_.Initialize() + + j := jsiiProxy_AmbiguousParameters{} + + _jsii_.Create( + "jsii-calc.AmbiguousParameters", + []interface{}{scope, props}, + &j, + ) + + return &j +} + +func NewAmbiguousParameters_Override(a AmbiguousParameters, scope Bell, props *StructParameterType) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.AmbiguousParameters", + []interface{}{scope, props}, + a, + ) +} + + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/anonymous_UseOptions.go 1`] = ` -package anonymous +exports[`Generated code for "jsii-calc": /go/jsiicalc/AnonymousImplementationProvider.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type UseOptions interface { +type AnonymousImplementationProvider interface { + IAnonymousImplementationProvider + ProvideAsClass() Implementation + ProvideAsInterface() IAnonymouslyImplementMe } -// The jsii proxy struct for UseOptions -type jsiiProxy_UseOptions struct { - _ byte // padding +// The jsii proxy struct for AnonymousImplementationProvider +type jsiiProxy_AnonymousImplementationProvider struct { + jsiiProxy_IAnonymousImplementationProvider } -func UseOptions_Consume(option interface{}) *string { +func NewAnonymousImplementationProvider() AnonymousImplementationProvider { _init_.Initialize() - var returns *string + j := jsiiProxy_AnonymousImplementationProvider{} - _jsii_.StaticInvoke( - "jsii-calc.anonymous.UseOptions", - "consume", - []interface{}{option}, - &returns, + _jsii_.Create( + "jsii-calc.AnonymousImplementationProvider", + nil, // no parameters + &j, ) - return returns + return &j } -func UseOptions_PrivideAsAny(which *string) interface{} { +func NewAnonymousImplementationProvider_Override(a AnonymousImplementationProvider) { _init_.Initialize() - var returns interface{} + _jsii_.Create( + "jsii-calc.AnonymousImplementationProvider", + nil, // no parameters + a, + ) +} - _jsii_.StaticInvoke( - "jsii-calc.anonymous.UseOptions", - "privideAsAny", - []interface{}{which}, +func (a *jsiiProxy_AnonymousImplementationProvider) ProvideAsClass() Implementation { + var returns Implementation + + _jsii_.Invoke( + a, + "provideAsClass", + nil, // no parameters &returns, ) return returns } -func UseOptions_Provide(which *string) interface{} { - _init_.Initialize() - - var returns interface{} +func (a *jsiiProxy_AnonymousImplementationProvider) ProvideAsInterface() IAnonymouslyImplementMe { + var returns IAnonymouslyImplementMe - _jsii_.StaticInvoke( - "jsii-calc.anonymous.UseOptions", - "provide", - []interface{}{which}, + _jsii_.Invoke( + a, + "provideAsInterface", + nil, // no parameters &returns, ) @@ -3340,395 +4058,436 @@ func UseOptions_Provide(which *string) interface{} { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/cdk16625.go 1`] = ` -package cdk16625 +exports[`Generated code for "jsii-calc": /go/jsiicalc/AsyncVirtualMethods.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( - "reflect" - _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -func init() { - _jsii_.RegisterClass( - "jsii-calc.cdk16625.Cdk16625", - reflect.TypeOf((*Cdk16625)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "test", GoMethod: "Test"}, - _jsii_.MemberMethod{JsiiMethod: "unwrap", GoMethod: "Unwrap"}, - }, - func() interface{} { - return &jsiiProxy_Cdk16625{} - }, - ) +type AsyncVirtualMethods interface { + CallMe() *float64 + // Just calls "overrideMeToo". + CallMe2() *float64 + // This method calls the "callMe" async method indirectly, which will then invoke a virtual method. + // + // This is a "double promise" situation, which + // means that callbacks are not going to be available immediate, but only + // after an "immediates" cycle. + CallMeDoublePromise() *float64 + DontOverrideMe() *float64 + OverrideMe(mult *float64) *float64 + OverrideMeToo() *float64 } -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/cdk16625_Cdk16625.go 1`] = ` -package cdk16625 +// The jsii proxy struct for AsyncVirtualMethods +type jsiiProxy_AsyncVirtualMethods struct { + _ byte // padding +} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +func NewAsyncVirtualMethods() AsyncVirtualMethods { + _init_.Initialize() - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3" -) + j := jsiiProxy_AsyncVirtualMethods{} -type Cdk16625 interface { - // Run this function to verify that everything is working as it should. - Test() - // Implement this functin to return \`gen.next()\`. It is extremely important that the \`donotimport\` submodule is NEVER explicitly loaded in the testing application (otherwise this test is void). - Unwrap(gen jsiicalc.IRandomNumberGenerator) *float64 -} + _jsii_.Create( + "jsii-calc.AsyncVirtualMethods", + nil, // no parameters + &j, + ) -// The jsii proxy struct for Cdk16625 -type jsiiProxy_Cdk16625 struct { - _ byte // padding + return &j } -func NewCdk16625_Override(c Cdk16625) { +func NewAsyncVirtualMethods_Override(a AsyncVirtualMethods) { _init_.Initialize() _jsii_.Create( - "jsii-calc.cdk16625.Cdk16625", + "jsii-calc.AsyncVirtualMethods", nil, // no parameters - c, + a, ) } -func (c *jsiiProxy_Cdk16625) Test() { - _jsii_.InvokeVoid( - c, - "test", +func (a *jsiiProxy_AsyncVirtualMethods) CallMe() *float64 { + var returns *float64 + + _jsii_.Invoke( + a, + "callMe", nil, // no parameters + &returns, ) + + return returns } -func (c *jsiiProxy_Cdk16625) Unwrap(gen jsiicalc.IRandomNumberGenerator) *float64 { +func (a *jsiiProxy_AsyncVirtualMethods) CallMe2() *float64 { var returns *float64 _jsii_.Invoke( - c, - "unwrap", - []interface{}{gen}, + a, + "callMe2", + nil, // no parameters &returns, ) return returns } +func (a *jsiiProxy_AsyncVirtualMethods) CallMeDoublePromise() *float64 { + var returns *float64 -`; + _jsii_.Invoke( + a, + "callMeDoublePromise", + nil, // no parameters + &returns, + ) -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/donotimport.go 1`] = ` -package donotimport + return returns +} -import ( - "reflect" +func (a *jsiiProxy_AsyncVirtualMethods) DontOverrideMe() *float64 { + var returns *float64 - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) + _jsii_.Invoke( + a, + "dontOverrideMe", + nil, // no parameters + &returns, + ) -func init() { - _jsii_.RegisterClass( - "jsii-calc.cdk16625.donotimport.UnimportedSubmoduleType", - reflect.TypeOf((*UnimportedSubmoduleType)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"}, - }, - func() interface{} { - j := jsiiProxy_UnimportedSubmoduleType{} - _jsii_.InitJsiiProxy(&j.Type__jsiicalcIRandomNumberGenerator) - return &j - }, + return returns +} + +func (a *jsiiProxy_AsyncVirtualMethods) OverrideMe(mult *float64) *float64 { + var returns *float64 + + _jsii_.Invoke( + a, + "overrideMe", + []interface{}{mult}, + &returns, + ) + + return returns +} + +func (a *jsiiProxy_AsyncVirtualMethods) OverrideMeToo() *float64 { + var returns *float64 + + _jsii_.Invoke( + a, + "overrideMeToo", + nil, // no parameters + &returns, ) + + return returns } + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/donotimport_UnimportedSubmoduleType.go 1`] = ` -package donotimport +exports[`Generated code for "jsii-calc": /go/jsiicalc/AugmentableClass.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3" - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/cdk16625/donotimport/internal" ) -// This type demonstrates the ability to receive a callback argument that has a type from a submodule not explicitly imported in the user's code. -// -// This checks -// that all types available in the assembly can be resolved by the runtime -// library, regardless of whether they were explicitly referenced or not. -// See: https://github.com/aws/aws-cdk/issues/16625 -// -type UnimportedSubmoduleType interface { - jsiicalc.IRandomNumberGenerator - // Not quite random, but it'll do. - // - // Returns: 1337. - Next() *float64 +type AugmentableClass interface { + MethodOne() + MethodTwo() } -// The jsii proxy struct for UnimportedSubmoduleType -type jsiiProxy_UnimportedSubmoduleType struct { - internal.Type__jsiicalcIRandomNumberGenerator +// The jsii proxy struct for AugmentableClass +type jsiiProxy_AugmentableClass struct { + _ byte // padding } -func NewUnimportedSubmoduleType(value *float64) UnimportedSubmoduleType { +func NewAugmentableClass() AugmentableClass { _init_.Initialize() - j := jsiiProxy_UnimportedSubmoduleType{} + j := jsiiProxy_AugmentableClass{} _jsii_.Create( - "jsii-calc.cdk16625.donotimport.UnimportedSubmoduleType", - []interface{}{value}, + "jsii-calc.AugmentableClass", + nil, // no parameters &j, ) return &j } -func NewUnimportedSubmoduleType_Override(u UnimportedSubmoduleType, value *float64) { +func NewAugmentableClass_Override(a AugmentableClass) { _init_.Initialize() _jsii_.Create( - "jsii-calc.cdk16625.donotimport.UnimportedSubmoduleType", - []interface{}{value}, - u, + "jsii-calc.AugmentableClass", + nil, // no parameters + a, ) } -func (u *jsiiProxy_UnimportedSubmoduleType) Next() *float64 { - var returns *float64 - - _jsii_.Invoke( - u, - "next", +func (a *jsiiProxy_AugmentableClass) MethodOne() { + _jsii_.InvokeVoid( + a, + "methodOne", nil, // no parameters - &returns, ) +} - return returns +func (a *jsiiProxy_AugmentableClass) MethodTwo() { + _jsii_.InvokeVoid( + a, + "methodTwo", + nil, // no parameters + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/internal/types.go 1`] = ` -package internal +exports[`Generated code for "jsii-calc": /go/jsiicalc/BaseClass.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + import ( - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3" + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type Type__jsiicalcIRandomNumberGenerator = jsiicalc.IRandomNumberGenerator -`; +type BaseClass interface { + Property() *string + Method() *float64 +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/cdk22369.go 1`] = ` -package cdk22369 +// The jsii proxy struct for BaseClass +type jsiiProxy_BaseClass struct { + _ byte // padding +} -import ( - "reflect" +func (j *jsiiProxy_BaseClass) Property() *string { + var returns *string + _jsii_.Get( + j, + "property", + &returns, + ) + return returns +} - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) -func init() { - _jsii_.RegisterClass( - "jsii-calc.cdk22369.AcceptsPath", - reflect.TypeOf((*AcceptsPath)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_AcceptsPath{} - }, +func NewBaseClass_Override(b BaseClass) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.BaseClass", + nil, // no parameters + b, ) - _jsii_.RegisterStruct( - "jsii-calc.cdk22369.AcceptsPathProps", - reflect.TypeOf((*AcceptsPathProps)(nil)).Elem(), +} + +func (b *jsiiProxy_BaseClass) Method() *float64 { + var returns *float64 + + _jsii_.Invoke( + b, + "method", + nil, // no parameters + &returns, ) + + return returns } + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/cdk22369_AcceptsPath.go 1`] = ` -package cdk22369 +exports[`Generated code for "jsii-calc": /go/jsiicalc/BaseJsii976.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type AcceptsPath interface { +type BaseJsii976 interface { } -// The jsii proxy struct for AcceptsPath -type jsiiProxy_AcceptsPath struct { +// The jsii proxy struct for BaseJsii976 +type jsiiProxy_BaseJsii976 struct { _ byte // padding } -func NewAcceptsPath(props *AcceptsPathProps) AcceptsPath { +func NewBaseJsii976() BaseJsii976 { _init_.Initialize() - j := jsiiProxy_AcceptsPath{} + j := jsiiProxy_BaseJsii976{} _jsii_.Create( - "jsii-calc.cdk22369.AcceptsPath", - []interface{}{props}, + "jsii-calc.BaseJsii976", + nil, // no parameters &j, ) return &j } -func NewAcceptsPath_Override(a AcceptsPath, props *AcceptsPathProps) { +func NewBaseJsii976_Override(b BaseJsii976) { _init_.Initialize() _jsii_.Create( - "jsii-calc.cdk22369.AcceptsPath", - []interface{}{props}, - a, + "jsii-calc.BaseJsii976", + nil, // no parameters + b, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/cdk22369_AcceptsPathProps.go 1`] = ` -package cdk22369 +exports[`Generated code for "jsii-calc": /go/jsiicalc/Bell.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) -type AcceptsPathProps struct { - // A path that doesn't exist. - SourcePath *string \`field:"required" json:"sourcePath" yaml:"sourcePath"\` +type Bell interface { + IBell + Rung() *bool + SetRung(val *bool) + Ring() } +// The jsii proxy struct for Bell +type jsiiProxy_Bell struct { + jsiiProxy_IBell +} -`; +func (j *jsiiProxy_Bell) Rung() *bool { + var returns *bool + _jsii_.Get( + j, + "rung", + &returns, + ) + return returns +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/composition.go 1`] = ` -package composition -import ( - "reflect" +func NewBell() Bell { + _init_.Initialize() - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) + j := jsiiProxy_Bell{} -func init() { - _jsii_.RegisterClass( - "jsii-calc.composition.CompositeOperation", - reflect.TypeOf((*CompositeOperation)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "decorationPostfixes", GoGetter: "DecorationPostfixes"}, - _jsii_.MemberProperty{JsiiProperty: "decorationPrefixes", GoGetter: "DecorationPrefixes"}, - _jsii_.MemberProperty{JsiiProperty: "expression", GoGetter: "Expression"}, - _jsii_.MemberProperty{JsiiProperty: "stringStyle", GoGetter: "StringStyle"}, - _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, - _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - }, - func() interface{} { - j := jsiiProxy_CompositeOperation{} - _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibOperation) - return &j - }, + _jsii_.Create( + "jsii-calc.Bell", + nil, // no parameters + &j, ) - _jsii_.RegisterEnum( - "jsii-calc.composition.CompositeOperation.CompositionStringStyle", - reflect.TypeOf((*CompositeOperation_CompositionStringStyle)(nil)).Elem(), - map[string]interface{}{ - "NORMAL": CompositeOperation_CompositionStringStyle_NORMAL, - "DECORATED": CompositeOperation_CompositionStringStyle_DECORATED, - }, + + return &j +} + +func NewBell_Override(b Bell) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.Bell", + nil, // no parameters + b, + ) +} + +func (j *jsiiProxy_Bell)SetRung(val *bool) { + _jsii_.Set( + j, + "rung", + val, + ) +} + +func (b *jsiiProxy_Bell) Ring() { + _jsii_.InvokeVoid( + b, + "ring", + nil, // no parameters ) } + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/composition_CompositeOperation.go 1`] = ` -package composition +exports[`Generated code for "jsii-calc": /go/jsiicalc/BinaryOperation.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition/internal" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -// Abstract operation composed from an expression of other operations. -type CompositeOperation interface { +// Represents an operation with two operands. +type BinaryOperation interface { scopejsiicalclib.Operation - // A set of postfixes to include in a decorated .toString(). - DecorationPostfixes() *[]*string - SetDecorationPostfixes(val *[]*string) - // A set of prefixes to include in a decorated .toString(). - DecorationPrefixes() *[]*string - SetDecorationPrefixes(val *[]*string) - // The expression that this operation consists of. - // - // Must be implemented by derived classes. - Expression() scopejsiicalclib.NumericValue - // The .toString() style. - StringStyle() CompositeOperation_CompositionStringStyle - SetStringStyle(val CompositeOperation_CompositionStringStyle) + scopejsiicalclib.IFriendly + // Left-hand side operand. + Lhs() scopejsiicalclib.NumericValue + // Right-hand side operand. + Rhs() scopejsiicalclib.NumericValue // The value. + // Deprecated. Value() *float64 + // Say hello! + Hello() *string // String representation of the value. + // Deprecated. ToString() *string // Returns: the name of the class (to verify native type names are created for derived classes). TypeName() interface{} } -// The jsii proxy struct for CompositeOperation -type jsiiProxy_CompositeOperation struct { +// The jsii proxy struct for BinaryOperation +type jsiiProxy_BinaryOperation struct { internal.Type__scopejsiicalclibOperation + internal.Type__scopejsiicalclibIFriendly } -func (j *jsiiProxy_CompositeOperation) DecorationPostfixes() *[]*string { - var returns *[]*string - _jsii_.Get( - j, - "decorationPostfixes", - &returns, - ) - return returns -} - -func (j *jsiiProxy_CompositeOperation) DecorationPrefixes() *[]*string { - var returns *[]*string - _jsii_.Get( - j, - "decorationPrefixes", - &returns, - ) - return returns -} - -func (j *jsiiProxy_CompositeOperation) Expression() scopejsiicalclib.NumericValue { +func (j *jsiiProxy_BinaryOperation) Lhs() scopejsiicalclib.NumericValue { var returns scopejsiicalclib.NumericValue _jsii_.Get( j, - "expression", + "lhs", &returns, ) return returns } -func (j *jsiiProxy_CompositeOperation) StringStyle() CompositeOperation_CompositionStringStyle { - var returns CompositeOperation_CompositionStringStyle +func (j *jsiiProxy_BinaryOperation) Rhs() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue _jsii_.Get( j, - "stringStyle", + "rhs", &returns, ) return returns } -func (j *jsiiProxy_CompositeOperation) Value() *float64 { +func (j *jsiiProxy_BinaryOperation) Value() *float64 { var returns *float64 _jsii_.Get( j, @@ -3739,45 +4498,35 @@ func (j *jsiiProxy_CompositeOperation) Value() *float64 { } -func NewCompositeOperation_Override(c CompositeOperation) { +// Creates a BinaryOperation. +func NewBinaryOperation_Override(b BinaryOperation, lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) { _init_.Initialize() _jsii_.Create( - "jsii-calc.composition.CompositeOperation", - nil, // no parameters - c, + "jsii-calc.BinaryOperation", + []interface{}{lhs, rhs}, + b, ) } -func (j *jsiiProxy_CompositeOperation)SetDecorationPostfixes(val *[]*string) { - _jsii_.Set( - j, - "decorationPostfixes", - val, - ) -} +func (b *jsiiProxy_BinaryOperation) Hello() *string { + var returns *string -func (j *jsiiProxy_CompositeOperation)SetDecorationPrefixes(val *[]*string) { - _jsii_.Set( - j, - "decorationPrefixes", - val, + _jsii_.Invoke( + b, + "hello", + nil, // no parameters + &returns, ) -} -func (j *jsiiProxy_CompositeOperation)SetStringStyle(val CompositeOperation_CompositionStringStyle) { - _jsii_.Set( - j, - "stringStyle", - val, - ) + return returns } -func (c *jsiiProxy_CompositeOperation) ToString() *string { +func (b *jsiiProxy_BinaryOperation) ToString() *string { var returns *string _jsii_.Invoke( - c, + b, "toString", nil, // no parameters &returns, @@ -3786,11 +4535,11 @@ func (c *jsiiProxy_CompositeOperation) ToString() *string { return returns } -func (c *jsiiProxy_CompositeOperation) TypeName() interface{} { +func (b *jsiiProxy_BinaryOperation) TypeName() interface{} { var returns interface{} _jsii_.Invoke( - c, + b, "typeName", nil, // no parameters &returns, @@ -3802,455 +4551,629 @@ func (c *jsiiProxy_CompositeOperation) TypeName() interface{} { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/composition_CompositeOperation_CompositionStringStyle.go 1`] = ` -package composition - - -// Style of .toString() output for CompositeOperation. -type CompositeOperation_CompositionStringStyle string +exports[`Generated code for "jsii-calc": /go/jsiicalc/BurriedAnonymousObject.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -const ( - // Normal string expression. - CompositeOperation_CompositionStringStyle_NORMAL CompositeOperation_CompositionStringStyle = "NORMAL" - // Decorated string expression. - CompositeOperation_CompositionStringStyle_DECORATED CompositeOperation_CompositionStringStyle = "DECORATED" +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) +// See https://github.com/aws/aws-cdk/issues/7977. +type BurriedAnonymousObject interface { + Check() *bool + // Implement this method and have it return it's parameter. + // + // Returns: \`value\`. + GiveItBack(value interface{}) interface{} +} -`; +// The jsii proxy struct for BurriedAnonymousObject +type jsiiProxy_BurriedAnonymousObject struct { + _ byte // padding +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/internal/types.go 1`] = ` -package internal -import ( - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" -) -type Type__scopejsiicalclibOperation = scopejsiicalclib.Operation +func NewBurriedAnonymousObject_Override(b BurriedAnonymousObject) { + _init_.Initialize() -`; + _jsii_.Create( + "jsii-calc.BurriedAnonymousObject", + nil, // no parameters + b, + ) +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties.go 1`] = ` -package derivedclasshasnoproperties +func (b *jsiiProxy_BurriedAnonymousObject) Check() *bool { + var returns *bool -import ( - "reflect" + _jsii_.Invoke( + b, + "check", + nil, // no parameters + &returns, + ) - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) + return returns +} -func init() { - _jsii_.RegisterClass( - "jsii-calc.DerivedClassHasNoProperties.Base", - reflect.TypeOf((*Base)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "prop", GoGetter: "Prop"}, - }, - func() interface{} { - return &jsiiProxy_Base{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.DerivedClassHasNoProperties.Derived", - reflect.TypeOf((*Derived)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "prop", GoGetter: "Prop"}, - }, - func() interface{} { - j := jsiiProxy_Derived{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_Base) - return &j - }, +func (b *jsiiProxy_BurriedAnonymousObject) GiveItBack(value interface{}) interface{} { + var returns interface{} + + _jsii_.Invoke( + b, + "giveItBack", + []interface{}{value}, + &returns, ) + + return returns } + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Base.go 1`] = ` -package derivedclasshasnoproperties +exports[`Generated code for "jsii-calc": /go/jsiicalc/Calculator.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -type Base interface { - Prop() *string - SetProp(val *string) +// A calculator which maintains a current value and allows adding operations. +// +// Here's how you use it: +// +// \`\`\`ts +// const calculator = new calc.Calculator(); +// calculator.add(5); +// calculator.mul(3); +// console.log(calculator.expression.value); +// \`\`\` +// +// I will repeat this example again, but in an @example tag. +// +// Example: +// calculator := calc.NewCalculator() +// calculator.add(jsii.Number(5)) +// calculator.mul(jsii.Number(3)) +// fmt.Println(calculator.expression.value) +// +type Calculator interface { + composition.CompositeOperation + // The current value. + Curr() scopejsiicalclib.NumericValue + SetCurr(val scopejsiicalclib.NumericValue) + // A set of postfixes to include in a decorated .toString(). + DecorationPostfixes() *[]*string + SetDecorationPostfixes(val *[]*string) + // A set of prefixes to include in a decorated .toString(). + DecorationPrefixes() *[]*string + SetDecorationPrefixes(val *[]*string) + // Returns the expression. + Expression() scopejsiicalclib.NumericValue + // The maximum value allows in this calculator. + MaxValue() *float64 + SetMaxValue(val *float64) + // A log of all operations. + OperationsLog() *[]scopejsiicalclib.NumericValue + // A map of per operation name of all operations performed. + OperationsMap() *map[string]*[]scopejsiicalclib.NumericValue + // The .toString() style. + StringStyle() composition.CompositeOperation_CompositionStringStyle + SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) + // Example of a property that accepts a union of types. + UnionProperty() interface{} + SetUnionProperty(val interface{}) + // The value. + Value() *float64 + // Adds a number to the current value. + Add(value *float64) + // Multiplies the current value by a number. + Mul(value *float64) + // Negates the current value. + Neg() + // Raises the current value by a power. + Pow(value *float64) + // Returns teh value of the union property (if defined). + ReadUnionValue() *float64 + // String representation of the value. + ToString() *string + // Returns: the name of the class (to verify native type names are created for derived classes). + TypeName() interface{} } -// The jsii proxy struct for Base -type jsiiProxy_Base struct { - _ byte // padding +// The jsii proxy struct for Calculator +type jsiiProxy_Calculator struct { + internal.Type__compositionCompositeOperation } -func (j *jsiiProxy_Base) Prop() *string { - var returns *string +func (j *jsiiProxy_Calculator) Curr() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue _jsii_.Get( j, - "prop", + "curr", &returns, ) return returns } - -func NewBase() Base { - _init_.Initialize() - - j := jsiiProxy_Base{} - - _jsii_.Create( - "jsii-calc.DerivedClassHasNoProperties.Base", - nil, // no parameters - &j, +func (j *jsiiProxy_Calculator) DecorationPostfixes() *[]*string { + var returns *[]*string + _jsii_.Get( + j, + "decorationPostfixes", + &returns, ) - - return &j + return returns } -func NewBase_Override(b Base) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.DerivedClassHasNoProperties.Base", - nil, // no parameters - b, +func (j *jsiiProxy_Calculator) DecorationPrefixes() *[]*string { + var returns *[]*string + _jsii_.Get( + j, + "decorationPrefixes", + &returns, ) + return returns } -func (j *jsiiProxy_Base)SetProp(val *string) { - _jsii_.Set( +func (j *jsiiProxy_Calculator) Expression() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue + _jsii_.Get( j, - "prop", - val, + "expression", + &returns, ) + return returns } +func (j *jsiiProxy_Calculator) MaxValue() *float64 { + var returns *float64 + _jsii_.Get( + j, + "maxValue", + &returns, + ) + return returns +} -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Derived.go 1`] = ` -package derivedclasshasnoproperties +func (j *jsiiProxy_Calculator) OperationsLog() *[]scopejsiicalclib.NumericValue { + var returns *[]scopejsiicalclib.NumericValue + _jsii_.Get( + j, + "operationsLog", + &returns, + ) + return returns +} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) +func (j *jsiiProxy_Calculator) OperationsMap() *map[string]*[]scopejsiicalclib.NumericValue { + var returns *map[string]*[]scopejsiicalclib.NumericValue + _jsii_.Get( + j, + "operationsMap", + &returns, + ) + return returns +} -type Derived interface { - Base - Prop() *string - SetProp(val *string) +func (j *jsiiProxy_Calculator) StringStyle() composition.CompositeOperation_CompositionStringStyle { + var returns composition.CompositeOperation_CompositionStringStyle + _jsii_.Get( + j, + "stringStyle", + &returns, + ) + return returns } -// The jsii proxy struct for Derived -type jsiiProxy_Derived struct { - jsiiProxy_Base +func (j *jsiiProxy_Calculator) UnionProperty() interface{} { + var returns interface{} + _jsii_.Get( + j, + "unionProperty", + &returns, + ) + return returns } -func (j *jsiiProxy_Derived) Prop() *string { - var returns *string +func (j *jsiiProxy_Calculator) Value() *float64 { + var returns *float64 _jsii_.Get( j, - "prop", + "value", &returns, ) return returns } -func NewDerived() Derived { +// Creates a Calculator object. +func NewCalculator(props *CalculatorProps) Calculator { _init_.Initialize() - j := jsiiProxy_Derived{} + j := jsiiProxy_Calculator{} _jsii_.Create( - "jsii-calc.DerivedClassHasNoProperties.Derived", - nil, // no parameters + "jsii-calc.Calculator", + []interface{}{props}, &j, ) return &j } -func NewDerived_Override(d Derived) { +// Creates a Calculator object. +func NewCalculator_Override(c Calculator, props *CalculatorProps) { _init_.Initialize() _jsii_.Create( - "jsii-calc.DerivedClassHasNoProperties.Derived", - nil, // no parameters - d, + "jsii-calc.Calculator", + []interface{}{props}, + c, ) } -func (j *jsiiProxy_Derived)SetProp(val *string) { +func (j *jsiiProxy_Calculator)SetCurr(val scopejsiicalclib.NumericValue) { _jsii_.Set( j, - "prop", + "curr", val, ) } +func (j *jsiiProxy_Calculator)SetDecorationPostfixes(val *[]*string) { + _jsii_.Set( + j, + "decorationPostfixes", + val, + ) +} -`; +func (j *jsiiProxy_Calculator)SetDecorationPrefixes(val *[]*string) { + _jsii_.Set( + j, + "decorationPrefixes", + val, + ) +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/go.mod 1`] = ` -module github.com/aws/jsii/jsii-calc/go/jsiicalc/v3 +func (j *jsiiProxy_Calculator)SetMaxValue(val *float64) { + _jsii_.Set( + j, + "maxValue", + val, + ) +} -go 1.18 +func (j *jsiiProxy_Calculator)SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) { + _jsii_.Set( + j, + "stringStyle", + val, + ) +} -require ( - github.com/aws/jsii-runtime-go v0.0.0 - github.com/aws/jsii/jsii-calc/go/jcb v0.0.0 - github.com/aws/jsii/jsii-calc/go/scopejsiicalclib v0.0.0-devpreview - github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 v2.1.1 // indirect -) +func (j *jsiiProxy_Calculator)SetUnionProperty(val interface{}) { + _jsii_.Set( + j, + "unionProperty", + val, + ) +} -`; +func (c *jsiiProxy_Calculator) Add(value *float64) { + _jsii_.InvokeVoid( + c, + "add", + []interface{}{value}, + ) +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/README.md 1`] = ` -Verifies homonymous forward references don't trip the Python type checker - -This has been an issue when stub functions were introduced to create a reliable source for type checking -information, which was reported in https://github.com/aws/jsii/issues/3818. - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/bar.go 1`] = ` -package bar - -import ( - "reflect" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -func init() { - _jsii_.RegisterClass( - "jsii-calc.homonymousForwardReferences.bar.Consumer", - reflect.TypeOf((*Consumer)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_Consumer{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.homonymousForwardReferences.bar.ConsumerProps", - reflect.TypeOf((*ConsumerProps)(nil)).Elem(), - ) - _jsii_.RegisterStruct( - "jsii-calc.homonymousForwardReferences.bar.Homonymous", - reflect.TypeOf((*Homonymous)(nil)).Elem(), +func (c *jsiiProxy_Calculator) Mul(value *float64) { + _jsii_.InvokeVoid( + c, + "mul", + []interface{}{value}, ) } -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/bar_Consumer.go 1`] = ` -package bar - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type Consumer interface { +func (c *jsiiProxy_Calculator) Neg() { + _jsii_.InvokeVoid( + c, + "neg", + nil, // no parameters + ) } -// The jsii proxy struct for Consumer -type jsiiProxy_Consumer struct { - _ byte // padding +func (c *jsiiProxy_Calculator) Pow(value *float64) { + _jsii_.InvokeVoid( + c, + "pow", + []interface{}{value}, + ) } -func Consumer_Consume(props *ConsumerProps) *Homonymous { - _init_.Initialize() - - var returns *Homonymous +func (c *jsiiProxy_Calculator) ReadUnionValue() *float64 { + var returns *float64 - _jsii_.StaticInvoke( - "jsii-calc.homonymousForwardReferences.bar.Consumer", - "consume", - []interface{}{props}, + _jsii_.Invoke( + c, + "readUnionValue", + nil, // no parameters &returns, ) return returns } +func (c *jsiiProxy_Calculator) ToString() *string { + var returns *string -`; + _jsii_.Invoke( + c, + "toString", + nil, // no parameters + &returns, + ) -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/bar_ConsumerProps.go 1`] = ` -package bar + return returns +} +func (c *jsiiProxy_Calculator) TypeName() interface{} { + var returns interface{} -type ConsumerProps struct { - Homonymous *Homonymous \`field:"required" json:"homonymous" yaml:"homonymous"\` + _jsii_.Invoke( + c, + "typeName", + nil, // no parameters + &returns, + ) + + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/bar_Homonymous.go 1`] = ` -package bar +exports[`Generated code for "jsii-calc": /go/jsiicalc/CalculatorProps.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -type Homonymous struct { - NumericProperty *float64 \`field:"required" json:"numericProperty" yaml:"numericProperty"\` +// Properties for Calculator. +type CalculatorProps struct { + // The initial value of the calculator. + // + // NOTE: Any number works here, it's fine. + InitialValue *float64 \`field:"optional" json:"initialValue" yaml:"initialValue"\` + // The maximum value the calculator can store. + MaximumValue *float64 \`field:"optional" json:"maximumValue" yaml:"maximumValue"\` } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo.go 1`] = ` -package foo - -import ( - "reflect" +exports[`Generated code for "jsii-calc": /go/jsiicalc/ChildStruct982.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) -func init() { - _jsii_.RegisterClass( - "jsii-calc.homonymousForwardReferences.foo.Consumer", - reflect.TypeOf((*Consumer)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_Consumer{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.homonymousForwardReferences.foo.ConsumerProps", - reflect.TypeOf((*ConsumerProps)(nil)).Elem(), - ) - _jsii_.RegisterStruct( - "jsii-calc.homonymousForwardReferences.foo.Homonymous", - reflect.TypeOf((*Homonymous)(nil)).Elem(), - ) +type ChildStruct982 struct { + Foo *string \`field:"required" json:"foo" yaml:"foo"\` + Bar *float64 \`field:"required" json:"bar" yaml:"bar"\` } + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo_Consumer.go 1`] = ` -package foo +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassThatImplementsTheInternalInterface.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type Consumer interface { +type ClassThatImplementsTheInternalInterface interface { + INonInternalInterface + A() *string + SetA(val *string) + B() *string + SetB(val *string) + C() *string + SetC(val *string) + D() *string + SetD(val *string) } -// The jsii proxy struct for Consumer -type jsiiProxy_Consumer struct { - _ byte // padding +// The jsii proxy struct for ClassThatImplementsTheInternalInterface +type jsiiProxy_ClassThatImplementsTheInternalInterface struct { + jsiiProxy_INonInternalInterface } -func Consumer_Consume(props *ConsumerProps) *Homonymous { - _init_.Initialize() +func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) A() *string { + var returns *string + _jsii_.Get( + j, + "a", + &returns, + ) + return returns +} - var returns *Homonymous +func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) B() *string { + var returns *string + _jsii_.Get( + j, + "b", + &returns, + ) + return returns +} - _jsii_.StaticInvoke( - "jsii-calc.homonymousForwardReferences.foo.Consumer", - "consume", - []interface{}{props}, +func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) C() *string { + var returns *string + _jsii_.Get( + j, + "c", &returns, ) + return returns +} +func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) D() *string { + var returns *string + _jsii_.Get( + j, + "d", + &returns, + ) return returns } -`; +func NewClassThatImplementsTheInternalInterface() ClassThatImplementsTheInternalInterface { + _init_.Initialize() -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo_ConsumerProps.go 1`] = ` -package foo + j := jsiiProxy_ClassThatImplementsTheInternalInterface{} + _jsii_.Create( + "jsii-calc.ClassThatImplementsTheInternalInterface", + nil, // no parameters + &j, + ) -type ConsumerProps struct { - Homonymous *Homonymous \`field:"required" json:"homonymous" yaml:"homonymous"\` + return &j } +func NewClassThatImplementsTheInternalInterface_Override(c ClassThatImplementsTheInternalInterface) { + _init_.Initialize() -`; + _jsii_.Create( + "jsii-calc.ClassThatImplementsTheInternalInterface", + nil, // no parameters + c, + ) +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo_Homonymous.go 1`] = ` -package foo +func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetA(val *string) { + _jsii_.Set( + j, + "a", + val, + ) +} +func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetB(val *string) { + _jsii_.Set( + j, + "b", + val, + ) +} -type Homonymous struct { - StringProperty *string \`field:"required" json:"stringProperty" yaml:"stringProperty"\` +func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetC(val *string) { + _jsii_.Set( + j, + "c", + val, + ) +} + +func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetD(val *string) { + _jsii_.Set( + j, + "d", + val, + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceincludesclasses/interfaceinnamespaceincludesclasses.go 1`] = ` -package interfaceinnamespaceincludesclasses +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassThatImplementsThePrivateInterface.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( - "reflect" - _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -func init() { - _jsii_.RegisterClass( - "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo", - reflect.TypeOf((*Foo)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "bar", GoGetter: "Bar"}, - }, - func() interface{} { - return &jsiiProxy_Foo{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.InterfaceInNamespaceIncludesClasses.Hello", - reflect.TypeOf((*Hello)(nil)).Elem(), - ) +type ClassThatImplementsThePrivateInterface interface { + INonInternalInterface + A() *string + SetA(val *string) + B() *string + SetB(val *string) + C() *string + SetC(val *string) + E() *string + SetE(val *string) } -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceincludesclasses/interfaceinnamespaceincludesclasses_Foo.go 1`] = ` -package interfaceinnamespaceincludesclasses +// The jsii proxy struct for ClassThatImplementsThePrivateInterface +type jsiiProxy_ClassThatImplementsThePrivateInterface struct { + jsiiProxy_INonInternalInterface +} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) A() *string { + var returns *string + _jsii_.Get( + j, + "a", + &returns, + ) + return returns +} -type Foo interface { - Bar() *string - SetBar(val *string) +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) B() *string { + var returns *string + _jsii_.Get( + j, + "b", + &returns, + ) + return returns } -// The jsii proxy struct for Foo -type jsiiProxy_Foo struct { - _ byte // padding +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) C() *string { + var returns *string + _jsii_.Get( + j, + "c", + &returns, + ) + return returns } -func (j *jsiiProxy_Foo) Bar() *string { +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) E() *string { var returns *string _jsii_.Get( j, - "bar", + "e", &returns, ) return returns } -func NewFoo() Foo { +func NewClassThatImplementsThePrivateInterface() ClassThatImplementsThePrivateInterface { _init_.Initialize() - j := jsiiProxy_Foo{} + j := jsiiProxy_ClassThatImplementsThePrivateInterface{} _jsii_.Create( - "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo", + "jsii-calc.ClassThatImplementsThePrivateInterface", nil, // no parameters &j, ) @@ -4258,2585 +5181,2162 @@ func NewFoo() Foo { return &j } -func NewFoo_Override(f Foo) { +func NewClassThatImplementsThePrivateInterface_Override(c ClassThatImplementsThePrivateInterface) { _init_.Initialize() _jsii_.Create( - "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo", + "jsii-calc.ClassThatImplementsThePrivateInterface", nil, // no parameters - f, + c, ) } -func (j *jsiiProxy_Foo)SetBar(val *string) { +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetA(val *string) { _jsii_.Set( j, - "bar", + "a", val, ) } +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetB(val *string) { + _jsii_.Set( + j, + "b", + val, + ) +} -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceincludesclasses/interfaceinnamespaceincludesclasses_Hello.go 1`] = ` -package interfaceinnamespaceincludesclasses - +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetC(val *string) { + _jsii_.Set( + j, + "c", + val, + ) +} -type Hello struct { - Foo *float64 \`field:"required" json:"foo" yaml:"foo"\` +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetE(val *string) { + _jsii_.Set( + j, + "e", + val, + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceonlyinterface/interfaceinnamespaceonlyinterface.go 1`] = ` -package interfaceinnamespaceonlyinterface +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithCollectionOfUnions.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( - "reflect" - _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -func init() { - _jsii_.RegisterStruct( - "jsii-calc.InterfaceInNamespaceOnlyInterface.Hello", - reflect.TypeOf((*Hello)(nil)).Elem(), - ) +type ClassWithCollectionOfUnions interface { + UnionProperty() *[]*map[string]interface{} + SetUnionProperty(val *[]*map[string]interface{}) } -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceonlyinterface/interfaceinnamespaceonlyinterface_Hello.go 1`] = ` -package interfaceinnamespaceonlyinterface - - -type Hello struct { - Foo *float64 \`field:"required" json:"foo" yaml:"foo"\` +// The jsii proxy struct for ClassWithCollectionOfUnions +type jsiiProxy_ClassWithCollectionOfUnions struct { + _ byte // padding } +func (j *jsiiProxy_ClassWithCollectionOfUnions) UnionProperty() *[]*map[string]interface{} { + var returns *[]*map[string]interface{} + _jsii_.Get( + j, + "unionProperty", + &returns, + ) + return returns +} -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/internal/types.go 1`] = ` -package internal -import ( - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition" - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/customsubmodulename" -) -type Type__scopejsiicalclibOperation = scopejsiicalclib.Operation -type Type__scopejsiicalclibIFriendly = scopejsiicalclib.IFriendly -type Type__compositionCompositeOperation = composition.CompositeOperation -type Type__customsubmodulenameIReflectable = customsubmodulename.IReflectable - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii/jsii.go 1`] = ` -// 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" - jcb "github.com/aws/jsii/jsii-calc/go/jcb/jsii" - scopejsiicalclib "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" -) +func NewClassWithCollectionOfUnions(unionProperty *[]*map[string]interface{}) ClassWithCollectionOfUnions { + _init_.Initialize() -//go:embed jsii-calc-3.20.120.tgz -var tarball []byte + j := jsiiProxy_ClassWithCollectionOfUnions{} -// 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() { - // Ensure all dependencies are initialized - jcb.Initialize() - scopejsiicalclib.Initialize() + _jsii_.Create( + "jsii-calc.ClassWithCollectionOfUnions", + []interface{}{unionProperty}, + &j, + ) - // Load this library into the kernel - _jsii_.Load("jsii-calc", "3.20.120", tarball) + return &j } -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii/jsii-calc-3.20.120.tgz 1`] = `go/jsiicalc/jsii/jsii-calc-3.20.120.tgz is a tarball`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/jsii3656.go 1`] = ` -package jsii3656 - -import ( - "reflect" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) +func NewClassWithCollectionOfUnions_Override(c ClassWithCollectionOfUnions, unionProperty *[]*map[string]interface{}) { + _init_.Initialize() -func init() { - _jsii_.RegisterStruct( - "jsii-calc.jsii3656.ImplementMeOpts", - reflect.TypeOf((*ImplementMeOpts)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.jsii3656.OverrideMe", - reflect.TypeOf((*OverrideMe)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "implementMe", GoMethod: "ImplementMe"}, - }, - func() interface{} { - return &jsiiProxy_OverrideMe{} - }, + _jsii_.Create( + "jsii-calc.ClassWithCollectionOfUnions", + []interface{}{unionProperty}, + c, ) } -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/jsii3656_ImplementMeOpts.go 1`] = ` -package jsii3656 - - -type ImplementMeOpts struct { - Name *string \`field:"required" json:"name" yaml:"name"\` - Count *float64 \`field:"optional" json:"count" yaml:"count"\` +func (j *jsiiProxy_ClassWithCollectionOfUnions)SetUnionProperty(val *[]*map[string]interface{}) { + _jsii_.Set( + j, + "unionProperty", + val, + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/jsii3656_OverrideMe.go 1`] = ` -package jsii3656 +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithCollections.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type OverrideMe interface { - ImplementMe(opts *ImplementMeOpts) *bool +type ClassWithCollections interface { + Array() *[]*string + SetArray(val *[]*string) + Map() *map[string]*string + SetMap(val *map[string]*string) } -// The jsii proxy struct for OverrideMe -type jsiiProxy_OverrideMe struct { +// The jsii proxy struct for ClassWithCollections +type jsiiProxy_ClassWithCollections struct { _ byte // padding } -func NewOverrideMe_Override(o OverrideMe) { +func (j *jsiiProxy_ClassWithCollections) Array() *[]*string { + var returns *[]*string + _jsii_.Get( + j, + "array", + &returns, + ) + return returns +} + +func (j *jsiiProxy_ClassWithCollections) Map() *map[string]*string { + var returns *map[string]*string + _jsii_.Get( + j, + "map", + &returns, + ) + return returns +} + + +func NewClassWithCollections(map_ *map[string]*string, array *[]*string) ClassWithCollections { _init_.Initialize() + j := jsiiProxy_ClassWithCollections{} + _jsii_.Create( - "jsii-calc.jsii3656.OverrideMe", - nil, // no parameters - o, + "jsii-calc.ClassWithCollections", + []interface{}{map_, array}, + &j, ) + + return &j } -func OverrideMe_CallAbstract(receiver OverrideMe) *bool { +func NewClassWithCollections_Override(c ClassWithCollections, map_ *map[string]*string, array *[]*string) { _init_.Initialize() - var returns *bool + _jsii_.Create( + "jsii-calc.ClassWithCollections", + []interface{}{map_, array}, + c, + ) +} + +func (j *jsiiProxy_ClassWithCollections)SetArray(val *[]*string) { + _jsii_.Set( + j, + "array", + val, + ) +} + +func (j *jsiiProxy_ClassWithCollections)SetMap(val *map[string]*string) { + _jsii_.Set( + j, + "map", + val, + ) +} + +func ClassWithCollections_CreateAList() *[]*string { + _init_.Initialize() + + var returns *[]*string _jsii_.StaticInvoke( - "jsii-calc.jsii3656.OverrideMe", - "callAbstract", - []interface{}{receiver}, + "jsii-calc.ClassWithCollections", + "createAList", + nil, // no parameters &returns, ) return returns } -func (o *jsiiProxy_OverrideMe) ImplementMe(opts *ImplementMeOpts) *bool { - var returns *bool +func ClassWithCollections_CreateAMap() *map[string]*string { + _init_.Initialize() - _jsii_.Invoke( - o, - "implementMe", - []interface{}{opts}, + var returns *map[string]*string + + _jsii_.StaticInvoke( + "jsii-calc.ClassWithCollections", + "createAMap", + nil, // no parameters + &returns, + ) + + return returns +} + +func ClassWithCollections_StaticArray() *[]*string { + _init_.Initialize() + var returns *[]*string + _jsii_.StaticGet( + "jsii-calc.ClassWithCollections", + "staticArray", &returns, ) + return returns +} + +func ClassWithCollections_SetStaticArray(val *[]*string) { + _init_.Initialize() + _jsii_.StaticSet( + "jsii-calc.ClassWithCollections", + "staticArray", + val, + ) +} +func ClassWithCollections_StaticMap() *map[string]*string { + _init_.Initialize() + var returns *map[string]*string + _jsii_.StaticGet( + "jsii-calc.ClassWithCollections", + "staticMap", + &returns, + ) return returns } +func ClassWithCollections_SetStaticMap(val *map[string]*string) { + _init_.Initialize() + _jsii_.StaticSet( + "jsii-calc.ClassWithCollections", + "staticMap", + val, + ) +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithContainerTypes.go 1`] = ` +// A simple calcuator built on JSII. package jsiicalc import ( - "reflect" - _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -func init() { - _jsii_.RegisterClass( - "jsii-calc.AbstractClass", - reflect.TypeOf((*AbstractClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "abstractMethod", GoMethod: "AbstractMethod"}, - _jsii_.MemberProperty{JsiiProperty: "abstractProperty", GoGetter: "AbstractProperty"}, - _jsii_.MemberMethod{JsiiMethod: "nonAbstractMethod", GoMethod: "NonAbstractMethod"}, - _jsii_.MemberProperty{JsiiProperty: "propFromInterface", GoGetter: "PropFromInterface"}, - }, - func() interface{} { - j := jsiiProxy_AbstractClass{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_AbstractClassBase) - _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceImplementedByAbstractClass) - return &j - }, +type ClassWithContainerTypes interface { + Array() *[]*DummyObj + Obj() *map[string]*DummyObj + Props() *ContainerProps + Record() *map[string]*DummyObj +} + +// The jsii proxy struct for ClassWithContainerTypes +type jsiiProxy_ClassWithContainerTypes struct { + _ byte // padding +} + +func (j *jsiiProxy_ClassWithContainerTypes) Array() *[]*DummyObj { + var returns *[]*DummyObj + _jsii_.Get( + j, + "array", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.AbstractClassBase", - reflect.TypeOf((*AbstractClassBase)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "abstractProperty", GoGetter: "AbstractProperty"}, - }, - func() interface{} { - return &jsiiProxy_AbstractClassBase{} - }, + return returns +} + +func (j *jsiiProxy_ClassWithContainerTypes) Obj() *map[string]*DummyObj { + var returns *map[string]*DummyObj + _jsii_.Get( + j, + "obj", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.AbstractClassReturner", - reflect.TypeOf((*AbstractClassReturner)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "giveMeAbstract", GoMethod: "GiveMeAbstract"}, - _jsii_.MemberMethod{JsiiMethod: "giveMeInterface", GoMethod: "GiveMeInterface"}, - _jsii_.MemberProperty{JsiiProperty: "returnAbstractFromProperty", GoGetter: "ReturnAbstractFromProperty"}, - }, - func() interface{} { - return &jsiiProxy_AbstractClassReturner{} - }, + return returns +} + +func (j *jsiiProxy_ClassWithContainerTypes) Props() *ContainerProps { + var returns *ContainerProps + _jsii_.Get( + j, + "props", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.AbstractSuite", - reflect.TypeOf((*AbstractSuite)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, - _jsii_.MemberMethod{JsiiMethod: "someMethod", GoMethod: "SomeMethod"}, - _jsii_.MemberMethod{JsiiMethod: "workItAll", GoMethod: "WorkItAll"}, - }, - func() interface{} { - return &jsiiProxy_AbstractSuite{} - }, + return returns +} + +func (j *jsiiProxy_ClassWithContainerTypes) Record() *map[string]*DummyObj { + var returns *map[string]*DummyObj + _jsii_.Get( + j, + "record", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.Add", - reflect.TypeOf((*Add)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, - _jsii_.MemberProperty{JsiiProperty: "lhs", GoGetter: "Lhs"}, - _jsii_.MemberProperty{JsiiProperty: "rhs", GoGetter: "Rhs"}, - _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, - _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - }, - func() interface{} { - j := jsiiProxy_Add{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_BinaryOperation) - return &j - }, + return returns +} + + +func NewClassWithContainerTypes(array *[]*DummyObj, record *map[string]*DummyObj, obj *map[string]*DummyObj, props *ContainerProps) ClassWithContainerTypes { + _init_.Initialize() + + j := jsiiProxy_ClassWithContainerTypes{} + + _jsii_.Create( + "jsii-calc.ClassWithContainerTypes", + []interface{}{array, record, obj, props}, + &j, ) - _jsii_.RegisterClass( - "jsii-calc.AllTypes", - reflect.TypeOf((*AllTypes)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "anyArrayProperty", GoGetter: "AnyArrayProperty"}, - _jsii_.MemberMethod{JsiiMethod: "anyIn", GoMethod: "AnyIn"}, - _jsii_.MemberProperty{JsiiProperty: "anyMapProperty", GoGetter: "AnyMapProperty"}, - _jsii_.MemberMethod{JsiiMethod: "anyOut", GoMethod: "AnyOut"}, - _jsii_.MemberProperty{JsiiProperty: "anyProperty", GoGetter: "AnyProperty"}, - _jsii_.MemberProperty{JsiiProperty: "arrayProperty", GoGetter: "ArrayProperty"}, - _jsii_.MemberProperty{JsiiProperty: "booleanProperty", GoGetter: "BooleanProperty"}, - _jsii_.MemberProperty{JsiiProperty: "dateProperty", GoGetter: "DateProperty"}, - _jsii_.MemberMethod{JsiiMethod: "enumMethod", GoMethod: "EnumMethod"}, - _jsii_.MemberProperty{JsiiProperty: "enumProperty", GoGetter: "EnumProperty"}, - _jsii_.MemberProperty{JsiiProperty: "enumPropertyValue", GoGetter: "EnumPropertyValue"}, - _jsii_.MemberProperty{JsiiProperty: "jsonProperty", GoGetter: "JsonProperty"}, - _jsii_.MemberProperty{JsiiProperty: "mapProperty", GoGetter: "MapProperty"}, - _jsii_.MemberProperty{JsiiProperty: "numberProperty", GoGetter: "NumberProperty"}, - _jsii_.MemberProperty{JsiiProperty: "optionalEnumValue", GoGetter: "OptionalEnumValue"}, - _jsii_.MemberProperty{JsiiProperty: "stringProperty", GoGetter: "StringProperty"}, - _jsii_.MemberProperty{JsiiProperty: "unionArrayProperty", GoGetter: "UnionArrayProperty"}, - _jsii_.MemberProperty{JsiiProperty: "unionMapProperty", GoGetter: "UnionMapProperty"}, - _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"}, - _jsii_.MemberProperty{JsiiProperty: "unknownArrayProperty", GoGetter: "UnknownArrayProperty"}, - _jsii_.MemberProperty{JsiiProperty: "unknownMapProperty", GoGetter: "UnknownMapProperty"}, - _jsii_.MemberProperty{JsiiProperty: "unknownProperty", GoGetter: "UnknownProperty"}, - }, - func() interface{} { - return &jsiiProxy_AllTypes{} - }, + + return &j +} + +func NewClassWithContainerTypes_Override(c ClassWithContainerTypes, array *[]*DummyObj, record *map[string]*DummyObj, obj *map[string]*DummyObj, props *ContainerProps) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ClassWithContainerTypes", + []interface{}{array, record, obj, props}, + c, ) - _jsii_.RegisterEnum( - "jsii-calc.AllTypesEnum", - reflect.TypeOf((*AllTypesEnum)(nil)).Elem(), - map[string]interface{}{ - "MY_ENUM_VALUE": AllTypesEnum_MY_ENUM_VALUE, - "YOUR_ENUM_VALUE": AllTypesEnum_YOUR_ENUM_VALUE, - "THIS_IS_GREAT": AllTypesEnum_THIS_IS_GREAT, - }, +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithDocs.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +// This class has docs. +// +// The docs are great. They're a bunch of tags. +// +// Example: +// func anExample() { +// } +// +// See: https://aws.amazon.com/ +// +type ClassWithDocs interface { +} + +// The jsii proxy struct for ClassWithDocs +type jsiiProxy_ClassWithDocs struct { + _ byte // padding +} + +func NewClassWithDocs() ClassWithDocs { + _init_.Initialize() + + j := jsiiProxy_ClassWithDocs{} + + _jsii_.Create( + "jsii-calc.ClassWithDocs", + nil, // no parameters + &j, ) - _jsii_.RegisterClass( - "jsii-calc.AllowedMethodNames", - reflect.TypeOf((*AllowedMethodNames)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "getBar", GoMethod: "GetBar"}, - _jsii_.MemberMethod{JsiiMethod: "getFoo", GoMethod: "GetFoo"}, - _jsii_.MemberMethod{JsiiMethod: "setBar", GoMethod: "SetBar"}, - _jsii_.MemberMethod{JsiiMethod: "setFoo", GoMethod: "SetFoo"}, - }, - func() interface{} { - return &jsiiProxy_AllowedMethodNames{} - }, + + return &j +} + +func NewClassWithDocs_Override(c ClassWithDocs) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ClassWithDocs", + nil, // no parameters + c, ) - _jsii_.RegisterClass( - "jsii-calc.AmbiguousParameters", - reflect.TypeOf((*AmbiguousParameters)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "props", GoGetter: "Props"}, - _jsii_.MemberProperty{JsiiProperty: "scope", GoGetter: "Scope"}, - }, - func() interface{} { - return &jsiiProxy_AmbiguousParameters{} - }, +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithJavaReservedWords.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type ClassWithJavaReservedWords interface { + Int() *string + Import(assert *string) *string +} + +// The jsii proxy struct for ClassWithJavaReservedWords +type jsiiProxy_ClassWithJavaReservedWords struct { + _ byte // padding +} + +func (j *jsiiProxy_ClassWithJavaReservedWords) Int() *string { + var returns *string + _jsii_.Get( + j, + "int", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.AnonymousImplementationProvider", - reflect.TypeOf((*AnonymousImplementationProvider)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "provideAsClass", GoMethod: "ProvideAsClass"}, - _jsii_.MemberMethod{JsiiMethod: "provideAsInterface", GoMethod: "ProvideAsInterface"}, - }, - func() interface{} { - j := jsiiProxy_AnonymousImplementationProvider{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IAnonymousImplementationProvider) - return &j - }, + return returns +} + + +func NewClassWithJavaReservedWords(int *string) ClassWithJavaReservedWords { + _init_.Initialize() + + j := jsiiProxy_ClassWithJavaReservedWords{} + + _jsii_.Create( + "jsii-calc.ClassWithJavaReservedWords", + []interface{}{int}, + &j, ) - _jsii_.RegisterClass( - "jsii-calc.AsyncVirtualMethods", - reflect.TypeOf((*AsyncVirtualMethods)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "callMe", GoMethod: "CallMe"}, - _jsii_.MemberMethod{JsiiMethod: "callMe2", GoMethod: "CallMe2"}, - _jsii_.MemberMethod{JsiiMethod: "callMeDoublePromise", GoMethod: "CallMeDoublePromise"}, - _jsii_.MemberMethod{JsiiMethod: "dontOverrideMe", GoMethod: "DontOverrideMe"}, - _jsii_.MemberMethod{JsiiMethod: "overrideMe", GoMethod: "OverrideMe"}, - _jsii_.MemberMethod{JsiiMethod: "overrideMeToo", GoMethod: "OverrideMeToo"}, - }, - func() interface{} { - return &jsiiProxy_AsyncVirtualMethods{} - }, + + return &j +} + +func NewClassWithJavaReservedWords_Override(c ClassWithJavaReservedWords, int *string) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ClassWithJavaReservedWords", + []interface{}{int}, + c, ) - _jsii_.RegisterClass( - "jsii-calc.AugmentableClass", - reflect.TypeOf((*AugmentableClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "methodOne", GoMethod: "MethodOne"}, - _jsii_.MemberMethod{JsiiMethod: "methodTwo", GoMethod: "MethodTwo"}, - }, - func() interface{} { - return &jsiiProxy_AugmentableClass{} - }, +} + +func (c *jsiiProxy_ClassWithJavaReservedWords) Import(assert *string) *string { + var returns *string + + _jsii_.Invoke( + c, + "import", + []interface{}{assert}, + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.BaseClass", - reflect.TypeOf((*BaseClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, - }, - func() interface{} { - return &jsiiProxy_BaseClass{} - }, + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithMutableObjectLiteralProperty.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type ClassWithMutableObjectLiteralProperty interface { + MutableObject() IMutableObjectLiteral + SetMutableObject(val IMutableObjectLiteral) +} + +// The jsii proxy struct for ClassWithMutableObjectLiteralProperty +type jsiiProxy_ClassWithMutableObjectLiteralProperty struct { + _ byte // padding +} + +func (j *jsiiProxy_ClassWithMutableObjectLiteralProperty) MutableObject() IMutableObjectLiteral { + var returns IMutableObjectLiteral + _jsii_.Get( + j, + "mutableObject", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.BaseJsii976", - reflect.TypeOf((*BaseJsii976)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_BaseJsii976{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.Bell", - reflect.TypeOf((*Bell)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "ring", GoMethod: "Ring"}, - _jsii_.MemberProperty{JsiiProperty: "rung", GoGetter: "Rung"}, - }, - func() interface{} { - j := jsiiProxy_Bell{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IBell) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.BinaryOperation", - reflect.TypeOf((*BinaryOperation)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, - _jsii_.MemberProperty{JsiiProperty: "lhs", GoGetter: "Lhs"}, - _jsii_.MemberProperty{JsiiProperty: "rhs", GoGetter: "Rhs"}, - _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, - _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - }, - func() interface{} { - j := jsiiProxy_BinaryOperation{} - _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibOperation) - _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibIFriendly) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.BurriedAnonymousObject", - reflect.TypeOf((*BurriedAnonymousObject)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "check", GoMethod: "Check"}, - _jsii_.MemberMethod{JsiiMethod: "giveItBack", GoMethod: "GiveItBack"}, - }, - func() interface{} { - return &jsiiProxy_BurriedAnonymousObject{} - }, + return returns +} + + +func NewClassWithMutableObjectLiteralProperty() ClassWithMutableObjectLiteralProperty { + _init_.Initialize() + + j := jsiiProxy_ClassWithMutableObjectLiteralProperty{} + + _jsii_.Create( + "jsii-calc.ClassWithMutableObjectLiteralProperty", + nil, // no parameters + &j, ) - _jsii_.RegisterClass( - "jsii-calc.Calculator", - reflect.TypeOf((*Calculator)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "add", GoMethod: "Add"}, - _jsii_.MemberProperty{JsiiProperty: "curr", GoGetter: "Curr"}, - _jsii_.MemberProperty{JsiiProperty: "decorationPostfixes", GoGetter: "DecorationPostfixes"}, - _jsii_.MemberProperty{JsiiProperty: "decorationPrefixes", GoGetter: "DecorationPrefixes"}, - _jsii_.MemberProperty{JsiiProperty: "expression", GoGetter: "Expression"}, - _jsii_.MemberProperty{JsiiProperty: "maxValue", GoGetter: "MaxValue"}, - _jsii_.MemberMethod{JsiiMethod: "mul", GoMethod: "Mul"}, - _jsii_.MemberMethod{JsiiMethod: "neg", GoMethod: "Neg"}, - _jsii_.MemberProperty{JsiiProperty: "operationsLog", GoGetter: "OperationsLog"}, - _jsii_.MemberProperty{JsiiProperty: "operationsMap", GoGetter: "OperationsMap"}, - _jsii_.MemberMethod{JsiiMethod: "pow", GoMethod: "Pow"}, - _jsii_.MemberMethod{JsiiMethod: "readUnionValue", GoMethod: "ReadUnionValue"}, - _jsii_.MemberProperty{JsiiProperty: "stringStyle", GoGetter: "StringStyle"}, - _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, - _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, - _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"}, - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - }, - func() interface{} { - j := jsiiProxy_Calculator{} - _jsii_.InitJsiiProxy(&j.Type__compositionCompositeOperation) - return &j - }, + + return &j +} + +func NewClassWithMutableObjectLiteralProperty_Override(c ClassWithMutableObjectLiteralProperty) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ClassWithMutableObjectLiteralProperty", + nil, // no parameters + c, ) - _jsii_.RegisterStruct( - "jsii-calc.CalculatorProps", - reflect.TypeOf((*CalculatorProps)(nil)).Elem(), +} + +func (j *jsiiProxy_ClassWithMutableObjectLiteralProperty)SetMutableObject(val IMutableObjectLiteral) { + _jsii_.Set( + j, + "mutableObject", + val, ) - _jsii_.RegisterStruct( - "jsii-calc.ChildStruct982", - reflect.TypeOf((*ChildStruct982)(nil)).Elem(), +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithNestedUnion.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type ClassWithNestedUnion interface { + UnionProperty() *[]interface{} + SetUnionProperty(val *[]interface{}) +} + +// The jsii proxy struct for ClassWithNestedUnion +type jsiiProxy_ClassWithNestedUnion struct { + _ byte // padding +} + +func (j *jsiiProxy_ClassWithNestedUnion) UnionProperty() *[]interface{} { + var returns *[]interface{} + _jsii_.Get( + j, + "unionProperty", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.ClassThatImplementsTheInternalInterface", - reflect.TypeOf((*ClassThatImplementsTheInternalInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"}, - _jsii_.MemberProperty{JsiiProperty: "b", GoGetter: "B"}, - _jsii_.MemberProperty{JsiiProperty: "c", GoGetter: "C"}, - _jsii_.MemberProperty{JsiiProperty: "d", GoGetter: "D"}, - }, - func() interface{} { - j := jsiiProxy_ClassThatImplementsTheInternalInterface{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_INonInternalInterface) - return &j - }, + return returns +} + + +func NewClassWithNestedUnion(unionProperty *[]interface{}) ClassWithNestedUnion { + _init_.Initialize() + + j := jsiiProxy_ClassWithNestedUnion{} + + _jsii_.Create( + "jsii-calc.ClassWithNestedUnion", + []interface{}{unionProperty}, + &j, ) - _jsii_.RegisterClass( - "jsii-calc.ClassThatImplementsThePrivateInterface", - reflect.TypeOf((*ClassThatImplementsThePrivateInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"}, - _jsii_.MemberProperty{JsiiProperty: "b", GoGetter: "B"}, - _jsii_.MemberProperty{JsiiProperty: "c", GoGetter: "C"}, - _jsii_.MemberProperty{JsiiProperty: "e", GoGetter: "E"}, - }, - func() interface{} { - j := jsiiProxy_ClassThatImplementsThePrivateInterface{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_INonInternalInterface) - return &j - }, + + return &j +} + +func NewClassWithNestedUnion_Override(c ClassWithNestedUnion, unionProperty *[]interface{}) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ClassWithNestedUnion", + []interface{}{unionProperty}, + c, ) - _jsii_.RegisterClass( - "jsii-calc.ClassWithCollectionOfUnions", - reflect.TypeOf((*ClassWithCollectionOfUnions)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"}, - }, - func() interface{} { - return &jsiiProxy_ClassWithCollectionOfUnions{} - }, +} + +func (j *jsiiProxy_ClassWithNestedUnion)SetUnionProperty(val *[]interface{}) { + _jsii_.Set( + j, + "unionProperty", + val, ) - _jsii_.RegisterClass( - "jsii-calc.ClassWithCollections", - reflect.TypeOf((*ClassWithCollections)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "array", GoGetter: "Array"}, - _jsii_.MemberProperty{JsiiProperty: "map", GoGetter: "Map"}, - }, - func() interface{} { - return &jsiiProxy_ClassWithCollections{} - }, +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithPrivateConstructorAndAutomaticProperties.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +// Class that implements interface properties automatically, but using a private constructor. +type ClassWithPrivateConstructorAndAutomaticProperties interface { + IInterfaceWithProperties + ReadOnlyString() *string + ReadWriteString() *string + SetReadWriteString(val *string) +} + +// The jsii proxy struct for ClassWithPrivateConstructorAndAutomaticProperties +type jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties struct { + jsiiProxy_IInterfaceWithProperties +} + +func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties) ReadOnlyString() *string { + var returns *string + _jsii_.Get( + j, + "readOnlyString", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.ClassWithContainerTypes", - reflect.TypeOf((*ClassWithContainerTypes)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "array", GoGetter: "Array"}, - _jsii_.MemberProperty{JsiiProperty: "obj", GoGetter: "Obj"}, - _jsii_.MemberProperty{JsiiProperty: "props", GoGetter: "Props"}, - _jsii_.MemberProperty{JsiiProperty: "record", GoGetter: "Record"}, - }, - func() interface{} { - return &jsiiProxy_ClassWithContainerTypes{} - }, + return returns +} + +func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties) ReadWriteString() *string { + var returns *string + _jsii_.Get( + j, + "readWriteString", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.ClassWithDocs", - reflect.TypeOf((*ClassWithDocs)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_ClassWithDocs{} - }, + return returns +} + + +func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties)SetReadWriteString(val *string) { + _jsii_.Set( + j, + "readWriteString", + val, ) - _jsii_.RegisterClass( - "jsii-calc.ClassWithJavaReservedWords", - reflect.TypeOf((*ClassWithJavaReservedWords)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "import", GoMethod: "Import"}, - _jsii_.MemberProperty{JsiiProperty: "int", GoGetter: "Int"}, - }, - func() interface{} { - return &jsiiProxy_ClassWithJavaReservedWords{} - }, +} + +func ClassWithPrivateConstructorAndAutomaticProperties_Create(readOnlyString *string, readWriteString *string) ClassWithPrivateConstructorAndAutomaticProperties { + _init_.Initialize() + + var returns ClassWithPrivateConstructorAndAutomaticProperties + + _jsii_.StaticInvoke( + "jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties", + "create", + []interface{}{readOnlyString, readWriteString}, + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.ClassWithMutableObjectLiteralProperty", - reflect.TypeOf((*ClassWithMutableObjectLiteralProperty)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "mutableObject", GoGetter: "MutableObject"}, - }, - func() interface{} { - return &jsiiProxy_ClassWithMutableObjectLiteralProperty{} - }, + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConfusingToJackson.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +// This tries to confuse Jackson by having overloaded property setters. +// See: https://github.com/aws/aws-cdk/issues/4080 +// +type ConfusingToJackson interface { + UnionProperty() interface{} + SetUnionProperty(val interface{}) +} + +// The jsii proxy struct for ConfusingToJackson +type jsiiProxy_ConfusingToJackson struct { + _ byte // padding +} + +func (j *jsiiProxy_ConfusingToJackson) UnionProperty() interface{} { + var returns interface{} + _jsii_.Get( + j, + "unionProperty", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.ClassWithNestedUnion", - reflect.TypeOf((*ClassWithNestedUnion)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"}, - }, - func() interface{} { - return &jsiiProxy_ClassWithNestedUnion{} - }, + return returns +} + + +func (j *jsiiProxy_ConfusingToJackson)SetUnionProperty(val interface{}) { + _jsii_.Set( + j, + "unionProperty", + val, ) - _jsii_.RegisterClass( - "jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties", - reflect.TypeOf((*ClassWithPrivateConstructorAndAutomaticProperties)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "readOnlyString", GoGetter: "ReadOnlyString"}, - _jsii_.MemberProperty{JsiiProperty: "readWriteString", GoGetter: "ReadWriteString"}, - }, - func() interface{} { - j := jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceWithProperties) - return &j - }, +} + +func ConfusingToJackson_MakeInstance() ConfusingToJackson { + _init_.Initialize() + + var returns ConfusingToJackson + + _jsii_.StaticInvoke( + "jsii-calc.ConfusingToJackson", + "makeInstance", + nil, // no parameters + &returns, ) - _jsii_.RegisterClass( + + return returns +} + +func ConfusingToJackson_MakeStructInstance() *ConfusingToJacksonStruct { + _init_.Initialize() + + var returns *ConfusingToJacksonStruct + + _jsii_.StaticInvoke( "jsii-calc.ConfusingToJackson", - reflect.TypeOf((*ConfusingToJackson)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"}, - }, - func() interface{} { - return &jsiiProxy_ConfusingToJackson{} - }, + "makeStructInstance", + nil, // no parameters + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.ConfusingToJacksonStruct", - reflect.TypeOf((*ConfusingToJacksonStruct)(nil)).Elem(), + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConfusingToJacksonStruct.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type ConfusingToJacksonStruct struct { + UnionProperty interface{} \`field:"optional" json:"unionProperty" yaml:"unionProperty"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConstructorPassesThisOut.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type ConstructorPassesThisOut interface { +} + +// The jsii proxy struct for ConstructorPassesThisOut +type jsiiProxy_ConstructorPassesThisOut struct { + _ byte // padding +} + +func NewConstructorPassesThisOut(consumer PartiallyInitializedThisConsumer) ConstructorPassesThisOut { + _init_.Initialize() + + j := jsiiProxy_ConstructorPassesThisOut{} + + _jsii_.Create( + "jsii-calc.ConstructorPassesThisOut", + []interface{}{consumer}, + &j, ) - _jsii_.RegisterClass( + + return &j +} + +func NewConstructorPassesThisOut_Override(c ConstructorPassesThisOut, consumer PartiallyInitializedThisConsumer) { + _init_.Initialize() + + _jsii_.Create( "jsii-calc.ConstructorPassesThisOut", - reflect.TypeOf((*ConstructorPassesThisOut)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_ConstructorPassesThisOut{} - }, + []interface{}{consumer}, + c, ) - _jsii_.RegisterClass( +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/Constructors.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type Constructors interface { +} + +// The jsii proxy struct for Constructors +type jsiiProxy_Constructors struct { + _ byte // padding +} + +func NewConstructors() Constructors { + _init_.Initialize() + + j := jsiiProxy_Constructors{} + + _jsii_.Create( "jsii-calc.Constructors", - reflect.TypeOf((*Constructors)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_Constructors{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.ConsumePureInterface", - reflect.TypeOf((*ConsumePureInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "workItBaby", GoMethod: "WorkItBaby"}, - }, - func() interface{} { - return &jsiiProxy_ConsumePureInterface{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.ConsumerCanRingBell", - reflect.TypeOf((*ConsumerCanRingBell)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "implementedByObjectLiteral", GoMethod: "ImplementedByObjectLiteral"}, - _jsii_.MemberMethod{JsiiMethod: "implementedByPrivateClass", GoMethod: "ImplementedByPrivateClass"}, - _jsii_.MemberMethod{JsiiMethod: "implementedByPublicClass", GoMethod: "ImplementedByPublicClass"}, - _jsii_.MemberMethod{JsiiMethod: "whenTypedAsClass", GoMethod: "WhenTypedAsClass"}, - }, - func() interface{} { - return &jsiiProxy_ConsumerCanRingBell{} - }, + nil, // no parameters + &j, ) - _jsii_.RegisterClass( - "jsii-calc.ConsumersOfThisCrazyTypeSystem", - reflect.TypeOf((*ConsumersOfThisCrazyTypeSystem)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "consumeAnotherPublicInterface", GoMethod: "ConsumeAnotherPublicInterface"}, - _jsii_.MemberMethod{JsiiMethod: "consumeNonInternalInterface", GoMethod: "ConsumeNonInternalInterface"}, - }, - func() interface{} { - return &jsiiProxy_ConsumersOfThisCrazyTypeSystem{} - }, + + return &j +} + +func NewConstructors_Override(c Constructors) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.Constructors", + nil, // no parameters + c, ) - _jsii_.RegisterStruct( - "jsii-calc.ContainerProps", - reflect.TypeOf((*ContainerProps)(nil)).Elem(), +} + +func Constructors_HiddenInterface() IPublicInterface { + _init_.Initialize() + + var returns IPublicInterface + + _jsii_.StaticInvoke( + "jsii-calc.Constructors", + "hiddenInterface", + nil, // no parameters + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.DataRenderer", - reflect.TypeOf((*DataRenderer)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "render", GoMethod: "Render"}, - _jsii_.MemberMethod{JsiiMethod: "renderArbitrary", GoMethod: "RenderArbitrary"}, - _jsii_.MemberMethod{JsiiMethod: "renderMap", GoMethod: "RenderMap"}, - }, - func() interface{} { - return &jsiiProxy_DataRenderer{} - }, + + return returns +} + +func Constructors_HiddenInterfaces() *[]IPublicInterface { + _init_.Initialize() + + var returns *[]IPublicInterface + + _jsii_.StaticInvoke( + "jsii-calc.Constructors", + "hiddenInterfaces", + nil, // no parameters + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.Default", - reflect.TypeOf((*Default)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "pleaseCompile", GoMethod: "PleaseCompile"}, - }, - func() interface{} { - return &jsiiProxy_Default{} - }, + + return returns +} + +func Constructors_HiddenSubInterfaces() *[]IPublicInterface { + _init_.Initialize() + + var returns *[]IPublicInterface + + _jsii_.StaticInvoke( + "jsii-calc.Constructors", + "hiddenSubInterfaces", + nil, // no parameters + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.DefaultedConstructorArgument", - reflect.TypeOf((*DefaultedConstructorArgument)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "arg1", GoGetter: "Arg1"}, - _jsii_.MemberProperty{JsiiProperty: "arg2", GoGetter: "Arg2"}, - _jsii_.MemberProperty{JsiiProperty: "arg3", GoGetter: "Arg3"}, - }, - func() interface{} { - return &jsiiProxy_DefaultedConstructorArgument{} - }, + + return returns +} + +func Constructors_MakeClass() PublicClass { + _init_.Initialize() + + var returns PublicClass + + _jsii_.StaticInvoke( + "jsii-calc.Constructors", + "makeClass", + nil, // no parameters + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.Demonstrate982", - reflect.TypeOf((*Demonstrate982)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_Demonstrate982{} - }, + + return returns +} + +func Constructors_MakeInterface() IPublicInterface { + _init_.Initialize() + + var returns IPublicInterface + + _jsii_.StaticInvoke( + "jsii-calc.Constructors", + "makeInterface", + nil, // no parameters + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.DeprecatedClass", - reflect.TypeOf((*DeprecatedClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, - _jsii_.MemberProperty{JsiiProperty: "readonlyProperty", GoGetter: "ReadonlyProperty"}, - }, - func() interface{} { - return &jsiiProxy_DeprecatedClass{} - }, + + return returns +} + +func Constructors_MakeInterface2() IPublicInterface2 { + _init_.Initialize() + + var returns IPublicInterface2 + + _jsii_.StaticInvoke( + "jsii-calc.Constructors", + "makeInterface2", + nil, // no parameters + &returns, ) - _jsii_.RegisterEnum( - "jsii-calc.DeprecatedEnum", - reflect.TypeOf((*DeprecatedEnum)(nil)).Elem(), - map[string]interface{}{ - "OPTION_A": DeprecatedEnum_OPTION_A, - "OPTION_B": DeprecatedEnum_OPTION_B, - }, + + return returns +} + +func Constructors_MakeInterfaces() *[]IPublicInterface { + _init_.Initialize() + + var returns *[]IPublicInterface + + _jsii_.StaticInvoke( + "jsii-calc.Constructors", + "makeInterfaces", + nil, // no parameters + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.DeprecatedStruct", - reflect.TypeOf((*DeprecatedStruct)(nil)).Elem(), + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumePureInterface.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type ConsumePureInterface interface { + WorkItBaby() *StructB +} + +// The jsii proxy struct for ConsumePureInterface +type jsiiProxy_ConsumePureInterface struct { + _ byte // padding +} + +func NewConsumePureInterface(delegate IStructReturningDelegate) ConsumePureInterface { + _init_.Initialize() + + j := jsiiProxy_ConsumePureInterface{} + + _jsii_.Create( + "jsii-calc.ConsumePureInterface", + []interface{}{delegate}, + &j, ) - _jsii_.RegisterStruct( - "jsii-calc.DerivedStruct", - reflect.TypeOf((*DerivedStruct)(nil)).Elem(), + + return &j +} + +func NewConsumePureInterface_Override(c ConsumePureInterface, delegate IStructReturningDelegate) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ConsumePureInterface", + []interface{}{delegate}, + c, ) - _jsii_.RegisterStruct( - "jsii-calc.DiamondBottom", - reflect.TypeOf((*DiamondBottom)(nil)).Elem(), +} + +func (c *jsiiProxy_ConsumePureInterface) WorkItBaby() *StructB { + var returns *StructB + + _jsii_.Invoke( + c, + "workItBaby", + nil, // no parameters + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.DiamondInheritanceBaseLevelStruct", - reflect.TypeOf((*DiamondInheritanceBaseLevelStruct)(nil)).Elem(), + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumerCanRingBell.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +// Test calling back to consumers that implement interfaces. +// +// Check that if a JSII consumer implements IConsumerWithInterfaceParam, they can call +// the method on the argument that they're passed... +type ConsumerCanRingBell interface { + // ...if the interface is implemented using an object literal. + // + // Returns whether the bell was rung. + ImplementedByObjectLiteral(ringer IBellRinger) *bool + // ...if the interface is implemented using a private class. + // + // Return whether the bell was rung. + ImplementedByPrivateClass(ringer IBellRinger) *bool + // ...if the interface is implemented using a public class. + // + // Return whether the bell was rung. + ImplementedByPublicClass(ringer IBellRinger) *bool + // If the parameter is a concrete class instead of an interface. + // + // Return whether the bell was rung. + WhenTypedAsClass(ringer IConcreteBellRinger) *bool +} + +// The jsii proxy struct for ConsumerCanRingBell +type jsiiProxy_ConsumerCanRingBell struct { + _ byte // padding +} + +func NewConsumerCanRingBell() ConsumerCanRingBell { + _init_.Initialize() + + j := jsiiProxy_ConsumerCanRingBell{} + + _jsii_.Create( + "jsii-calc.ConsumerCanRingBell", + nil, // no parameters + &j, ) - _jsii_.RegisterStruct( - "jsii-calc.DiamondInheritanceFirstMidLevelStruct", - reflect.TypeOf((*DiamondInheritanceFirstMidLevelStruct)(nil)).Elem(), + + return &j +} + +func NewConsumerCanRingBell_Override(c ConsumerCanRingBell) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ConsumerCanRingBell", + nil, // no parameters + c, ) - _jsii_.RegisterStruct( - "jsii-calc.DiamondInheritanceSecondMidLevelStruct", - reflect.TypeOf((*DiamondInheritanceSecondMidLevelStruct)(nil)).Elem(), +} + +// ...if the interface is implemented using an object literal. +// +// Returns whether the bell was rung. +func ConsumerCanRingBell_StaticImplementedByObjectLiteral(ringer IBellRinger) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.ConsumerCanRingBell", + "staticImplementedByObjectLiteral", + []interface{}{ringer}, + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.DiamondInheritanceTopLevelStruct", - reflect.TypeOf((*DiamondInheritanceTopLevelStruct)(nil)).Elem(), + + return returns +} + +// ...if the interface is implemented using a private class. +// +// Return whether the bell was rung. +func ConsumerCanRingBell_StaticImplementedByPrivateClass(ringer IBellRinger) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.ConsumerCanRingBell", + "staticImplementedByPrivateClass", + []interface{}{ringer}, + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.DisappointingCollectionSource", - reflect.TypeOf((*DisappointingCollectionSource)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_DisappointingCollectionSource{} - }, + + return returns +} + +// ...if the interface is implemented using a public class. +// +// Return whether the bell was rung. +func ConsumerCanRingBell_StaticImplementedByPublicClass(ringer IBellRinger) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.ConsumerCanRingBell", + "staticImplementedByPublicClass", + []interface{}{ringer}, + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.DoNotOverridePrivates", - reflect.TypeOf((*DoNotOverridePrivates)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "changePrivatePropertyValue", GoMethod: "ChangePrivatePropertyValue"}, - _jsii_.MemberMethod{JsiiMethod: "privateMethodValue", GoMethod: "PrivateMethodValue"}, - _jsii_.MemberMethod{JsiiMethod: "privatePropertyValue", GoMethod: "PrivatePropertyValue"}, - }, - func() interface{} { - return &jsiiProxy_DoNotOverridePrivates{} - }, + + return returns +} + +// If the parameter is a concrete class instead of an interface. +// +// Return whether the bell was rung. +func ConsumerCanRingBell_StaticWhenTypedAsClass(ringer IConcreteBellRinger) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.ConsumerCanRingBell", + "staticWhenTypedAsClass", + []interface{}{ringer}, + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.DoNotRecognizeAnyAsOptional", - reflect.TypeOf((*DoNotRecognizeAnyAsOptional)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - }, - func() interface{} { - return &jsiiProxy_DoNotRecognizeAnyAsOptional{} - }, + + return returns +} + +func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByObjectLiteral(ringer IBellRinger) *bool { + var returns *bool + + _jsii_.Invoke( + c, + "implementedByObjectLiteral", + []interface{}{ringer}, + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.DocumentedClass", - reflect.TypeOf((*DocumentedClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "greet", GoMethod: "Greet"}, - _jsii_.MemberMethod{JsiiMethod: "hola", GoMethod: "Hola"}, - }, - func() interface{} { - return &jsiiProxy_DocumentedClass{} - }, + + return returns +} + +func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByPrivateClass(ringer IBellRinger) *bool { + var returns *bool + + _jsii_.Invoke( + c, + "implementedByPrivateClass", + []interface{}{ringer}, + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.DontComplainAboutVariadicAfterOptional", - reflect.TypeOf((*DontComplainAboutVariadicAfterOptional)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "optionalAndVariadic", GoMethod: "OptionalAndVariadic"}, - }, - func() interface{} { - return &jsiiProxy_DontComplainAboutVariadicAfterOptional{} - }, + + return returns +} + +func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByPublicClass(ringer IBellRinger) *bool { + var returns *bool + + _jsii_.Invoke( + c, + "implementedByPublicClass", + []interface{}{ringer}, + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.DoubleTrouble", - reflect.TypeOf((*DoubleTrouble)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, - _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"}, - }, - func() interface{} { - j := jsiiProxy_DoubleTrouble{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IFriendlyRandomGenerator) - return &j - }, + + return returns +} + +func (c *jsiiProxy_ConsumerCanRingBell) WhenTypedAsClass(ringer IConcreteBellRinger) *bool { + var returns *bool + + _jsii_.Invoke( + c, + "whenTypedAsClass", + []interface{}{ringer}, + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.DummyObj", - reflect.TypeOf((*DummyObj)(nil)).Elem(), + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumersOfThisCrazyTypeSystem.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type ConsumersOfThisCrazyTypeSystem interface { + ConsumeAnotherPublicInterface(obj IAnotherPublicInterface) *string + ConsumeNonInternalInterface(obj INonInternalInterface) interface{} +} + +// The jsii proxy struct for ConsumersOfThisCrazyTypeSystem +type jsiiProxy_ConsumersOfThisCrazyTypeSystem struct { + _ byte // padding +} + +func NewConsumersOfThisCrazyTypeSystem() ConsumersOfThisCrazyTypeSystem { + _init_.Initialize() + + j := jsiiProxy_ConsumersOfThisCrazyTypeSystem{} + + _jsii_.Create( + "jsii-calc.ConsumersOfThisCrazyTypeSystem", + nil, // no parameters + &j, ) - _jsii_.RegisterClass( - "jsii-calc.DynamicPropertyBearer", - reflect.TypeOf((*DynamicPropertyBearer)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "dynamicProperty", GoGetter: "DynamicProperty"}, - _jsii_.MemberProperty{JsiiProperty: "valueStore", GoGetter: "ValueStore"}, - }, - func() interface{} { - return &jsiiProxy_DynamicPropertyBearer{} - }, + + return &j +} + +func NewConsumersOfThisCrazyTypeSystem_Override(c ConsumersOfThisCrazyTypeSystem) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ConsumersOfThisCrazyTypeSystem", + nil, // no parameters + c, ) - _jsii_.RegisterClass( - "jsii-calc.DynamicPropertyBearerChild", - reflect.TypeOf((*DynamicPropertyBearerChild)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "dynamicProperty", GoGetter: "DynamicProperty"}, - _jsii_.MemberProperty{JsiiProperty: "originalValue", GoGetter: "OriginalValue"}, - _jsii_.MemberMethod{JsiiMethod: "overrideValue", GoMethod: "OverrideValue"}, - _jsii_.MemberProperty{JsiiProperty: "valueStore", GoGetter: "ValueStore"}, - }, - func() interface{} { - j := jsiiProxy_DynamicPropertyBearerChild{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_DynamicPropertyBearer) - return &j - }, +} + +func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) ConsumeAnotherPublicInterface(obj IAnotherPublicInterface) *string { + var returns *string + + _jsii_.Invoke( + c, + "consumeAnotherPublicInterface", + []interface{}{obj}, + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.Entropy", - reflect.TypeOf((*Entropy)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "increase", GoMethod: "Increase"}, - _jsii_.MemberMethod{JsiiMethod: "repeat", GoMethod: "Repeat"}, - }, - func() interface{} { - return &jsiiProxy_Entropy{} - }, + + return returns +} + +func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) ConsumeNonInternalInterface(obj INonInternalInterface) interface{} { + var returns interface{} + + _jsii_.Invoke( + c, + "consumeNonInternalInterface", + []interface{}{obj}, + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.EnumDispenser", - reflect.TypeOf((*EnumDispenser)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_EnumDispenser{} - }, + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ContainerProps.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type ContainerProps struct { + ArrayProp *[]*DummyObj \`field:"required" json:"arrayProp" yaml:"arrayProp"\` + ObjProp *map[string]*DummyObj \`field:"required" json:"objProp" yaml:"objProp"\` + RecordProp *map[string]*DummyObj \`field:"required" json:"recordProp" yaml:"recordProp"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DataRenderer.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + +// Verifies proper type handling through dynamic overrides. +type DataRenderer interface { + Render(data *scopejsiicalclib.MyFirstStruct) *string + RenderArbitrary(data *map[string]interface{}) *string + RenderMap(map_ *map[string]interface{}) *string +} + +// The jsii proxy struct for DataRenderer +type jsiiProxy_DataRenderer struct { + _ byte // padding +} + +func NewDataRenderer() DataRenderer { + _init_.Initialize() + + j := jsiiProxy_DataRenderer{} + + _jsii_.Create( + "jsii-calc.DataRenderer", + nil, // no parameters + &j, ) - _jsii_.RegisterClass( - "jsii-calc.EraseUndefinedHashValues", - reflect.TypeOf((*EraseUndefinedHashValues)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_EraseUndefinedHashValues{} - }, + + return &j +} + +func NewDataRenderer_Override(d DataRenderer) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.DataRenderer", + nil, // no parameters + d, ) - _jsii_.RegisterStruct( - "jsii-calc.EraseUndefinedHashValuesOptions", - reflect.TypeOf((*EraseUndefinedHashValuesOptions)(nil)).Elem(), +} + +func (d *jsiiProxy_DataRenderer) Render(data *scopejsiicalclib.MyFirstStruct) *string { + var returns *string + + _jsii_.Invoke( + d, + "render", + []interface{}{data}, + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.ExperimentalClass", - reflect.TypeOf((*ExperimentalClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, - _jsii_.MemberProperty{JsiiProperty: "readonlyProperty", GoGetter: "ReadonlyProperty"}, - }, - func() interface{} { - return &jsiiProxy_ExperimentalClass{} - }, + + return returns +} + +func (d *jsiiProxy_DataRenderer) RenderArbitrary(data *map[string]interface{}) *string { + var returns *string + + _jsii_.Invoke( + d, + "renderArbitrary", + []interface{}{data}, + &returns, ) - _jsii_.RegisterEnum( - "jsii-calc.ExperimentalEnum", - reflect.TypeOf((*ExperimentalEnum)(nil)).Elem(), - map[string]interface{}{ - "OPTION_A": ExperimentalEnum_OPTION_A, - "OPTION_B": ExperimentalEnum_OPTION_B, - }, + + return returns +} + +func (d *jsiiProxy_DataRenderer) RenderMap(map_ *map[string]interface{}) *string { + var returns *string + + _jsii_.Invoke( + d, + "renderMap", + []interface{}{map_}, + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.ExperimentalStruct", - reflect.TypeOf((*ExperimentalStruct)(nil)).Elem(), + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/Default.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +// A class named "Default". +// See: https://github.com/aws/jsii/issues/2637 +// +type Default interface { + PleaseCompile() +} + +// The jsii proxy struct for Default +type jsiiProxy_Default struct { + _ byte // padding +} + +func NewDefault() Default { + _init_.Initialize() + + j := jsiiProxy_Default{} + + _jsii_.Create( + "jsii-calc.Default", + nil, // no parameters + &j, ) - _jsii_.RegisterClass( - "jsii-calc.ExportedBaseClass", - reflect.TypeOf((*ExportedBaseClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "success", GoGetter: "Success"}, - }, - func() interface{} { - return &jsiiProxy_ExportedBaseClass{} - }, + + return &j +} + +func NewDefault_Override(d Default) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.Default", + nil, // no parameters + d, ) - _jsii_.RegisterStruct( - "jsii-calc.ExtendsInternalInterface", - reflect.TypeOf((*ExtendsInternalInterface)(nil)).Elem(), +} + +func (d *jsiiProxy_Default) PleaseCompile() { + _jsii_.InvokeVoid( + d, + "pleaseCompile", + nil, // no parameters ) - _jsii_.RegisterClass( - "jsii-calc.ExternalClass", - reflect.TypeOf((*ExternalClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, - _jsii_.MemberProperty{JsiiProperty: "readonlyProperty", GoGetter: "ReadonlyProperty"}, - }, - func() interface{} { - return &jsiiProxy_ExternalClass{} - }, +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DefaultedConstructorArgument.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + "time" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type DefaultedConstructorArgument interface { + Arg1() *float64 + Arg2() *string + Arg3() *time.Time +} + +// The jsii proxy struct for DefaultedConstructorArgument +type jsiiProxy_DefaultedConstructorArgument struct { + _ byte // padding +} + +func (j *jsiiProxy_DefaultedConstructorArgument) Arg1() *float64 { + var returns *float64 + _jsii_.Get( + j, + "arg1", + &returns, ) - _jsii_.RegisterEnum( - "jsii-calc.ExternalEnum", - reflect.TypeOf((*ExternalEnum)(nil)).Elem(), - map[string]interface{}{ - "OPTION_A": ExternalEnum_OPTION_A, - "OPTION_B": ExternalEnum_OPTION_B, - }, + return returns +} + +func (j *jsiiProxy_DefaultedConstructorArgument) Arg2() *string { + var returns *string + _jsii_.Get( + j, + "arg2", + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.ExternalStruct", - reflect.TypeOf((*ExternalStruct)(nil)).Elem(), + return returns +} + +func (j *jsiiProxy_DefaultedConstructorArgument) Arg3() *time.Time { + var returns *time.Time + _jsii_.Get( + j, + "arg3", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.FullCombo", - reflect.TypeOf((*FullCombo)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, - }, - func() interface{} { - j := jsiiProxy_FullCombo{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_BaseClass) - _jsii_.InitJsiiProxy(&j.jsiiProxy_IIndirectlyImplemented) - return &j - }, + return returns +} + + +func NewDefaultedConstructorArgument(arg1 *float64, arg2 *string, arg3 *time.Time) DefaultedConstructorArgument { + _init_.Initialize() + + j := jsiiProxy_DefaultedConstructorArgument{} + + _jsii_.Create( + "jsii-calc.DefaultedConstructorArgument", + []interface{}{arg1, arg2, arg3}, + &j, ) - _jsii_.RegisterClass( - "jsii-calc.GiveMeStructs", - reflect.TypeOf((*GiveMeStructs)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "derivedToFirst", GoMethod: "DerivedToFirst"}, - _jsii_.MemberMethod{JsiiMethod: "readDerivedNonPrimitive", GoMethod: "ReadDerivedNonPrimitive"}, - _jsii_.MemberMethod{JsiiMethod: "readFirstNumber", GoMethod: "ReadFirstNumber"}, - _jsii_.MemberProperty{JsiiProperty: "structLiteral", GoGetter: "StructLiteral"}, - }, - func() interface{} { - return &jsiiProxy_GiveMeStructs{} - }, + + return &j +} + +func NewDefaultedConstructorArgument_Override(d DefaultedConstructorArgument, arg1 *float64, arg2 *string, arg3 *time.Time) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.DefaultedConstructorArgument", + []interface{}{arg1, arg2, arg3}, + d, ) - _jsii_.RegisterStruct( - "jsii-calc.Greetee", - reflect.TypeOf((*Greetee)(nil)).Elem(), +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/Demonstrate982.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +// 1. +// +// call #takeThis() -> An ObjectRef will be provisioned for the value (it'll be re-used!) +// 2. call #takeThisToo() -> The ObjectRef from before will need to be down-cased to the ParentStruct982 type +type Demonstrate982 interface { +} + +// The jsii proxy struct for Demonstrate982 +type jsiiProxy_Demonstrate982 struct { + _ byte // padding +} + +func NewDemonstrate982() Demonstrate982 { + _init_.Initialize() + + j := jsiiProxy_Demonstrate982{} + + _jsii_.Create( + "jsii-calc.Demonstrate982", + nil, // no parameters + &j, ) - _jsii_.RegisterClass( - "jsii-calc.GreetingAugmenter", - reflect.TypeOf((*GreetingAugmenter)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "betterGreeting", GoMethod: "BetterGreeting"}, - }, - func() interface{} { - return &jsiiProxy_GreetingAugmenter{} - }, + + return &j +} + +func NewDemonstrate982_Override(d Demonstrate982) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.Demonstrate982", + nil, // no parameters + d, ) - _jsii_.RegisterInterface( - "jsii-calc.IAnonymousImplementationProvider", - reflect.TypeOf((*IAnonymousImplementationProvider)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "provideAsClass", GoMethod: "ProvideAsClass"}, - _jsii_.MemberMethod{JsiiMethod: "provideAsInterface", GoMethod: "ProvideAsInterface"}, - }, - func() interface{} { - return &jsiiProxy_IAnonymousImplementationProvider{} - }, +} + +// It's dangerous to go alone! +func Demonstrate982_TakeThis() *ChildStruct982 { + _init_.Initialize() + + var returns *ChildStruct982 + + _jsii_.StaticInvoke( + "jsii-calc.Demonstrate982", + "takeThis", + nil, // no parameters + &returns, ) - _jsii_.RegisterInterface( - "jsii-calc.IAnonymouslyImplementMe", - reflect.TypeOf((*IAnonymouslyImplementMe)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - _jsii_.MemberMethod{JsiiMethod: "verb", GoMethod: "Verb"}, - }, - func() interface{} { - return &jsiiProxy_IAnonymouslyImplementMe{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IAnotherPublicInterface", - reflect.TypeOf((*IAnotherPublicInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"}, - }, - func() interface{} { - return &jsiiProxy_IAnotherPublicInterface{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IBell", - reflect.TypeOf((*IBell)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "ring", GoMethod: "Ring"}, - }, - func() interface{} { - return &jsiiProxy_IBell{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IBellRinger", - reflect.TypeOf((*IBellRinger)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "yourTurn", GoMethod: "YourTurn"}, - }, - func() interface{} { - return &jsiiProxy_IBellRinger{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IConcreteBellRinger", - reflect.TypeOf((*IConcreteBellRinger)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "yourTurn", GoMethod: "YourTurn"}, - }, - func() interface{} { - return &jsiiProxy_IConcreteBellRinger{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IDeprecatedInterface", - reflect.TypeOf((*IDeprecatedInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, - }, - func() interface{} { - return &jsiiProxy_IDeprecatedInterface{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IExperimentalInterface", - reflect.TypeOf((*IExperimentalInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, - }, - func() interface{} { - return &jsiiProxy_IExperimentalInterface{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IExtendsPrivateInterface", - reflect.TypeOf((*IExtendsPrivateInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "moreThings", GoGetter: "MoreThings"}, - _jsii_.MemberProperty{JsiiProperty: "private", GoGetter: "Private"}, - }, - func() interface{} { - return &jsiiProxy_IExtendsPrivateInterface{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IExternalInterface", - reflect.TypeOf((*IExternalInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, - }, - func() interface{} { - return &jsiiProxy_IExternalInterface{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IFriendlier", - reflect.TypeOf((*IFriendlier)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "farewell", GoMethod: "Farewell"}, - _jsii_.MemberMethod{JsiiMethod: "goodbye", GoMethod: "Goodbye"}, - _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, - }, - func() interface{} { - j := jsiiProxy_IFriendlier{} - _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibIFriendly) - return &j - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IFriendlyRandomGenerator", - reflect.TypeOf((*IFriendlyRandomGenerator)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, - _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"}, - }, - func() interface{} { - j := jsiiProxy_IFriendlyRandomGenerator{} - _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibIFriendly) - _jsii_.InitJsiiProxy(&j.jsiiProxy_IRandomNumberGenerator) - return &j - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IIndirectlyImplemented", - reflect.TypeOf((*IIndirectlyImplemented)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, - }, - func() interface{} { - return &jsiiProxy_IIndirectlyImplemented{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IInterfaceImplementedByAbstractClass", - reflect.TypeOf((*IInterfaceImplementedByAbstractClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "propFromInterface", GoGetter: "PropFromInterface"}, - }, - func() interface{} { - return &jsiiProxy_IInterfaceImplementedByAbstractClass{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IInterfaceThatShouldNotBeADataType", - reflect.TypeOf((*IInterfaceThatShouldNotBeADataType)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "doThings", GoMethod: "DoThings"}, - _jsii_.MemberProperty{JsiiProperty: "otherValue", GoGetter: "OtherValue"}, - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - }, - func() interface{} { - j := jsiiProxy_IInterfaceThatShouldNotBeADataType{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceWithMethods) - return &j - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IInterfaceWithInternal", - reflect.TypeOf((*IInterfaceWithInternal)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "visible", GoMethod: "Visible"}, - }, - func() interface{} { - return &jsiiProxy_IInterfaceWithInternal{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IInterfaceWithMethods", - reflect.TypeOf((*IInterfaceWithMethods)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "doThings", GoMethod: "DoThings"}, - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - }, - func() interface{} { - return &jsiiProxy_IInterfaceWithMethods{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IInterfaceWithOptionalMethodArguments", - reflect.TypeOf((*IInterfaceWithOptionalMethodArguments)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, - }, - func() interface{} { - return &jsiiProxy_IInterfaceWithOptionalMethodArguments{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IInterfaceWithProperties", - reflect.TypeOf((*IInterfaceWithProperties)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "readOnlyString", GoGetter: "ReadOnlyString"}, - _jsii_.MemberProperty{JsiiProperty: "readWriteString", GoGetter: "ReadWriteString"}, - }, - func() interface{} { - return &jsiiProxy_IInterfaceWithProperties{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IInterfaceWithPropertiesExtension", - reflect.TypeOf((*IInterfaceWithPropertiesExtension)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "foo", GoGetter: "Foo"}, - _jsii_.MemberProperty{JsiiProperty: "readOnlyString", GoGetter: "ReadOnlyString"}, - _jsii_.MemberProperty{JsiiProperty: "readWriteString", GoGetter: "ReadWriteString"}, - }, - func() interface{} { - j := jsiiProxy_IInterfaceWithPropertiesExtension{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceWithProperties) - return &j - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IJSII417Derived", - reflect.TypeOf((*IJSII417Derived)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, - _jsii_.MemberMethod{JsiiMethod: "baz", GoMethod: "Baz"}, - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, - _jsii_.MemberProperty{JsiiProperty: "hasRoot", GoGetter: "HasRoot"}, - _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, - }, - func() interface{} { - j := jsiiProxy_IJSII417Derived{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IJSII417PublicBaseOfBase) - return &j - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IJSII417PublicBaseOfBase", - reflect.TypeOf((*IJSII417PublicBaseOfBase)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, - _jsii_.MemberProperty{JsiiProperty: "hasRoot", GoGetter: "HasRoot"}, - }, - func() interface{} { - return &jsiiProxy_IJSII417PublicBaseOfBase{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IJavaReservedWordsInAnInterface", - reflect.TypeOf((*IJavaReservedWordsInAnInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "abstract", GoMethod: "Abstract"}, - _jsii_.MemberMethod{JsiiMethod: "assert", GoMethod: "Assert"}, - _jsii_.MemberMethod{JsiiMethod: "boolean", GoMethod: "Boolean"}, - _jsii_.MemberMethod{JsiiMethod: "break", GoMethod: "Break"}, - _jsii_.MemberMethod{JsiiMethod: "byte", GoMethod: "Byte"}, - _jsii_.MemberMethod{JsiiMethod: "case", GoMethod: "Case"}, - _jsii_.MemberMethod{JsiiMethod: "catch", GoMethod: "Catch"}, - _jsii_.MemberMethod{JsiiMethod: "char", GoMethod: "Char"}, - _jsii_.MemberMethod{JsiiMethod: "class", GoMethod: "Class"}, - _jsii_.MemberMethod{JsiiMethod: "const", GoMethod: "Const"}, - _jsii_.MemberMethod{JsiiMethod: "continue", GoMethod: "Continue"}, - _jsii_.MemberMethod{JsiiMethod: "default", GoMethod: "Default"}, - _jsii_.MemberMethod{JsiiMethod: "do", GoMethod: "Do"}, - _jsii_.MemberMethod{JsiiMethod: "double", GoMethod: "Double"}, - _jsii_.MemberMethod{JsiiMethod: "else", GoMethod: "Else"}, - _jsii_.MemberMethod{JsiiMethod: "enum", GoMethod: "Enum"}, - _jsii_.MemberMethod{JsiiMethod: "extends", GoMethod: "Extends"}, - _jsii_.MemberMethod{JsiiMethod: "false", GoMethod: "False"}, - _jsii_.MemberMethod{JsiiMethod: "final", GoMethod: "Final"}, - _jsii_.MemberMethod{JsiiMethod: "finally", GoMethod: "Finally"}, - _jsii_.MemberMethod{JsiiMethod: "float", GoMethod: "Float"}, - _jsii_.MemberMethod{JsiiMethod: "for", GoMethod: "For"}, - _jsii_.MemberMethod{JsiiMethod: "goto", GoMethod: "Goto"}, - _jsii_.MemberMethod{JsiiMethod: "if", GoMethod: "If"}, - _jsii_.MemberMethod{JsiiMethod: "implements", GoMethod: "Implements"}, - _jsii_.MemberMethod{JsiiMethod: "import", GoMethod: "Import"}, - _jsii_.MemberMethod{JsiiMethod: "instanceof", GoMethod: "Instanceof"}, - _jsii_.MemberMethod{JsiiMethod: "int", GoMethod: "Int"}, - _jsii_.MemberMethod{JsiiMethod: "interface", GoMethod: "Interface"}, - _jsii_.MemberMethod{JsiiMethod: "long", GoMethod: "Long"}, - _jsii_.MemberMethod{JsiiMethod: "native", GoMethod: "Native"}, - _jsii_.MemberMethod{JsiiMethod: "null", GoMethod: "Null"}, - _jsii_.MemberMethod{JsiiMethod: "package", GoMethod: "Package"}, - _jsii_.MemberMethod{JsiiMethod: "private", GoMethod: "Private"}, - _jsii_.MemberMethod{JsiiMethod: "protected", GoMethod: "Protected"}, - _jsii_.MemberMethod{JsiiMethod: "public", GoMethod: "Public"}, - _jsii_.MemberMethod{JsiiMethod: "return", GoMethod: "Return"}, - _jsii_.MemberMethod{JsiiMethod: "short", GoMethod: "Short"}, - _jsii_.MemberMethod{JsiiMethod: "static", GoMethod: "Static"}, - _jsii_.MemberMethod{JsiiMethod: "strictfp", GoMethod: "Strictfp"}, - _jsii_.MemberMethod{JsiiMethod: "super", GoMethod: "Super"}, - _jsii_.MemberMethod{JsiiMethod: "switch", GoMethod: "Switch"}, - _jsii_.MemberMethod{JsiiMethod: "synchronized", GoMethod: "Synchronized"}, - _jsii_.MemberMethod{JsiiMethod: "this", GoMethod: "This"}, - _jsii_.MemberMethod{JsiiMethod: "throw", GoMethod: "Throw"}, - _jsii_.MemberMethod{JsiiMethod: "throws", GoMethod: "Throws"}, - _jsii_.MemberMethod{JsiiMethod: "transient", GoMethod: "Transient"}, - _jsii_.MemberMethod{JsiiMethod: "true", GoMethod: "True"}, - _jsii_.MemberMethod{JsiiMethod: "try", GoMethod: "Try"}, - _jsii_.MemberMethod{JsiiMethod: "void", GoMethod: "Void"}, - _jsii_.MemberMethod{JsiiMethod: "volatile", GoMethod: "Volatile"}, - _jsii_.MemberProperty{JsiiProperty: "while", GoGetter: "While"}, - }, - func() interface{} { - return &jsiiProxy_IJavaReservedWordsInAnInterface{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IJsii487External", - reflect.TypeOf((*IJsii487External)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_IJsii487External{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IJsii487External2", - reflect.TypeOf((*IJsii487External2)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_IJsii487External2{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IJsii496", - reflect.TypeOf((*IJsii496)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_IJsii496{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IMutableObjectLiteral", - reflect.TypeOf((*IMutableObjectLiteral)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - }, - func() interface{} { - return &jsiiProxy_IMutableObjectLiteral{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.INonInternalInterface", - reflect.TypeOf((*INonInternalInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"}, - _jsii_.MemberProperty{JsiiProperty: "b", GoGetter: "B"}, - _jsii_.MemberProperty{JsiiProperty: "c", GoGetter: "C"}, - }, - func() interface{} { - j := jsiiProxy_INonInternalInterface{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IAnotherPublicInterface) - return &j - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IObjectWithProperty", - reflect.TypeOf((*IObjectWithProperty)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, - _jsii_.MemberMethod{JsiiMethod: "wasSet", GoMethod: "WasSet"}, - }, - func() interface{} { - return &jsiiProxy_IObjectWithProperty{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IOptionalMethod", - reflect.TypeOf((*IOptionalMethod)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "optional", GoMethod: "Optional"}, - }, - func() interface{} { - return &jsiiProxy_IOptionalMethod{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IPrivatelyImplemented", - reflect.TypeOf((*IPrivatelyImplemented)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "success", GoGetter: "Success"}, - }, - func() interface{} { - return &jsiiProxy_IPrivatelyImplemented{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IPublicInterface", - reflect.TypeOf((*IPublicInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "bye", GoMethod: "Bye"}, - }, - func() interface{} { - return &jsiiProxy_IPublicInterface{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IPublicInterface2", - reflect.TypeOf((*IPublicInterface2)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "ciao", GoMethod: "Ciao"}, - }, - func() interface{} { - return &jsiiProxy_IPublicInterface2{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IRandomNumberGenerator", - reflect.TypeOf((*IRandomNumberGenerator)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"}, - }, - func() interface{} { - return &jsiiProxy_IRandomNumberGenerator{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IReturnJsii976", - reflect.TypeOf((*IReturnJsii976)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "foo", GoGetter: "Foo"}, - }, - func() interface{} { - return &jsiiProxy_IReturnJsii976{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IReturnsNumber", - reflect.TypeOf((*IReturnsNumber)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "numberProp", GoGetter: "NumberProp"}, - _jsii_.MemberMethod{JsiiMethod: "obtainNumber", GoMethod: "ObtainNumber"}, - }, - func() interface{} { - return &jsiiProxy_IReturnsNumber{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IStableInterface", - reflect.TypeOf((*IStableInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, - }, - func() interface{} { - return &jsiiProxy_IStableInterface{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IStructReturningDelegate", - reflect.TypeOf((*IStructReturningDelegate)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "returnStruct", GoMethod: "ReturnStruct"}, - }, - func() interface{} { - return &jsiiProxy_IStructReturningDelegate{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.IWallClock", - reflect.TypeOf((*IWallClock)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "iso8601Now", GoMethod: "Iso8601Now"}, - }, - func() interface{} { - return &jsiiProxy_IWallClock{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.ImplementInternalInterface", - reflect.TypeOf((*ImplementInternalInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "prop", GoGetter: "Prop"}, - }, - func() interface{} { - return &jsiiProxy_ImplementInternalInterface{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.Implementation", - reflect.TypeOf((*Implementation)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - }, - func() interface{} { - return &jsiiProxy_Implementation{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.ImplementsInterfaceWithInternal", - reflect.TypeOf((*ImplementsInterfaceWithInternal)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "visible", GoMethod: "Visible"}, - }, - func() interface{} { - j := jsiiProxy_ImplementsInterfaceWithInternal{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceWithInternal) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.ImplementsInterfaceWithInternalSubclass", - reflect.TypeOf((*ImplementsInterfaceWithInternalSubclass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "visible", GoMethod: "Visible"}, - }, - func() interface{} { - j := jsiiProxy_ImplementsInterfaceWithInternalSubclass{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_ImplementsInterfaceWithInternal) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.ImplementsPrivateInterface", - reflect.TypeOf((*ImplementsPrivateInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "private", GoGetter: "Private"}, - }, - func() interface{} { - return &jsiiProxy_ImplementsPrivateInterface{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.ImplictBaseOfBase", - reflect.TypeOf((*ImplictBaseOfBase)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.InbetweenClass", - reflect.TypeOf((*InbetweenClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "ciao", GoMethod: "Ciao"}, - _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, - }, - func() interface{} { - j := jsiiProxy_InbetweenClass{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_PublicClass) - _jsii_.InitJsiiProxy(&j.jsiiProxy_IPublicInterface2) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.InterfaceCollections", - reflect.TypeOf((*InterfaceCollections)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_InterfaceCollections{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.InterfacesMaker", - reflect.TypeOf((*InterfacesMaker)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_InterfacesMaker{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.Isomorphism", - reflect.TypeOf((*Isomorphism)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "myself", GoMethod: "Myself"}, - }, - func() interface{} { - return &jsiiProxy_Isomorphism{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.Issue2638", - reflect.TypeOf((*Issue2638)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_Issue2638{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.Issue2638B", - reflect.TypeOf((*Issue2638B)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_Issue2638B{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.JSII417Derived", - reflect.TypeOf((*JSII417Derived)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, - _jsii_.MemberMethod{JsiiMethod: "baz", GoMethod: "Baz"}, - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, - _jsii_.MemberProperty{JsiiProperty: "hasRoot", GoGetter: "HasRoot"}, - _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, - }, - func() interface{} { - j := jsiiProxy_JSII417Derived{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_JSII417PublicBaseOfBase) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.JSII417PublicBaseOfBase", - reflect.TypeOf((*JSII417PublicBaseOfBase)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, - _jsii_.MemberProperty{JsiiProperty: "hasRoot", GoGetter: "HasRoot"}, - }, - func() interface{} { - return &jsiiProxy_JSII417PublicBaseOfBase{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.JSObjectLiteralForInterface", - reflect.TypeOf((*JSObjectLiteralForInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "giveMeFriendly", GoMethod: "GiveMeFriendly"}, - _jsii_.MemberMethod{JsiiMethod: "giveMeFriendlyGenerator", GoMethod: "GiveMeFriendlyGenerator"}, - }, - func() interface{} { - return &jsiiProxy_JSObjectLiteralForInterface{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.JSObjectLiteralToNative", - reflect.TypeOf((*JSObjectLiteralToNative)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "returnLiteral", GoMethod: "ReturnLiteral"}, - }, - func() interface{} { - return &jsiiProxy_JSObjectLiteralToNative{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.JSObjectLiteralToNativeClass", - reflect.TypeOf((*JSObjectLiteralToNativeClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "propA", GoGetter: "PropA"}, - _jsii_.MemberProperty{JsiiProperty: "propB", GoGetter: "PropB"}, - }, - func() interface{} { - return &jsiiProxy_JSObjectLiteralToNativeClass{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.JavaReservedWords", - reflect.TypeOf((*JavaReservedWords)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "abstract", GoMethod: "Abstract"}, - _jsii_.MemberMethod{JsiiMethod: "assert", GoMethod: "Assert"}, - _jsii_.MemberMethod{JsiiMethod: "boolean", GoMethod: "Boolean"}, - _jsii_.MemberMethod{JsiiMethod: "break", GoMethod: "Break"}, - _jsii_.MemberMethod{JsiiMethod: "byte", GoMethod: "Byte"}, - _jsii_.MemberMethod{JsiiMethod: "case", GoMethod: "Case"}, - _jsii_.MemberMethod{JsiiMethod: "catch", GoMethod: "Catch"}, - _jsii_.MemberMethod{JsiiMethod: "char", GoMethod: "Char"}, - _jsii_.MemberMethod{JsiiMethod: "class", GoMethod: "Class"}, - _jsii_.MemberMethod{JsiiMethod: "const", GoMethod: "Const"}, - _jsii_.MemberMethod{JsiiMethod: "continue", GoMethod: "Continue"}, - _jsii_.MemberMethod{JsiiMethod: "default", GoMethod: "Default"}, - _jsii_.MemberMethod{JsiiMethod: "do", GoMethod: "Do"}, - _jsii_.MemberMethod{JsiiMethod: "double", GoMethod: "Double"}, - _jsii_.MemberMethod{JsiiMethod: "else", GoMethod: "Else"}, - _jsii_.MemberMethod{JsiiMethod: "enum", GoMethod: "Enum"}, - _jsii_.MemberMethod{JsiiMethod: "extends", GoMethod: "Extends"}, - _jsii_.MemberMethod{JsiiMethod: "false", GoMethod: "False"}, - _jsii_.MemberMethod{JsiiMethod: "final", GoMethod: "Final"}, - _jsii_.MemberMethod{JsiiMethod: "finally", GoMethod: "Finally"}, - _jsii_.MemberMethod{JsiiMethod: "float", GoMethod: "Float"}, - _jsii_.MemberMethod{JsiiMethod: "for", GoMethod: "For"}, - _jsii_.MemberMethod{JsiiMethod: "goto", GoMethod: "Goto"}, - _jsii_.MemberMethod{JsiiMethod: "if", GoMethod: "If"}, - _jsii_.MemberMethod{JsiiMethod: "implements", GoMethod: "Implements"}, - _jsii_.MemberMethod{JsiiMethod: "import", GoMethod: "Import"}, - _jsii_.MemberMethod{JsiiMethod: "instanceof", GoMethod: "Instanceof"}, - _jsii_.MemberMethod{JsiiMethod: "int", GoMethod: "Int"}, - _jsii_.MemberMethod{JsiiMethod: "interface", GoMethod: "Interface"}, - _jsii_.MemberMethod{JsiiMethod: "long", GoMethod: "Long"}, - _jsii_.MemberMethod{JsiiMethod: "native", GoMethod: "Native"}, - _jsii_.MemberMethod{JsiiMethod: "new", GoMethod: "New"}, - _jsii_.MemberMethod{JsiiMethod: "null", GoMethod: "Null"}, - _jsii_.MemberMethod{JsiiMethod: "package", GoMethod: "Package"}, - _jsii_.MemberMethod{JsiiMethod: "private", GoMethod: "Private"}, - _jsii_.MemberMethod{JsiiMethod: "protected", GoMethod: "Protected"}, - _jsii_.MemberMethod{JsiiMethod: "public", GoMethod: "Public"}, - _jsii_.MemberMethod{JsiiMethod: "return", GoMethod: "Return"}, - _jsii_.MemberMethod{JsiiMethod: "short", GoMethod: "Short"}, - _jsii_.MemberMethod{JsiiMethod: "static", GoMethod: "Static"}, - _jsii_.MemberMethod{JsiiMethod: "strictfp", GoMethod: "Strictfp"}, - _jsii_.MemberMethod{JsiiMethod: "super", GoMethod: "Super"}, - _jsii_.MemberMethod{JsiiMethod: "switch", GoMethod: "Switch"}, - _jsii_.MemberMethod{JsiiMethod: "synchronized", GoMethod: "Synchronized"}, - _jsii_.MemberMethod{JsiiMethod: "this", GoMethod: "This"}, - _jsii_.MemberMethod{JsiiMethod: "throw", GoMethod: "Throw"}, - _jsii_.MemberMethod{JsiiMethod: "throws", GoMethod: "Throws"}, - _jsii_.MemberMethod{JsiiMethod: "transient", GoMethod: "Transient"}, - _jsii_.MemberMethod{JsiiMethod: "true", GoMethod: "True"}, - _jsii_.MemberMethod{JsiiMethod: "try", GoMethod: "Try"}, - _jsii_.MemberMethod{JsiiMethod: "void", GoMethod: "Void"}, - _jsii_.MemberMethod{JsiiMethod: "volatile", GoMethod: "Volatile"}, - _jsii_.MemberProperty{JsiiProperty: "while", GoGetter: "While"}, - }, - func() interface{} { - return &jsiiProxy_JavaReservedWords{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.Jsii487Derived", - reflect.TypeOf((*Jsii487Derived)(nil)).Elem(), - nil, // no members - func() interface{} { - j := jsiiProxy_Jsii487Derived{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IJsii487External) - _jsii_.InitJsiiProxy(&j.jsiiProxy_IJsii487External2) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.Jsii496Derived", - reflect.TypeOf((*Jsii496Derived)(nil)).Elem(), - nil, // no members - func() interface{} { - j := jsiiProxy_Jsii496Derived{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IJsii496) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.JsiiAgent", - reflect.TypeOf((*JsiiAgent)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_JsiiAgent{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.JsonFormatter", - reflect.TypeOf((*JsonFormatter)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_JsonFormatter{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.LevelOne", - reflect.TypeOf((*LevelOne)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "props", GoGetter: "Props"}, - }, - func() interface{} { - return &jsiiProxy_LevelOne{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.LevelOne.PropBooleanValue", - reflect.TypeOf((*LevelOne_PropBooleanValue)(nil)).Elem(), - ) - _jsii_.RegisterStruct( - "jsii-calc.LevelOne.PropProperty", - reflect.TypeOf((*LevelOne_PropProperty)(nil)).Elem(), - ) - _jsii_.RegisterStruct( - "jsii-calc.LevelOneProps", - reflect.TypeOf((*LevelOneProps)(nil)).Elem(), - ) - _jsii_.RegisterStruct( - "jsii-calc.LoadBalancedFargateServiceProps", - reflect.TypeOf((*LoadBalancedFargateServiceProps)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.MethodNamedProperty", - reflect.TypeOf((*MethodNamedProperty)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "elite", GoGetter: "Elite"}, - _jsii_.MemberMethod{JsiiMethod: "property", GoMethod: "Property"}, - }, - func() interface{} { - return &jsiiProxy_MethodNamedProperty{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.Multiply", - reflect.TypeOf((*Multiply)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "farewell", GoMethod: "Farewell"}, - _jsii_.MemberMethod{JsiiMethod: "goodbye", GoMethod: "Goodbye"}, - _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, - _jsii_.MemberProperty{JsiiProperty: "lhs", GoGetter: "Lhs"}, - _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"}, - _jsii_.MemberProperty{JsiiProperty: "rhs", GoGetter: "Rhs"}, - _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, - _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - }, - func() interface{} { - j := jsiiProxy_Multiply{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_BinaryOperation) - _jsii_.InitJsiiProxy(&j.jsiiProxy_IFriendlier) - _jsii_.InitJsiiProxy(&j.jsiiProxy_IRandomNumberGenerator) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.Negate", - reflect.TypeOf((*Negate)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "farewell", GoMethod: "Farewell"}, - _jsii_.MemberMethod{JsiiMethod: "goodbye", GoMethod: "Goodbye"}, - _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, - _jsii_.MemberProperty{JsiiProperty: "operand", GoGetter: "Operand"}, - _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, - _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - }, - func() interface{} { - j := jsiiProxy_Negate{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_UnaryOperation) - _jsii_.InitJsiiProxy(&j.jsiiProxy_IFriendlier) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.NestedClassInstance", - reflect.TypeOf((*NestedClassInstance)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_NestedClassInstance{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.NestedStruct", - reflect.TypeOf((*NestedStruct)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.NodeStandardLibrary", - reflect.TypeOf((*NodeStandardLibrary)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "cryptoSha256", GoMethod: "CryptoSha256"}, - _jsii_.MemberMethod{JsiiMethod: "fsReadFile", GoMethod: "FsReadFile"}, - _jsii_.MemberMethod{JsiiMethod: "fsReadFileSync", GoMethod: "FsReadFileSync"}, - _jsii_.MemberProperty{JsiiProperty: "osPlatform", GoGetter: "OsPlatform"}, - }, - func() interface{} { - return &jsiiProxy_NodeStandardLibrary{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.NullShouldBeTreatedAsUndefined", - reflect.TypeOf((*NullShouldBeTreatedAsUndefined)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "changeMeToUndefined", GoGetter: "ChangeMeToUndefined"}, - _jsii_.MemberMethod{JsiiMethod: "giveMeUndefined", GoMethod: "GiveMeUndefined"}, - _jsii_.MemberMethod{JsiiMethod: "giveMeUndefinedInsideAnObject", GoMethod: "GiveMeUndefinedInsideAnObject"}, - _jsii_.MemberMethod{JsiiMethod: "verifyPropertyIsUndefined", GoMethod: "VerifyPropertyIsUndefined"}, - }, - func() interface{} { - return &jsiiProxy_NullShouldBeTreatedAsUndefined{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.NullShouldBeTreatedAsUndefinedData", - reflect.TypeOf((*NullShouldBeTreatedAsUndefinedData)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.NumberGenerator", - reflect.TypeOf((*NumberGenerator)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "generator", GoGetter: "Generator"}, - _jsii_.MemberMethod{JsiiMethod: "isSameGenerator", GoMethod: "IsSameGenerator"}, - _jsii_.MemberMethod{JsiiMethod: "nextTimes100", GoMethod: "NextTimes100"}, - }, - func() interface{} { - return &jsiiProxy_NumberGenerator{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.ObjectRefsInCollections", - reflect.TypeOf((*ObjectRefsInCollections)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "sumFromArray", GoMethod: "SumFromArray"}, - _jsii_.MemberMethod{JsiiMethod: "sumFromMap", GoMethod: "SumFromMap"}, - }, - func() interface{} { - return &jsiiProxy_ObjectRefsInCollections{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.ObjectWithPropertyProvider", - reflect.TypeOf((*ObjectWithPropertyProvider)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_ObjectWithPropertyProvider{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.Old", - reflect.TypeOf((*Old)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "doAThing", GoMethod: "DoAThing"}, - }, - func() interface{} { - return &jsiiProxy_Old{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.OptionalArgumentInvoker", - reflect.TypeOf((*OptionalArgumentInvoker)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "invokeWithOptional", GoMethod: "InvokeWithOptional"}, - _jsii_.MemberMethod{JsiiMethod: "invokeWithoutOptional", GoMethod: "InvokeWithoutOptional"}, - }, - func() interface{} { - return &jsiiProxy_OptionalArgumentInvoker{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.OptionalConstructorArgument", - reflect.TypeOf((*OptionalConstructorArgument)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "arg1", GoGetter: "Arg1"}, - _jsii_.MemberProperty{JsiiProperty: "arg2", GoGetter: "Arg2"}, - _jsii_.MemberProperty{JsiiProperty: "arg3", GoGetter: "Arg3"}, - }, - func() interface{} { - return &jsiiProxy_OptionalConstructorArgument{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.OptionalStruct", - reflect.TypeOf((*OptionalStruct)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.OptionalStructConsumer", - reflect.TypeOf((*OptionalStructConsumer)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "fieldValue", GoGetter: "FieldValue"}, - _jsii_.MemberProperty{JsiiProperty: "parameterWasUndefined", GoGetter: "ParameterWasUndefined"}, - }, - func() interface{} { - return &jsiiProxy_OptionalStructConsumer{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.OverridableProtectedMember", - reflect.TypeOf((*OverridableProtectedMember)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "overrideMe", GoMethod: "OverrideMe"}, - _jsii_.MemberProperty{JsiiProperty: "overrideReadOnly", GoGetter: "OverrideReadOnly"}, - _jsii_.MemberProperty{JsiiProperty: "overrideReadWrite", GoGetter: "OverrideReadWrite"}, - _jsii_.MemberMethod{JsiiMethod: "switchModes", GoMethod: "SwitchModes"}, - _jsii_.MemberMethod{JsiiMethod: "valueFromProtected", GoMethod: "ValueFromProtected"}, - }, - func() interface{} { - return &jsiiProxy_OverridableProtectedMember{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.OverrideReturnsObject", - reflect.TypeOf((*OverrideReturnsObject)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "test", GoMethod: "Test"}, - }, - func() interface{} { - return &jsiiProxy_OverrideReturnsObject{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.ParamShadowsBuiltins", - reflect.TypeOf((*ParamShadowsBuiltins)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_ParamShadowsBuiltins{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.ParamShadowsBuiltinsProps", - reflect.TypeOf((*ParamShadowsBuiltinsProps)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.ParamShadowsScope", - reflect.TypeOf((*ParamShadowsScope)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "useScope", GoMethod: "UseScope"}, - }, - func() interface{} { - return &jsiiProxy_ParamShadowsScope{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.ParentStruct982", - reflect.TypeOf((*ParentStruct982)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.PartiallyInitializedThisConsumer", - reflect.TypeOf((*PartiallyInitializedThisConsumer)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "consumePartiallyInitializedThis", GoMethod: "ConsumePartiallyInitializedThis"}, - }, - func() interface{} { - return &jsiiProxy_PartiallyInitializedThisConsumer{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.Polymorphism", - reflect.TypeOf((*Polymorphism)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "sayHello", GoMethod: "SayHello"}, - }, - func() interface{} { - return &jsiiProxy_Polymorphism{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.Power", - reflect.TypeOf((*Power)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "base", GoGetter: "Base"}, - _jsii_.MemberProperty{JsiiProperty: "decorationPostfixes", GoGetter: "DecorationPostfixes"}, - _jsii_.MemberProperty{JsiiProperty: "decorationPrefixes", GoGetter: "DecorationPrefixes"}, - _jsii_.MemberProperty{JsiiProperty: "expression", GoGetter: "Expression"}, - _jsii_.MemberProperty{JsiiProperty: "pow", GoGetter: "Pow"}, - _jsii_.MemberProperty{JsiiProperty: "stringStyle", GoGetter: "StringStyle"}, - _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, - _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - }, - func() interface{} { - j := jsiiProxy_Power{} - _jsii_.InitJsiiProxy(&j.Type__compositionCompositeOperation) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.PromiseNothing", - reflect.TypeOf((*PromiseNothing)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "instancePromiseIt", GoMethod: "InstancePromiseIt"}, - }, - func() interface{} { - return &jsiiProxy_PromiseNothing{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.PropertyNamedProperty", - reflect.TypeOf((*PropertyNamedProperty)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, - _jsii_.MemberProperty{JsiiProperty: "yetAnoterOne", GoGetter: "YetAnoterOne"}, - }, - func() interface{} { - return &jsiiProxy_PropertyNamedProperty{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.PublicClass", - reflect.TypeOf((*PublicClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, - }, - func() interface{} { - return &jsiiProxy_PublicClass{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.PythonReservedWords", - reflect.TypeOf((*PythonReservedWords)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "and", GoMethod: "And"}, - _jsii_.MemberMethod{JsiiMethod: "as", GoMethod: "As"}, - _jsii_.MemberMethod{JsiiMethod: "assert", GoMethod: "Assert"}, - _jsii_.MemberMethod{JsiiMethod: "async", GoMethod: "Async"}, - _jsii_.MemberMethod{JsiiMethod: "await", GoMethod: "Await"}, - _jsii_.MemberMethod{JsiiMethod: "break", GoMethod: "Break"}, - _jsii_.MemberMethod{JsiiMethod: "class", GoMethod: "Class"}, - _jsii_.MemberMethod{JsiiMethod: "continue", GoMethod: "Continue"}, - _jsii_.MemberMethod{JsiiMethod: "def", GoMethod: "Def"}, - _jsii_.MemberMethod{JsiiMethod: "del", GoMethod: "Del"}, - _jsii_.MemberMethod{JsiiMethod: "elif", GoMethod: "Elif"}, - _jsii_.MemberMethod{JsiiMethod: "else", GoMethod: "Else"}, - _jsii_.MemberMethod{JsiiMethod: "except", GoMethod: "Except"}, - _jsii_.MemberMethod{JsiiMethod: "finally", GoMethod: "Finally"}, - _jsii_.MemberMethod{JsiiMethod: "for", GoMethod: "For"}, - _jsii_.MemberMethod{JsiiMethod: "from", GoMethod: "From"}, - _jsii_.MemberMethod{JsiiMethod: "global", GoMethod: "Global"}, - _jsii_.MemberMethod{JsiiMethod: "if", GoMethod: "If"}, - _jsii_.MemberMethod{JsiiMethod: "import", GoMethod: "Import"}, - _jsii_.MemberMethod{JsiiMethod: "in", GoMethod: "In"}, - _jsii_.MemberMethod{JsiiMethod: "is", GoMethod: "Is"}, - _jsii_.MemberMethod{JsiiMethod: "lambda", GoMethod: "Lambda"}, - _jsii_.MemberMethod{JsiiMethod: "nonlocal", GoMethod: "Nonlocal"}, - _jsii_.MemberMethod{JsiiMethod: "not", GoMethod: "Not"}, - _jsii_.MemberMethod{JsiiMethod: "or", GoMethod: "Or"}, - _jsii_.MemberMethod{JsiiMethod: "pass", GoMethod: "Pass"}, - _jsii_.MemberMethod{JsiiMethod: "raise", GoMethod: "Raise"}, - _jsii_.MemberMethod{JsiiMethod: "return", GoMethod: "Return"}, - _jsii_.MemberMethod{JsiiMethod: "try", GoMethod: "Try"}, - _jsii_.MemberMethod{JsiiMethod: "while", GoMethod: "While"}, - _jsii_.MemberMethod{JsiiMethod: "with", GoMethod: "With"}, - _jsii_.MemberMethod{JsiiMethod: "yield", GoMethod: "Yield"}, - }, - func() interface{} { - return &jsiiProxy_PythonReservedWords{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.ReferenceEnumFromScopedPackage", - reflect.TypeOf((*ReferenceEnumFromScopedPackage)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "foo", GoGetter: "Foo"}, - _jsii_.MemberMethod{JsiiMethod: "loadFoo", GoMethod: "LoadFoo"}, - _jsii_.MemberMethod{JsiiMethod: "saveFoo", GoMethod: "SaveFoo"}, - }, - func() interface{} { - return &jsiiProxy_ReferenceEnumFromScopedPackage{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.ReturnsPrivateImplementationOfInterface", - reflect.TypeOf((*ReturnsPrivateImplementationOfInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "privateImplementation", GoGetter: "PrivateImplementation"}, - }, - func() interface{} { - return &jsiiProxy_ReturnsPrivateImplementationOfInterface{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.RootStruct", - reflect.TypeOf((*RootStruct)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.RootStructValidator", - reflect.TypeOf((*RootStructValidator)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_RootStructValidator{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.RuntimeTypeChecking", - reflect.TypeOf((*RuntimeTypeChecking)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "methodWithDefaultedArguments", GoMethod: "MethodWithDefaultedArguments"}, - _jsii_.MemberMethod{JsiiMethod: "methodWithOptionalAnyArgument", GoMethod: "MethodWithOptionalAnyArgument"}, - _jsii_.MemberMethod{JsiiMethod: "methodWithOptionalArguments", GoMethod: "MethodWithOptionalArguments"}, - }, - func() interface{} { - return &jsiiProxy_RuntimeTypeChecking{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.SecondLevelStruct", - reflect.TypeOf((*SecondLevelStruct)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.SingleInstanceTwoTypes", - reflect.TypeOf((*SingleInstanceTwoTypes)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "interface1", GoMethod: "Interface1"}, - _jsii_.MemberMethod{JsiiMethod: "interface2", GoMethod: "Interface2"}, - }, - func() interface{} { - return &jsiiProxy_SingleInstanceTwoTypes{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.SingletonInt", - reflect.TypeOf((*SingletonInt)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "isSingletonInt", GoMethod: "IsSingletonInt"}, - }, - func() interface{} { - return &jsiiProxy_SingletonInt{} - }, - ) - _jsii_.RegisterEnum( - "jsii-calc.SingletonIntEnum", - reflect.TypeOf((*SingletonIntEnum)(nil)).Elem(), - map[string]interface{}{ - "SINGLETON_INT": SingletonIntEnum_SINGLETON_INT, - }, - ) - _jsii_.RegisterClass( - "jsii-calc.SingletonString", - reflect.TypeOf((*SingletonString)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "isSingletonString", GoMethod: "IsSingletonString"}, - }, - func() interface{} { - return &jsiiProxy_SingletonString{} - }, - ) - _jsii_.RegisterEnum( - "jsii-calc.SingletonStringEnum", - reflect.TypeOf((*SingletonStringEnum)(nil)).Elem(), - map[string]interface{}{ - "SINGLETON_STRING": SingletonStringEnum_SINGLETON_STRING, - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.SmellyStruct", - reflect.TypeOf((*SmellyStruct)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.SomeTypeJsii976", - reflect.TypeOf((*SomeTypeJsii976)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_SomeTypeJsii976{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.StableClass", - reflect.TypeOf((*StableClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, - _jsii_.MemberProperty{JsiiProperty: "readonlyProperty", GoGetter: "ReadonlyProperty"}, - }, - func() interface{} { - return &jsiiProxy_StableClass{} - }, - ) - _jsii_.RegisterEnum( - "jsii-calc.StableEnum", - reflect.TypeOf((*StableEnum)(nil)).Elem(), - map[string]interface{}{ - "OPTION_A": StableEnum_OPTION_A, - "OPTION_B": StableEnum_OPTION_B, - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.StableStruct", - reflect.TypeOf((*StableStruct)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.StaticContext", - reflect.TypeOf((*StaticContext)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_StaticContext{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.StaticHelloChild", - reflect.TypeOf((*StaticHelloChild)(nil)).Elem(), - nil, // no members - func() interface{} { - j := jsiiProxy_StaticHelloChild{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_StaticHelloParent) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.StaticHelloParent", - reflect.TypeOf((*StaticHelloParent)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_StaticHelloParent{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.Statics", - reflect.TypeOf((*Statics)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "justMethod", GoMethod: "JustMethod"}, - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - }, - func() interface{} { - return &jsiiProxy_Statics{} - }, - ) - _jsii_.RegisterEnum( - "jsii-calc.StringEnum", - reflect.TypeOf((*StringEnum)(nil)).Elem(), - map[string]interface{}{ - "A": StringEnum_A, - "B": StringEnum_B, - "C": StringEnum_C, - }, - ) - _jsii_.RegisterClass( - "jsii-calc.StripInternal", - reflect.TypeOf((*StripInternal)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "youSeeMe", GoGetter: "YouSeeMe"}, - }, - func() interface{} { - return &jsiiProxy_StripInternal{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.StructA", - reflect.TypeOf((*StructA)(nil)).Elem(), - ) - _jsii_.RegisterStruct( - "jsii-calc.StructB", - reflect.TypeOf((*StructB)(nil)).Elem(), - ) - _jsii_.RegisterStruct( - "jsii-calc.StructParameterType", - reflect.TypeOf((*StructParameterType)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.StructPassing", - reflect.TypeOf((*StructPassing)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_StructPassing{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.StructUnionConsumer", - reflect.TypeOf((*StructUnionConsumer)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_StructUnionConsumer{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.StructWithCollectionOfUnionts", - reflect.TypeOf((*StructWithCollectionOfUnionts)(nil)).Elem(), - ) - _jsii_.RegisterStruct( - "jsii-calc.StructWithEnum", - reflect.TypeOf((*StructWithEnum)(nil)).Elem(), + + return returns +} + +// It's dangerous to go alone! +func Demonstrate982_TakeThisToo() *ParentStruct982 { + _init_.Initialize() + + var returns *ParentStruct982 + + _jsii_.StaticInvoke( + "jsii-calc.Demonstrate982", + "takeThisToo", + nil, // no parameters + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.StructWithJavaReservedWords", - reflect.TypeOf((*StructWithJavaReservedWords)(nil)).Elem(), + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DeprecatedClass.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +// Deprecated: a pretty boring class. +type DeprecatedClass interface { + // Deprecated: shouldn't have been mutable. + MutableProperty() *float64 + // Deprecated: shouldn't have been mutable. + SetMutableProperty(val *float64) + // Deprecated: this is not always "wazoo", be ready to be disappointed. + ReadonlyProperty() *string + // Deprecated: it was a bad idea. + Method() +} + +// The jsii proxy struct for DeprecatedClass +type jsiiProxy_DeprecatedClass struct { + _ byte // padding +} + +func (j *jsiiProxy_DeprecatedClass) MutableProperty() *float64 { + var returns *float64 + _jsii_.Get( + j, + "mutableProperty", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.Sum", - reflect.TypeOf((*Sum)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "decorationPostfixes", GoGetter: "DecorationPostfixes"}, - _jsii_.MemberProperty{JsiiProperty: "decorationPrefixes", GoGetter: "DecorationPrefixes"}, - _jsii_.MemberProperty{JsiiProperty: "expression", GoGetter: "Expression"}, - _jsii_.MemberProperty{JsiiProperty: "parts", GoGetter: "Parts"}, - _jsii_.MemberProperty{JsiiProperty: "stringStyle", GoGetter: "StringStyle"}, - _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, - _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - }, - func() interface{} { - j := jsiiProxy_Sum{} - _jsii_.InitJsiiProxy(&j.Type__compositionCompositeOperation) - return &j - }, + return returns +} + +func (j *jsiiProxy_DeprecatedClass) ReadonlyProperty() *string { + var returns *string + _jsii_.Get( + j, + "readonlyProperty", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.SupportsNiceJavaBuilder", - reflect.TypeOf((*SupportsNiceJavaBuilder)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "bar", GoGetter: "Bar"}, - _jsii_.MemberProperty{JsiiProperty: "id", GoGetter: "Id"}, - _jsii_.MemberProperty{JsiiProperty: "propId", GoGetter: "PropId"}, - _jsii_.MemberProperty{JsiiProperty: "rest", GoGetter: "Rest"}, - }, - func() interface{} { - j := jsiiProxy_SupportsNiceJavaBuilder{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps) - return &j - }, + return returns +} + + +// Deprecated: this constructor is "just" okay. +func NewDeprecatedClass(readonlyString *string, mutableNumber *float64) DeprecatedClass { + _init_.Initialize() + + j := jsiiProxy_DeprecatedClass{} + + _jsii_.Create( + "jsii-calc.DeprecatedClass", + []interface{}{readonlyString, mutableNumber}, + &j, ) - _jsii_.RegisterStruct( - "jsii-calc.SupportsNiceJavaBuilderProps", - reflect.TypeOf((*SupportsNiceJavaBuilderProps)(nil)).Elem(), + + return &j +} + +// Deprecated: this constructor is "just" okay. +func NewDeprecatedClass_Override(d DeprecatedClass, readonlyString *string, mutableNumber *float64) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.DeprecatedClass", + []interface{}{readonlyString, mutableNumber}, + d, ) - _jsii_.RegisterClass( - "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", - reflect.TypeOf((*SupportsNiceJavaBuilderWithRequiredProps)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "bar", GoGetter: "Bar"}, - _jsii_.MemberProperty{JsiiProperty: "id", GoGetter: "Id"}, - _jsii_.MemberProperty{JsiiProperty: "propId", GoGetter: "PropId"}, - }, - func() interface{} { - return &jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps{} - }, +} + +func (j *jsiiProxy_DeprecatedClass)SetMutableProperty(val *float64) { + _jsii_.Set( + j, + "mutableProperty", + val, ) - _jsii_.RegisterClass( - "jsii-calc.SyncVirtualMethods", - reflect.TypeOf((*SyncVirtualMethods)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"}, - _jsii_.MemberMethod{JsiiMethod: "callerIsAsync", GoMethod: "CallerIsAsync"}, - _jsii_.MemberMethod{JsiiMethod: "callerIsMethod", GoMethod: "CallerIsMethod"}, - _jsii_.MemberProperty{JsiiProperty: "callerIsProperty", GoGetter: "CallerIsProperty"}, - _jsii_.MemberMethod{JsiiMethod: "modifyOtherProperty", GoMethod: "ModifyOtherProperty"}, - _jsii_.MemberMethod{JsiiMethod: "modifyValueOfTheProperty", GoMethod: "ModifyValueOfTheProperty"}, - _jsii_.MemberProperty{JsiiProperty: "otherProperty", GoGetter: "OtherProperty"}, - _jsii_.MemberMethod{JsiiMethod: "readA", GoMethod: "ReadA"}, - _jsii_.MemberProperty{JsiiProperty: "readonlyProperty", GoGetter: "ReadonlyProperty"}, - _jsii_.MemberMethod{JsiiMethod: "retrieveOtherProperty", GoMethod: "RetrieveOtherProperty"}, - _jsii_.MemberMethod{JsiiMethod: "retrieveReadOnlyProperty", GoMethod: "RetrieveReadOnlyProperty"}, - _jsii_.MemberMethod{JsiiMethod: "retrieveValueOfTheProperty", GoMethod: "RetrieveValueOfTheProperty"}, - _jsii_.MemberProperty{JsiiProperty: "theProperty", GoGetter: "TheProperty"}, - _jsii_.MemberProperty{JsiiProperty: "valueOfOtherProperty", GoGetter: "ValueOfOtherProperty"}, - _jsii_.MemberMethod{JsiiMethod: "virtualMethod", GoMethod: "VirtualMethod"}, - _jsii_.MemberMethod{JsiiMethod: "writeA", GoMethod: "WriteA"}, - }, - func() interface{} { - return &jsiiProxy_SyncVirtualMethods{} - }, +} + +func (d *jsiiProxy_DeprecatedClass) Method() { + _jsii_.InvokeVoid( + d, + "method", + nil, // no parameters ) - _jsii_.RegisterClass( - "jsii-calc.TestStructWithEnum", - reflect.TypeOf((*TestStructWithEnum)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "isStringEnumA", GoMethod: "IsStringEnumA"}, - _jsii_.MemberMethod{JsiiMethod: "isStringEnumB", GoMethod: "IsStringEnumB"}, - _jsii_.MemberProperty{JsiiProperty: "structWithFoo", GoGetter: "StructWithFoo"}, - _jsii_.MemberProperty{JsiiProperty: "structWithFooBar", GoGetter: "StructWithFooBar"}, - }, - func() interface{} { - return &jsiiProxy_TestStructWithEnum{} - }, +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DeprecatedEnum.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +// Deprecated: your deprecated selection of bad options. +type DeprecatedEnum string + +const ( + // Deprecated: option A is not great. + DeprecatedEnum_OPTION_A DeprecatedEnum = "OPTION_A" + // Deprecated: option B is kinda bad, too. + DeprecatedEnum_OPTION_B DeprecatedEnum = "OPTION_B" +) + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DeprecatedStruct.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +// Deprecated: it just wraps a string. +type DeprecatedStruct struct { + // Deprecated: well, yeah. + ReadonlyProperty *string \`field:"required" json:"readonlyProperty" yaml:"readonlyProperty"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DerivedStruct.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + "time" + + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + +// A struct which derives from another struct. +type DerivedStruct struct { + // An awesome number value. + // Deprecated. + Anumber *float64 \`field:"required" json:"anumber" yaml:"anumber"\` + // A string value. + // Deprecated. + Astring *string \`field:"required" json:"astring" yaml:"astring"\` + // Deprecated. + FirstOptional *[]*string \`field:"optional" json:"firstOptional" yaml:"firstOptional"\` + AnotherRequired *time.Time \`field:"required" json:"anotherRequired" yaml:"anotherRequired"\` + Bool *bool \`field:"required" json:"bool" yaml:"bool"\` + // An example of a non primitive property. + NonPrimitive DoubleTrouble \`field:"required" json:"nonPrimitive" yaml:"nonPrimitive"\` + // This is optional. + AnotherOptional *map[string]scopejsiicalclib.NumericValue \`field:"optional" json:"anotherOptional" yaml:"anotherOptional"\` + OptionalAny interface{} \`field:"optional" json:"optionalAny" yaml:"optionalAny"\` + OptionalArray *[]*string \`field:"optional" json:"optionalArray" yaml:"optionalArray"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DiamondBottom.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + "time" +) + +type DiamondBottom struct { + // Deprecated. + HoistedTop *string \`field:"optional" json:"hoistedTop" yaml:"hoistedTop"\` + // Deprecated. + Left *float64 \`field:"optional" json:"left" yaml:"left"\` + // Deprecated. + Right *bool \`field:"optional" json:"right" yaml:"right"\` + Bottom *time.Time \`field:"optional" json:"bottom" yaml:"bottom"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DiamondInheritanceBaseLevelStruct.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type DiamondInheritanceBaseLevelStruct struct { + BaseLevelProperty *string \`field:"required" json:"baseLevelProperty" yaml:"baseLevelProperty"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DiamondInheritanceFirstMidLevelStruct.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type DiamondInheritanceFirstMidLevelStruct struct { + BaseLevelProperty *string \`field:"required" json:"baseLevelProperty" yaml:"baseLevelProperty"\` + FirstMidLevelProperty *string \`field:"required" json:"firstMidLevelProperty" yaml:"firstMidLevelProperty"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DiamondInheritanceSecondMidLevelStruct.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type DiamondInheritanceSecondMidLevelStruct struct { + BaseLevelProperty *string \`field:"required" json:"baseLevelProperty" yaml:"baseLevelProperty"\` + SecondMidLevelProperty *string \`field:"required" json:"secondMidLevelProperty" yaml:"secondMidLevelProperty"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DiamondInheritanceTopLevelStruct.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type DiamondInheritanceTopLevelStruct struct { + BaseLevelProperty *string \`field:"required" json:"baseLevelProperty" yaml:"baseLevelProperty"\` + FirstMidLevelProperty *string \`field:"required" json:"firstMidLevelProperty" yaml:"firstMidLevelProperty"\` + SecondMidLevelProperty *string \`field:"required" json:"secondMidLevelProperty" yaml:"secondMidLevelProperty"\` + TopLevelProperty *string \`field:"required" json:"topLevelProperty" yaml:"topLevelProperty"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DisappointingCollectionSource.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +// Verifies that null/undefined can be returned for optional collections. +// +// This source of collections is disappointing - it'll always give you nothing :(. +type DisappointingCollectionSource interface { +} + +// The jsii proxy struct for DisappointingCollectionSource +type jsiiProxy_DisappointingCollectionSource struct { + _ byte // padding +} + +func DisappointingCollectionSource_MaybeList() *[]*string { + _init_.Initialize() + var returns *[]*string + _jsii_.StaticGet( + "jsii-calc.DisappointingCollectionSource", + "maybeList", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.Thrower", - reflect.TypeOf((*Thrower)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "throwError", GoMethod: "ThrowError"}, - }, - func() interface{} { - return &jsiiProxy_Thrower{} - }, + return returns +} + +func DisappointingCollectionSource_MaybeMap() *map[string]*float64 { + _init_.Initialize() + var returns *map[string]*float64 + _jsii_.StaticGet( + "jsii-calc.DisappointingCollectionSource", + "maybeMap", + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.TopLevelStruct", - reflect.TypeOf((*TopLevelStruct)(nil)).Elem(), + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DoNotOverridePrivates.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type DoNotOverridePrivates interface { + ChangePrivatePropertyValue(newValue *string) + PrivateMethodValue() *string + PrivatePropertyValue() *string +} + +// The jsii proxy struct for DoNotOverridePrivates +type jsiiProxy_DoNotOverridePrivates struct { + _ byte // padding +} + +func NewDoNotOverridePrivates() DoNotOverridePrivates { + _init_.Initialize() + + j := jsiiProxy_DoNotOverridePrivates{} + + _jsii_.Create( + "jsii-calc.DoNotOverridePrivates", + nil, // no parameters + &j, ) - _jsii_.RegisterClass( - "jsii-calc.TwoMethodsWithSimilarCapitalization", - reflect.TypeOf((*TwoMethodsWithSimilarCapitalization)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "fooBar", GoGetter: "FooBar"}, - _jsii_.MemberProperty{JsiiProperty: "fooBAR", GoGetter: "FooBAR"}, - _jsii_.MemberMethod{JsiiMethod: "toIsoString", GoMethod: "ToIsoString"}, - _jsii_.MemberMethod{JsiiMethod: "toIsOString", GoMethod: "ToIsOString"}, - _jsii_.MemberMethod{JsiiMethod: "toISOString", GoMethod: "ToISOString"}, - }, - func() interface{} { - return &jsiiProxy_TwoMethodsWithSimilarCapitalization{} - }, + + return &j +} + +func NewDoNotOverridePrivates_Override(d DoNotOverridePrivates) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.DoNotOverridePrivates", + nil, // no parameters + d, ) - _jsii_.RegisterClass( - "jsii-calc.UmaskCheck", - reflect.TypeOf((*UmaskCheck)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_UmaskCheck{} - }, +} + +func (d *jsiiProxy_DoNotOverridePrivates) ChangePrivatePropertyValue(newValue *string) { + _jsii_.InvokeVoid( + d, + "changePrivatePropertyValue", + []interface{}{newValue}, ) - _jsii_.RegisterClass( - "jsii-calc.UnaryOperation", - reflect.TypeOf((*UnaryOperation)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "operand", GoGetter: "Operand"}, - _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, - _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, - _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, - }, - func() interface{} { - j := jsiiProxy_UnaryOperation{} - _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibOperation) - return &j - }, +} + +func (d *jsiiProxy_DoNotOverridePrivates) PrivateMethodValue() *string { + var returns *string + + _jsii_.Invoke( + d, + "privateMethodValue", + nil, // no parameters + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.UnionProperties", - reflect.TypeOf((*UnionProperties)(nil)).Elem(), + + return returns +} + +func (d *jsiiProxy_DoNotOverridePrivates) PrivatePropertyValue() *string { + var returns *string + + _jsii_.Invoke( + d, + "privatePropertyValue", + nil, // no parameters + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.UpcasingReflectable", - reflect.TypeOf((*UpcasingReflectable)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "entries", GoGetter: "Entries"}, - }, - func() interface{} { - j := jsiiProxy_UpcasingReflectable{} - _jsii_.InitJsiiProxy(&j.Type__customsubmodulenameIReflectable) - return &j - }, + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DoNotRecognizeAnyAsOptional.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +// jsii#284: do not recognize "any" as an optional argument. +type DoNotRecognizeAnyAsOptional interface { + Method(_requiredAny interface{}, _optionalAny interface{}, _optionalString *string) +} + +// The jsii proxy struct for DoNotRecognizeAnyAsOptional +type jsiiProxy_DoNotRecognizeAnyAsOptional struct { + _ byte // padding +} + +func NewDoNotRecognizeAnyAsOptional() DoNotRecognizeAnyAsOptional { + _init_.Initialize() + + j := jsiiProxy_DoNotRecognizeAnyAsOptional{} + + _jsii_.Create( + "jsii-calc.DoNotRecognizeAnyAsOptional", + nil, // no parameters + &j, ) - _jsii_.RegisterClass( - "jsii-calc.UseBundledDependency", - reflect.TypeOf((*UseBundledDependency)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "value", GoMethod: "Value"}, - }, - func() interface{} { - return &jsiiProxy_UseBundledDependency{} - }, + + return &j +} + +func NewDoNotRecognizeAnyAsOptional_Override(d DoNotRecognizeAnyAsOptional) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.DoNotRecognizeAnyAsOptional", + nil, // no parameters + d, ) - _jsii_.RegisterClass( - "jsii-calc.UseCalcBase", - reflect.TypeOf((*UseCalcBase)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, - }, - func() interface{} { - return &jsiiProxy_UseCalcBase{} - }, +} + +func (d *jsiiProxy_DoNotRecognizeAnyAsOptional) Method(_requiredAny interface{}, _optionalAny interface{}, _optionalString *string) { + _jsii_.InvokeVoid( + d, + "method", + []interface{}{_requiredAny, _optionalAny, _optionalString}, ) - _jsii_.RegisterClass( - "jsii-calc.UsesInterfaceWithProperties", - reflect.TypeOf((*UsesInterfaceWithProperties)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "justRead", GoMethod: "JustRead"}, - _jsii_.MemberProperty{JsiiProperty: "obj", GoGetter: "Obj"}, - _jsii_.MemberMethod{JsiiMethod: "readStringAndNumber", GoMethod: "ReadStringAndNumber"}, - _jsii_.MemberMethod{JsiiMethod: "writeAndRead", GoMethod: "WriteAndRead"}, - }, - func() interface{} { - return &jsiiProxy_UsesInterfaceWithProperties{} - }, +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DocumentedClass.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +// Here's the first line of the TSDoc comment. +// +// This is the meat of the TSDoc comment. It may contain +// multiple lines and multiple paragraphs. +// +// Multiple paragraphs are separated by an empty line. +// +// Example: +// x := 12 + 44 +// s1 := "string" +// s2 := "string \\nwith new newlines" // see https://github.com/aws/jsii/issues/2569 +// s3 := "string\\n with\\n new lines" +// +type DocumentedClass interface { + // Greet the indicated person. + // + // This will print out a friendly greeting intended for the indicated person. + // + // Returns: A number that everyone knows very well and represents the answer + // to the ultimate question. + Greet(greetee *Greetee) *float64 + // Say ¡Hola! + // Experimental. + Hola() +} + +// The jsii proxy struct for DocumentedClass +type jsiiProxy_DocumentedClass struct { + _ byte // padding +} + +func NewDocumentedClass() DocumentedClass { + _init_.Initialize() + + j := jsiiProxy_DocumentedClass{} + + _jsii_.Create( + "jsii-calc.DocumentedClass", + nil, // no parameters + &j, ) - _jsii_.RegisterClass( - "jsii-calc.VariadicInvoker", - reflect.TypeOf((*VariadicInvoker)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "asArray", GoMethod: "AsArray"}, - }, - func() interface{} { - return &jsiiProxy_VariadicInvoker{} - }, + + return &j +} + +func NewDocumentedClass_Override(d DocumentedClass) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.DocumentedClass", + nil, // no parameters + d, ) - _jsii_.RegisterClass( - "jsii-calc.VariadicMethod", - reflect.TypeOf((*VariadicMethod)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "asArray", GoMethod: "AsArray"}, - }, - func() interface{} { - return &jsiiProxy_VariadicMethod{} - }, +} + +func (d *jsiiProxy_DocumentedClass) Greet(greetee *Greetee) *float64 { + var returns *float64 + + _jsii_.Invoke( + d, + "greet", + []interface{}{greetee}, + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.VariadicTypeUnion", - reflect.TypeOf((*VariadicTypeUnion)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "union", GoGetter: "Union"}, - }, - func() interface{} { - return &jsiiProxy_VariadicTypeUnion{} - }, + + return returns +} + +func (d *jsiiProxy_DocumentedClass) Hola() { + _jsii_.InvokeVoid( + d, + "hola", + nil, // no parameters ) - _jsii_.RegisterClass( - "jsii-calc.VirtualMethodPlayground", - reflect.TypeOf((*VirtualMethodPlayground)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "overrideMeAsync", GoMethod: "OverrideMeAsync"}, - _jsii_.MemberMethod{JsiiMethod: "overrideMeSync", GoMethod: "OverrideMeSync"}, - _jsii_.MemberMethod{JsiiMethod: "parallelSumAsync", GoMethod: "ParallelSumAsync"}, - _jsii_.MemberMethod{JsiiMethod: "serialSumAsync", GoMethod: "SerialSumAsync"}, - _jsii_.MemberMethod{JsiiMethod: "sumSync", GoMethod: "SumSync"}, - }, - func() interface{} { - return &jsiiProxy_VirtualMethodPlayground{} - }, +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DontComplainAboutVariadicAfterOptional.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type DontComplainAboutVariadicAfterOptional interface { + OptionalAndVariadic(optional *string, things ...*string) *string +} + +// The jsii proxy struct for DontComplainAboutVariadicAfterOptional +type jsiiProxy_DontComplainAboutVariadicAfterOptional struct { + _ byte // padding +} + +func NewDontComplainAboutVariadicAfterOptional() DontComplainAboutVariadicAfterOptional { + _init_.Initialize() + + j := jsiiProxy_DontComplainAboutVariadicAfterOptional{} + + _jsii_.Create( + "jsii-calc.DontComplainAboutVariadicAfterOptional", + nil, // no parameters + &j, ) - _jsii_.RegisterClass( - "jsii-calc.VoidCallback", - reflect.TypeOf((*VoidCallback)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "callMe", GoMethod: "CallMe"}, - _jsii_.MemberProperty{JsiiProperty: "methodWasCalled", GoGetter: "MethodWasCalled"}, - _jsii_.MemberMethod{JsiiMethod: "overrideMe", GoMethod: "OverrideMe"}, - }, - func() interface{} { - return &jsiiProxy_VoidCallback{} - }, + + return &j +} + +func NewDontComplainAboutVariadicAfterOptional_Override(d DontComplainAboutVariadicAfterOptional) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.DontComplainAboutVariadicAfterOptional", + nil, // no parameters + d, ) - _jsii_.RegisterClass( - "jsii-calc.WithPrivatePropertyInConstructor", - reflect.TypeOf((*WithPrivatePropertyInConstructor)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "success", GoGetter: "Success"}, - }, - func() interface{} { - return &jsiiProxy_WithPrivatePropertyInConstructor{} - }, +} + +func (d *jsiiProxy_DontComplainAboutVariadicAfterOptional) OptionalAndVariadic(optional *string, things ...*string) *string { + args := []interface{}{optional} + for _, a := range things { + args = append(args, a) + } + + var returns *string + + _jsii_.Invoke( + d, + "optionalAndVariadic", + args, + &returns, ) + + return returns } + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AbstractClass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/DoubleTrouble.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -6845,71 +7345,62 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type AbstractClass interface { - AbstractClassBase - IInterfaceImplementedByAbstractClass - AbstractProperty() *string - PropFromInterface() *string - AbstractMethod(name *string) *string - NonAbstractMethod() *float64 +type DoubleTrouble interface { + IFriendlyRandomGenerator + // Say hello! + Hello() *string + // Returns another random number. + Next() *float64 } -// The jsii proxy struct for AbstractClass -type jsiiProxy_AbstractClass struct { - jsiiProxy_AbstractClassBase - jsiiProxy_IInterfaceImplementedByAbstractClass +// The jsii proxy struct for DoubleTrouble +type jsiiProxy_DoubleTrouble struct { + jsiiProxy_IFriendlyRandomGenerator } -func (j *jsiiProxy_AbstractClass) AbstractProperty() *string { - var returns *string - _jsii_.Get( - j, - "abstractProperty", - &returns, - ) - return returns -} +func NewDoubleTrouble() DoubleTrouble { + _init_.Initialize() -func (j *jsiiProxy_AbstractClass) PropFromInterface() *string { - var returns *string - _jsii_.Get( - j, - "propFromInterface", - &returns, + j := jsiiProxy_DoubleTrouble{} + + _jsii_.Create( + "jsii-calc.DoubleTrouble", + nil, // no parameters + &j, ) - return returns -} + return &j +} -func NewAbstractClass_Override(a AbstractClass) { +func NewDoubleTrouble_Override(d DoubleTrouble) { _init_.Initialize() _jsii_.Create( - "jsii-calc.AbstractClass", + "jsii-calc.DoubleTrouble", nil, // no parameters - a, + d, ) } -func (a *jsiiProxy_AbstractClass) AbstractMethod(name *string) *string { +func (d *jsiiProxy_DoubleTrouble) Hello() *string { var returns *string _jsii_.Invoke( - a, - "abstractMethod", - []interface{}{name}, + d, + "hello", + nil, // no parameters &returns, ) return returns } -func (a *jsiiProxy_AbstractClass) NonAbstractMethod() *float64 { +func (d *jsiiProxy_DoubleTrouble) Next() *float64 { var returns *float64 _jsii_.Invoke( - a, - "nonAbstractMethod", + d, + "next", nil, // no parameters &returns, ) @@ -6920,7 +7411,19 @@ func (a *jsiiProxy_AbstractClass) NonAbstractMethod() *float64 { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AbstractClassBase.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/DummyObj.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type DummyObj struct { + Example *string \`field:"required" json:"example" yaml:"example"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DynamicPropertyBearer.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -6929,40 +7432,84 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type AbstractClassBase interface { - AbstractProperty() *string +// Ensures we can override a dynamic property that was inherited. +type DynamicPropertyBearer interface { + DynamicProperty() *string + SetDynamicProperty(val *string) + ValueStore() *string + SetValueStore(val *string) } -// The jsii proxy struct for AbstractClassBase -type jsiiProxy_AbstractClassBase struct { +// The jsii proxy struct for DynamicPropertyBearer +type jsiiProxy_DynamicPropertyBearer struct { _ byte // padding } -func (j *jsiiProxy_AbstractClassBase) AbstractProperty() *string { +func (j *jsiiProxy_DynamicPropertyBearer) DynamicProperty() *string { var returns *string _jsii_.Get( j, - "abstractProperty", + "dynamicProperty", + &returns, + ) + return returns +} + +func (j *jsiiProxy_DynamicPropertyBearer) ValueStore() *string { + var returns *string + _jsii_.Get( + j, + "valueStore", &returns, ) return returns } -func NewAbstractClassBase_Override(a AbstractClassBase) { +func NewDynamicPropertyBearer(valueStore *string) DynamicPropertyBearer { _init_.Initialize() + j := jsiiProxy_DynamicPropertyBearer{} + _jsii_.Create( - "jsii-calc.AbstractClassBase", - nil, // no parameters - a, + "jsii-calc.DynamicPropertyBearer", + []interface{}{valueStore}, + &j, + ) + + return &j +} + +func NewDynamicPropertyBearer_Override(d DynamicPropertyBearer, valueStore *string) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.DynamicPropertyBearer", + []interface{}{valueStore}, + d, + ) +} + +func (j *jsiiProxy_DynamicPropertyBearer)SetDynamicProperty(val *string) { + _jsii_.Set( + j, + "dynamicProperty", + val, + ) +} + +func (j *jsiiProxy_DynamicPropertyBearer)SetValueStore(val *string) { + _jsii_.Set( + j, + "valueStore", + val, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AbstractClassReturner.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/DynamicPropertyBearerChild.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -6971,72 +7518,102 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type AbstractClassReturner interface { - ReturnAbstractFromProperty() AbstractClassBase - GiveMeAbstract() AbstractClass - GiveMeInterface() IInterfaceImplementedByAbstractClass +type DynamicPropertyBearerChild interface { + DynamicPropertyBearer + DynamicProperty() *string + SetDynamicProperty(val *string) + OriginalValue() *string + ValueStore() *string + SetValueStore(val *string) + // Sets \`this.dynamicProperty\` to the new value, and returns the old value. + // + // Returns: the old value that was set. + OverrideValue(newValue *string) *string } -// The jsii proxy struct for AbstractClassReturner -type jsiiProxy_AbstractClassReturner struct { - _ byte // padding +// The jsii proxy struct for DynamicPropertyBearerChild +type jsiiProxy_DynamicPropertyBearerChild struct { + jsiiProxy_DynamicPropertyBearer } -func (j *jsiiProxy_AbstractClassReturner) ReturnAbstractFromProperty() AbstractClassBase { - var returns AbstractClassBase +func (j *jsiiProxy_DynamicPropertyBearerChild) DynamicProperty() *string { + var returns *string _jsii_.Get( j, - "returnAbstractFromProperty", + "dynamicProperty", &returns, ) return returns } +func (j *jsiiProxy_DynamicPropertyBearerChild) OriginalValue() *string { + var returns *string + _jsii_.Get( + j, + "originalValue", + &returns, + ) + return returns +} -func NewAbstractClassReturner() AbstractClassReturner { +func (j *jsiiProxy_DynamicPropertyBearerChild) ValueStore() *string { + var returns *string + _jsii_.Get( + j, + "valueStore", + &returns, + ) + return returns +} + + +func NewDynamicPropertyBearerChild(originalValue *string) DynamicPropertyBearerChild { _init_.Initialize() - j := jsiiProxy_AbstractClassReturner{} + j := jsiiProxy_DynamicPropertyBearerChild{} _jsii_.Create( - "jsii-calc.AbstractClassReturner", - nil, // no parameters + "jsii-calc.DynamicPropertyBearerChild", + []interface{}{originalValue}, &j, ) return &j } -func NewAbstractClassReturner_Override(a AbstractClassReturner) { +func NewDynamicPropertyBearerChild_Override(d DynamicPropertyBearerChild, originalValue *string) { _init_.Initialize() _jsii_.Create( - "jsii-calc.AbstractClassReturner", - nil, // no parameters - a, + "jsii-calc.DynamicPropertyBearerChild", + []interface{}{originalValue}, + d, ) } -func (a *jsiiProxy_AbstractClassReturner) GiveMeAbstract() AbstractClass { - var returns AbstractClass - - _jsii_.Invoke( - a, - "giveMeAbstract", - nil, // no parameters - &returns, +func (j *jsiiProxy_DynamicPropertyBearerChild)SetDynamicProperty(val *string) { + _jsii_.Set( + j, + "dynamicProperty", + val, ) +} - return returns +func (j *jsiiProxy_DynamicPropertyBearerChild)SetValueStore(val *string) { + _jsii_.Set( + j, + "valueStore", + val, + ) } -func (a *jsiiProxy_AbstractClassReturner) GiveMeInterface() IInterfaceImplementedByAbstractClass { - var returns IInterfaceImplementedByAbstractClass +func (d *jsiiProxy_DynamicPropertyBearerChild) OverrideValue(newValue *string) *string { + var returns *string _jsii_.Invoke( - a, - "giveMeInterface", - nil, // no parameters + d, + "overrideValue", + []interface{}{newValue}, &returns, ) @@ -7046,7 +7623,7 @@ func (a *jsiiProxy_AbstractClassReturner) GiveMeInterface() IInterfaceImplemente `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AbstractSuite.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/Entropy.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -7055,69 +7632,54 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Ensures abstract members implementations correctly register overrides in various languages. -type AbstractSuite interface { - Property() *string - SetProperty(val *string) - SomeMethod(str *string) *string - // Sets \`seed\` to \`this.property\`, then calls \`someMethod\` with \`this.property\` and returns the result. - WorkItAll(seed *string) *string +// This class is used to validate that serialization and deserialization does not interpret ISO-8601-formatted timestampts to the native date/time object, as the jsii protocol has a $jsii$date wrapper for this purpose (node's JSON parsing does *NOT* detect dates automatically in this way, so host libraries should not either). +type Entropy interface { + // Increases entropy by consuming time from the clock (yes, this is a long shot, please don't judge). + // + // Returns: the time from the \`WallClock\`. + Increase() *string + // Implement this method such that it returns \`word\`. + // + // Returns: \`word\`. + Repeat(word *string) *string } -// The jsii proxy struct for AbstractSuite -type jsiiProxy_AbstractSuite struct { +// The jsii proxy struct for Entropy +type jsiiProxy_Entropy struct { _ byte // padding } -func (j *jsiiProxy_AbstractSuite) Property() *string { - var returns *string - _jsii_.Get( - j, - "property", - &returns, - ) - return returns -} - - -func NewAbstractSuite_Override(a AbstractSuite) { +// Creates a new instance of Entropy. +func NewEntropy_Override(e Entropy, clock IWallClock) { _init_.Initialize() _jsii_.Create( - "jsii-calc.AbstractSuite", - nil, // no parameters - a, - ) -} - -func (j *jsiiProxy_AbstractSuite)SetProperty(val *string) { - _jsii_.Set( - j, - "property", - val, + "jsii-calc.Entropy", + []interface{}{clock}, + e, ) } -func (a *jsiiProxy_AbstractSuite) SomeMethod(str *string) *string { +func (e *jsiiProxy_Entropy) Increase() *string { var returns *string _jsii_.Invoke( - a, - "someMethod", - []interface{}{str}, + e, + "increase", + nil, // no parameters &returns, ) return returns } -func (a *jsiiProxy_AbstractSuite) WorkItAll(seed *string) *string { +func (e *jsiiProxy_Entropy) Repeat(word *string) *string { var returns *string _jsii_.Invoke( - a, - "workItAll", - []interface{}{seed}, + e, + "repeat", + []interface{}{word}, &returns, ) @@ -7127,115 +7689,125 @@ func (a *jsiiProxy_AbstractSuite) WorkItAll(seed *string) *string { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Add.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/EnumDispenser.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -// The "+" binary operation. -type Add interface { - BinaryOperation - // Left-hand side operand. - Lhs() scopejsiicalclib.NumericValue - // Right-hand side operand. - Rhs() scopejsiicalclib.NumericValue - // The value. - Value() *float64 - // Say hello! - Hello() *string - // String representation of the value. - ToString() *string - // Returns: the name of the class (to verify native type names are created for derived classes). - TypeName() interface{} +type EnumDispenser interface { } -// The jsii proxy struct for Add -type jsiiProxy_Add struct { - jsiiProxy_BinaryOperation +// The jsii proxy struct for EnumDispenser +type jsiiProxy_EnumDispenser struct { + _ byte // padding } -func (j *jsiiProxy_Add) Lhs() scopejsiicalclib.NumericValue { - var returns scopejsiicalclib.NumericValue - _jsii_.Get( - j, - "lhs", +func EnumDispenser_RandomIntegerLikeEnum() AllTypesEnum { + _init_.Initialize() + + var returns AllTypesEnum + + _jsii_.StaticInvoke( + "jsii-calc.EnumDispenser", + "randomIntegerLikeEnum", + nil, // no parameters &returns, ) + return returns } -func (j *jsiiProxy_Add) Rhs() scopejsiicalclib.NumericValue { - var returns scopejsiicalclib.NumericValue - _jsii_.Get( - j, - "rhs", +func EnumDispenser_RandomStringLikeEnum() StringEnum { + _init_.Initialize() + + var returns StringEnum + + _jsii_.StaticInvoke( + "jsii-calc.EnumDispenser", + "randomStringLikeEnum", + nil, // no parameters &returns, ) + return returns } -func (j *jsiiProxy_Add) Value() *float64 { - var returns *float64 - _jsii_.Get( - j, - "value", - &returns, - ) - return returns + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/EraseUndefinedHashValues.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type EraseUndefinedHashValues interface { } +// The jsii proxy struct for EraseUndefinedHashValues +type jsiiProxy_EraseUndefinedHashValues struct { + _ byte // padding +} -// Creates a BinaryOperation. -func NewAdd(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) Add { +func NewEraseUndefinedHashValues() EraseUndefinedHashValues { _init_.Initialize() - j := jsiiProxy_Add{} + j := jsiiProxy_EraseUndefinedHashValues{} _jsii_.Create( - "jsii-calc.Add", - []interface{}{lhs, rhs}, + "jsii-calc.EraseUndefinedHashValues", + nil, // no parameters &j, ) return &j } -// Creates a BinaryOperation. -func NewAdd_Override(a Add, lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) { +func NewEraseUndefinedHashValues_Override(e EraseUndefinedHashValues) { _init_.Initialize() _jsii_.Create( - "jsii-calc.Add", - []interface{}{lhs, rhs}, - a, + "jsii-calc.EraseUndefinedHashValues", + nil, // no parameters + e, ) } -func (a *jsiiProxy_Add) Hello() *string { - var returns *string +// Returns \`true\` if \`key\` is defined in \`opts\`. +// +// Used to check that undefined/null hash values +// are being erased when sending values from native code to JS. +func EraseUndefinedHashValues_DoesKeyExist(opts *EraseUndefinedHashValuesOptions, key *string) *bool { + _init_.Initialize() - _jsii_.Invoke( - a, - "hello", - nil, // no parameters + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.EraseUndefinedHashValues", + "doesKeyExist", + []interface{}{opts, key}, &returns, ) return returns } -func (a *jsiiProxy_Add) ToString() *string { - var returns *string +// We expect "prop1" to be erased. +func EraseUndefinedHashValues_Prop1IsNull() *map[string]interface{} { + _init_.Initialize() - _jsii_.Invoke( - a, - "toString", + var returns *map[string]interface{} + + _jsii_.StaticInvoke( + "jsii-calc.EraseUndefinedHashValues", + "prop1IsNull", nil, // no parameters &returns, ) @@ -7243,12 +7815,15 @@ func (a *jsiiProxy_Add) ToString() *string { return returns } -func (a *jsiiProxy_Add) TypeName() interface{} { - var returns interface{} +// We expect "prop2" to be erased. +func EraseUndefinedHashValues_Prop2IsUndefined() *map[string]interface{} { + _init_.Initialize() - _jsii_.Invoke( - a, - "typeName", + var returns *map[string]interface{} + + _jsii_.StaticInvoke( + "jsii-calc.EraseUndefinedHashValues", + "prop2IsUndefined", nil, // no parameters &returns, ) @@ -7259,458 +7834,466 @@ func (a *jsiiProxy_Add) TypeName() interface{} { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AllTypes.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/EraseUndefinedHashValuesOptions.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc -import ( - "time" - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +type EraseUndefinedHashValuesOptions struct { + Option1 *string \`field:"optional" json:"option1" yaml:"option1"\` + Option2 *string \`field:"optional" json:"option2" yaml:"option2"\` +} - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" -) -// This class includes property for all types supported by jsii. -// -// The setters will validate -// that the value set is of the expected type and throw otherwise. -type AllTypes interface { - AnyArrayProperty() *[]interface{} - SetAnyArrayProperty(val *[]interface{}) - AnyMapProperty() *map[string]interface{} - SetAnyMapProperty(val *map[string]interface{}) - AnyProperty() interface{} - SetAnyProperty(val interface{}) - ArrayProperty() *[]*string - SetArrayProperty(val *[]*string) - BooleanProperty() *bool - SetBooleanProperty(val *bool) - DateProperty() *time.Time - SetDateProperty(val *time.Time) - EnumProperty() AllTypesEnum - SetEnumProperty(val AllTypesEnum) - EnumPropertyValue() *float64 - JsonProperty() *map[string]interface{} - SetJsonProperty(val *map[string]interface{}) - MapProperty() *map[string]scopejsiicalclib.Number - SetMapProperty(val *map[string]scopejsiicalclib.Number) - NumberProperty() *float64 - SetNumberProperty(val *float64) - OptionalEnumValue() StringEnum - SetOptionalEnumValue(val StringEnum) - StringProperty() *string - SetStringProperty(val *string) - UnionArrayProperty() *[]interface{} - SetUnionArrayProperty(val *[]interface{}) - UnionMapProperty() *map[string]interface{} - SetUnionMapProperty(val *map[string]interface{}) - UnionProperty() interface{} - SetUnionProperty(val interface{}) - UnknownArrayProperty() *[]interface{} - SetUnknownArrayProperty(val *[]interface{}) - UnknownMapProperty() *map[string]interface{} - SetUnknownMapProperty(val *map[string]interface{}) - UnknownProperty() interface{} - SetUnknownProperty(val interface{}) - AnyIn(inp interface{}) - AnyOut() interface{} - EnumMethod(value StringEnum) StringEnum +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExperimentalClass.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +// Experimental. +type ExperimentalClass interface { + // Experimental. + MutableProperty() *float64 + // Experimental. + SetMutableProperty(val *float64) + // Experimental. + ReadonlyProperty() *string + // Experimental. + Method() } -// The jsii proxy struct for AllTypes -type jsiiProxy_AllTypes struct { +// The jsii proxy struct for ExperimentalClass +type jsiiProxy_ExperimentalClass struct { _ byte // padding } -func (j *jsiiProxy_AllTypes) AnyArrayProperty() *[]interface{} { - var returns *[]interface{} +func (j *jsiiProxy_ExperimentalClass) MutableProperty() *float64 { + var returns *float64 _jsii_.Get( j, - "anyArrayProperty", + "mutableProperty", &returns, ) return returns } -func (j *jsiiProxy_AllTypes) AnyMapProperty() *map[string]interface{} { - var returns *map[string]interface{} +func (j *jsiiProxy_ExperimentalClass) ReadonlyProperty() *string { + var returns *string _jsii_.Get( j, - "anyMapProperty", + "readonlyProperty", &returns, ) return returns } -func (j *jsiiProxy_AllTypes) AnyProperty() interface{} { - var returns interface{} - _jsii_.Get( - j, - "anyProperty", - &returns, - ) - return returns -} -func (j *jsiiProxy_AllTypes) ArrayProperty() *[]*string { - var returns *[]*string - _jsii_.Get( - j, - "arrayProperty", - &returns, - ) - return returns -} +// Experimental. +func NewExperimentalClass(readonlyString *string, mutableNumber *float64) ExperimentalClass { + _init_.Initialize() -func (j *jsiiProxy_AllTypes) BooleanProperty() *bool { - var returns *bool - _jsii_.Get( - j, - "booleanProperty", - &returns, + j := jsiiProxy_ExperimentalClass{} + + _jsii_.Create( + "jsii-calc.ExperimentalClass", + []interface{}{readonlyString, mutableNumber}, + &j, ) - return returns + + return &j } -func (j *jsiiProxy_AllTypes) DateProperty() *time.Time { - var returns *time.Time - _jsii_.Get( - j, - "dateProperty", - &returns, +// Experimental. +func NewExperimentalClass_Override(e ExperimentalClass, readonlyString *string, mutableNumber *float64) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ExperimentalClass", + []interface{}{readonlyString, mutableNumber}, + e, ) - return returns } -func (j *jsiiProxy_AllTypes) EnumProperty() AllTypesEnum { - var returns AllTypesEnum - _jsii_.Get( +func (j *jsiiProxy_ExperimentalClass)SetMutableProperty(val *float64) { + _jsii_.Set( j, - "enumProperty", - &returns, + "mutableProperty", + val, ) - return returns } -func (j *jsiiProxy_AllTypes) EnumPropertyValue() *float64 { - var returns *float64 - _jsii_.Get( - j, - "enumPropertyValue", - &returns, +func (e *jsiiProxy_ExperimentalClass) Method() { + _jsii_.InvokeVoid( + e, + "method", + nil, // no parameters ) - return returns } -func (j *jsiiProxy_AllTypes) JsonProperty() *map[string]interface{} { - var returns *map[string]interface{} - _jsii_.Get( - j, - "jsonProperty", - &returns, - ) - return returns + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExperimentalEnum.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +// Experimental. +type ExperimentalEnum string + +const ( + // Experimental. + ExperimentalEnum_OPTION_A ExperimentalEnum = "OPTION_A" + // Experimental. + ExperimentalEnum_OPTION_B ExperimentalEnum = "OPTION_B" +) + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExperimentalStruct.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +// Experimental. +type ExperimentalStruct struct { + // Experimental. + ReadonlyProperty *string \`field:"required" json:"readonlyProperty" yaml:"readonlyProperty"\` } -func (j *jsiiProxy_AllTypes) MapProperty() *map[string]scopejsiicalclib.Number { - var returns *map[string]scopejsiicalclib.Number - _jsii_.Get( - j, - "mapProperty", - &returns, - ) - return returns + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExportedBaseClass.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type ExportedBaseClass interface { + Success() *bool } -func (j *jsiiProxy_AllTypes) NumberProperty() *float64 { - var returns *float64 - _jsii_.Get( - j, - "numberProperty", - &returns, - ) - return returns +// The jsii proxy struct for ExportedBaseClass +type jsiiProxy_ExportedBaseClass struct { + _ byte // padding } -func (j *jsiiProxy_AllTypes) OptionalEnumValue() StringEnum { - var returns StringEnum +func (j *jsiiProxy_ExportedBaseClass) Success() *bool { + var returns *bool _jsii_.Get( j, - "optionalEnumValue", + "success", &returns, ) return returns } -func (j *jsiiProxy_AllTypes) StringProperty() *string { - var returns *string - _jsii_.Get( - j, - "stringProperty", - &returns, + +func NewExportedBaseClass(success *bool) ExportedBaseClass { + _init_.Initialize() + + j := jsiiProxy_ExportedBaseClass{} + + _jsii_.Create( + "jsii-calc.ExportedBaseClass", + []interface{}{success}, + &j, ) - return returns + + return &j } -func (j *jsiiProxy_AllTypes) UnionArrayProperty() *[]interface{} { - var returns *[]interface{} - _jsii_.Get( - j, - "unionArrayProperty", - &returns, +func NewExportedBaseClass_Override(e ExportedBaseClass, success *bool) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ExportedBaseClass", + []interface{}{success}, + e, ) - return returns } -func (j *jsiiProxy_AllTypes) UnionMapProperty() *map[string]interface{} { - var returns *map[string]interface{} - _jsii_.Get( - j, - "unionMapProperty", - &returns, - ) - return returns + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExtendsInternalInterface.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type ExtendsInternalInterface struct { + Boom *bool \`field:"required" json:"boom" yaml:"boom"\` + Prop *string \`field:"required" json:"prop" yaml:"prop"\` } -func (j *jsiiProxy_AllTypes) UnionProperty() interface{} { - var returns interface{} - _jsii_.Get( - j, - "unionProperty", - &returns, - ) - return returns + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExternalClass.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type ExternalClass interface { + MutableProperty() *float64 + SetMutableProperty(val *float64) + ReadonlyProperty() *string + Method() } -func (j *jsiiProxy_AllTypes) UnknownArrayProperty() *[]interface{} { - var returns *[]interface{} - _jsii_.Get( - j, - "unknownArrayProperty", - &returns, - ) - return returns +// The jsii proxy struct for ExternalClass +type jsiiProxy_ExternalClass struct { + _ byte // padding } -func (j *jsiiProxy_AllTypes) UnknownMapProperty() *map[string]interface{} { - var returns *map[string]interface{} +func (j *jsiiProxy_ExternalClass) MutableProperty() *float64 { + var returns *float64 _jsii_.Get( j, - "unknownMapProperty", + "mutableProperty", &returns, ) return returns } -func (j *jsiiProxy_AllTypes) UnknownProperty() interface{} { - var returns interface{} +func (j *jsiiProxy_ExternalClass) ReadonlyProperty() *string { + var returns *string _jsii_.Get( j, - "unknownProperty", + "readonlyProperty", &returns, ) return returns } -func NewAllTypes() AllTypes { +func NewExternalClass(readonlyString *string, mutableNumber *float64) ExternalClass { _init_.Initialize() - j := jsiiProxy_AllTypes{} + j := jsiiProxy_ExternalClass{} _jsii_.Create( - "jsii-calc.AllTypes", - nil, // no parameters + "jsii-calc.ExternalClass", + []interface{}{readonlyString, mutableNumber}, &j, ) return &j } -func NewAllTypes_Override(a AllTypes) { +func NewExternalClass_Override(e ExternalClass, readonlyString *string, mutableNumber *float64) { _init_.Initialize() _jsii_.Create( - "jsii-calc.AllTypes", - nil, // no parameters - a, + "jsii-calc.ExternalClass", + []interface{}{readonlyString, mutableNumber}, + e, ) } -func (j *jsiiProxy_AllTypes)SetAnyArrayProperty(val *[]interface{}) { +func (j *jsiiProxy_ExternalClass)SetMutableProperty(val *float64) { _jsii_.Set( j, - "anyArrayProperty", + "mutableProperty", val, ) } -func (j *jsiiProxy_AllTypes)SetAnyMapProperty(val *map[string]interface{}) { - _jsii_.Set( - j, - "anyMapProperty", - val, +func (e *jsiiProxy_ExternalClass) Method() { + _jsii_.InvokeVoid( + e, + "method", + nil, // no parameters ) } -func (j *jsiiProxy_AllTypes)SetAnyProperty(val interface{}) { - _jsii_.Set( - j, - "anyProperty", - val, - ) -} -func (j *jsiiProxy_AllTypes)SetArrayProperty(val *[]*string) { - _jsii_.Set( - j, - "arrayProperty", - val, - ) -} +`; -func (j *jsiiProxy_AllTypes)SetBooleanProperty(val *bool) { - _jsii_.Set( - j, - "booleanProperty", - val, - ) -} +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExternalEnum.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -func (j *jsiiProxy_AllTypes)SetDateProperty(val *time.Time) { - _jsii_.Set( - j, - "dateProperty", - val, - ) -} -func (j *jsiiProxy_AllTypes)SetEnumProperty(val AllTypesEnum) { - _jsii_.Set( - j, - "enumProperty", - val, - ) -} +type ExternalEnum string -func (j *jsiiProxy_AllTypes)SetJsonProperty(val *map[string]interface{}) { - _jsii_.Set( - j, - "jsonProperty", - val, - ) -} +const ( + ExternalEnum_OPTION_A ExternalEnum = "OPTION_A" + ExternalEnum_OPTION_B ExternalEnum = "OPTION_B" +) -func (j *jsiiProxy_AllTypes)SetMapProperty(val *map[string]scopejsiicalclib.Number) { - _jsii_.Set( - j, - "mapProperty", - val, - ) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExternalStruct.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type ExternalStruct struct { + ReadonlyProperty *string \`field:"required" json:"readonlyProperty" yaml:"readonlyProperty"\` } -func (j *jsiiProxy_AllTypes)SetNumberProperty(val *float64) { - _jsii_.Set( - j, - "numberProperty", - val, - ) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/FullCombo.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +type FullCombo interface { + BaseClass + IIndirectlyImplemented + Property() *string + Method() *float64 } -func (j *jsiiProxy_AllTypes)SetOptionalEnumValue(val StringEnum) { - _jsii_.Set( - j, - "optionalEnumValue", - val, - ) +// The jsii proxy struct for FullCombo +type jsiiProxy_FullCombo struct { + jsiiProxy_BaseClass + jsiiProxy_IIndirectlyImplemented } -func (j *jsiiProxy_AllTypes)SetStringProperty(val *string) { - _jsii_.Set( +func (j *jsiiProxy_FullCombo) Property() *string { + var returns *string + _jsii_.Get( j, - "stringProperty", - val, + "property", + &returns, ) + return returns } -func (j *jsiiProxy_AllTypes)SetUnionArrayProperty(val *[]interface{}) { - _jsii_.Set( - j, - "unionArrayProperty", - val, + +func (f *jsiiProxy_FullCombo) Method() *float64 { + var returns *float64 + + _jsii_.Invoke( + f, + "method", + nil, // no parameters + &returns, ) + + return returns } -func (j *jsiiProxy_AllTypes)SetUnionMapProperty(val *map[string]interface{}) { - _jsii_.Set( - j, - "unionMapProperty", - val, - ) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/GiveMeStructs.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + +type GiveMeStructs interface { + StructLiteral() *scopejsiicalclib.StructWithOnlyOptionals + // Accepts a struct of type DerivedStruct and returns a struct of type FirstStruct. + DerivedToFirst(derived *DerivedStruct) *scopejsiicalclib.MyFirstStruct + // Returns the boolean from a DerivedStruct struct. + ReadDerivedNonPrimitive(derived *DerivedStruct) DoubleTrouble + // Returns the "anumber" from a MyFirstStruct struct;. + ReadFirstNumber(first *scopejsiicalclib.MyFirstStruct) *float64 } -func (j *jsiiProxy_AllTypes)SetUnionProperty(val interface{}) { - _jsii_.Set( - j, - "unionProperty", - val, - ) +// The jsii proxy struct for GiveMeStructs +type jsiiProxy_GiveMeStructs struct { + _ byte // padding } -func (j *jsiiProxy_AllTypes)SetUnknownArrayProperty(val *[]interface{}) { - _jsii_.Set( +func (j *jsiiProxy_GiveMeStructs) StructLiteral() *scopejsiicalclib.StructWithOnlyOptionals { + var returns *scopejsiicalclib.StructWithOnlyOptionals + _jsii_.Get( j, - "unknownArrayProperty", - val, + "structLiteral", + &returns, ) + return returns } -func (j *jsiiProxy_AllTypes)SetUnknownMapProperty(val *map[string]interface{}) { - _jsii_.Set( - j, - "unknownMapProperty", - val, + +func NewGiveMeStructs() GiveMeStructs { + _init_.Initialize() + + j := jsiiProxy_GiveMeStructs{} + + _jsii_.Create( + "jsii-calc.GiveMeStructs", + nil, // no parameters + &j, ) + + return &j } -func (j *jsiiProxy_AllTypes)SetUnknownProperty(val interface{}) { - _jsii_.Set( - j, - "unknownProperty", - val, +func NewGiveMeStructs_Override(g GiveMeStructs) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.GiveMeStructs", + nil, // no parameters + g, ) } -func (a *jsiiProxy_AllTypes) AnyIn(inp interface{}) { - _jsii_.InvokeVoid( - a, - "anyIn", - []interface{}{inp}, +func (g *jsiiProxy_GiveMeStructs) DerivedToFirst(derived *DerivedStruct) *scopejsiicalclib.MyFirstStruct { + var returns *scopejsiicalclib.MyFirstStruct + + _jsii_.Invoke( + g, + "derivedToFirst", + []interface{}{derived}, + &returns, ) + + return returns } -func (a *jsiiProxy_AllTypes) AnyOut() interface{} { - var returns interface{} +func (g *jsiiProxy_GiveMeStructs) ReadDerivedNonPrimitive(derived *DerivedStruct) DoubleTrouble { + var returns DoubleTrouble _jsii_.Invoke( - a, - "anyOut", - nil, // no parameters + g, + "readDerivedNonPrimitive", + []interface{}{derived}, &returns, ) return returns } -func (a *jsiiProxy_AllTypes) EnumMethod(value StringEnum) StringEnum { - var returns StringEnum +func (g *jsiiProxy_GiveMeStructs) ReadFirstNumber(first *scopejsiicalclib.MyFirstStruct) *float64 { + var returns *float64 _jsii_.Invoke( - a, - "enumMethod", - []interface{}{value}, + g, + "readFirstNumber", + []interface{}{first}, &returns, ) @@ -7720,52 +8303,47 @@ func (a *jsiiProxy_AllTypes) EnumMethod(value StringEnum) StringEnum { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AllTypesEnum.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/Greetee.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc -type AllTypesEnum string - -const ( - AllTypesEnum_MY_ENUM_VALUE AllTypesEnum = "MY_ENUM_VALUE" - AllTypesEnum_YOUR_ENUM_VALUE AllTypesEnum = "YOUR_ENUM_VALUE" - AllTypesEnum_THIS_IS_GREAT AllTypesEnum = "THIS_IS_GREAT" -) +// These are some arguments you can pass to a method. +type Greetee struct { + // The name of the greetee. + Name *string \`field:"optional" json:"name" yaml:"name"\` +} `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AllowedMethodNames.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/GreetingAugmenter.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -type AllowedMethodNames interface { - GetBar(_p1 *string, _p2 *float64) - // getXxx() is not allowed (see negatives), but getXxx(a, ...) is okay. - GetFoo(withParam *string) *string - SetBar(_x *string, _y *float64, _z *bool) - // setFoo(x) is not allowed (see negatives), but setXxx(a, b, ...) is okay. - SetFoo(_x *string, _y *float64) +type GreetingAugmenter interface { + BetterGreeting(friendly scopejsiicalclib.IFriendly) *string } -// The jsii proxy struct for AllowedMethodNames -type jsiiProxy_AllowedMethodNames struct { +// The jsii proxy struct for GreetingAugmenter +type jsiiProxy_GreetingAugmenter struct { _ byte // padding } -func NewAllowedMethodNames() AllowedMethodNames { +func NewGreetingAugmenter() GreetingAugmenter { _init_.Initialize() - j := jsiiProxy_AllowedMethodNames{} + j := jsiiProxy_GreetingAugmenter{} _jsii_.Create( - "jsii-calc.AllowedMethodNames", + "jsii-calc.GreetingAugmenter", nil, // no parameters &j, ) @@ -7773,438 +8351,548 @@ func NewAllowedMethodNames() AllowedMethodNames { return &j } -func NewAllowedMethodNames_Override(a AllowedMethodNames) { +func NewGreetingAugmenter_Override(g GreetingAugmenter) { _init_.Initialize() _jsii_.Create( - "jsii-calc.AllowedMethodNames", + "jsii-calc.GreetingAugmenter", nil, // no parameters - a, - ) -} - -func (a *jsiiProxy_AllowedMethodNames) GetBar(_p1 *string, _p2 *float64) { - _jsii_.InvokeVoid( - a, - "getBar", - []interface{}{_p1, _p2}, + g, ) } -func (a *jsiiProxy_AllowedMethodNames) GetFoo(withParam *string) *string { +func (g *jsiiProxy_GreetingAugmenter) BetterGreeting(friendly scopejsiicalclib.IFriendly) *string { var returns *string _jsii_.Invoke( - a, - "getFoo", - []interface{}{withParam}, + g, + "betterGreeting", + []interface{}{friendly}, &returns, ) return returns } -func (a *jsiiProxy_AllowedMethodNames) SetBar(_x *string, _y *float64, _z *bool) { - _jsii_.InvokeVoid( - a, - "setBar", - []interface{}{_x, _y, _z}, + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IAnonymousImplementationProvider.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +// We can return an anonymous interface implementation from an override without losing the interface declarations. +type IAnonymousImplementationProvider interface { + ProvideAsClass() Implementation + ProvideAsInterface() IAnonymouslyImplementMe +} + +// The jsii proxy for IAnonymousImplementationProvider +type jsiiProxy_IAnonymousImplementationProvider struct { + _ byte // padding +} + +func (i *jsiiProxy_IAnonymousImplementationProvider) ProvideAsClass() Implementation { + var returns Implementation + + _jsii_.Invoke( + i, + "provideAsClass", + nil, // no parameters + &returns, ) + + return returns } -func (a *jsiiProxy_AllowedMethodNames) SetFoo(_x *string, _y *float64) { - _jsii_.InvokeVoid( - a, - "setFoo", - []interface{}{_x, _y}, +func (i *jsiiProxy_IAnonymousImplementationProvider) ProvideAsInterface() IAnonymouslyImplementMe { + var returns IAnonymouslyImplementMe + + _jsii_.Invoke( + i, + "provideAsInterface", + nil, // no parameters + &returns, ) + + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AmbiguousParameters.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IAnonymouslyImplementMe.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type AmbiguousParameters interface { - Props() *StructParameterType - Scope() Bell +type IAnonymouslyImplementMe interface { + Verb() *string + Value() *float64 } -// The jsii proxy struct for AmbiguousParameters -type jsiiProxy_AmbiguousParameters struct { +// The jsii proxy for IAnonymouslyImplementMe +type jsiiProxy_IAnonymouslyImplementMe struct { _ byte // padding } -func (j *jsiiProxy_AmbiguousParameters) Props() *StructParameterType { - var returns *StructParameterType - _jsii_.Get( - j, - "props", +func (i *jsiiProxy_IAnonymouslyImplementMe) Verb() *string { + var returns *string + + _jsii_.Invoke( + i, + "verb", + nil, // no parameters &returns, ) + return returns } -func (j *jsiiProxy_AmbiguousParameters) Scope() Bell { - var returns Bell +func (j *jsiiProxy_IAnonymouslyImplementMe) Value() *float64 { + var returns *float64 _jsii_.Get( j, - "scope", + "value", &returns, ) return returns } -func NewAmbiguousParameters(scope Bell, props *StructParameterType) AmbiguousParameters { - _init_.Initialize() +`; - j := jsiiProxy_AmbiguousParameters{} +exports[`Generated code for "jsii-calc": /go/jsiicalc/IAnotherPublicInterface.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - _jsii_.Create( - "jsii-calc.AmbiguousParameters", - []interface{}{scope, props}, - &j, - ) +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) - return &j +type IAnotherPublicInterface interface { + A() *string + SetA(a *string) } -func NewAmbiguousParameters_Override(a AmbiguousParameters, scope Bell, props *StructParameterType) { - _init_.Initialize() +// The jsii proxy for IAnotherPublicInterface +type jsiiProxy_IAnotherPublicInterface struct { + _ byte // padding +} - _jsii_.Create( - "jsii-calc.AmbiguousParameters", - []interface{}{scope, props}, - a, +func (j *jsiiProxy_IAnotherPublicInterface) A() *string { + var returns *string + _jsii_.Get( + j, + "a", + &returns, + ) + return returns +} + +func (j *jsiiProxy_IAnotherPublicInterface)SetA(val *string) { + _jsii_.Set( + j, + "a", + val, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AnonymousImplementationProvider.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IBell.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type AnonymousImplementationProvider interface { - IAnonymousImplementationProvider - ProvideAsClass() Implementation - ProvideAsInterface() IAnonymouslyImplementMe +type IBell interface { + Ring() } -// The jsii proxy struct for AnonymousImplementationProvider -type jsiiProxy_AnonymousImplementationProvider struct { - jsiiProxy_IAnonymousImplementationProvider +// The jsii proxy for IBell +type jsiiProxy_IBell struct { + _ byte // padding } -func NewAnonymousImplementationProvider() AnonymousImplementationProvider { - _init_.Initialize() - - j := jsiiProxy_AnonymousImplementationProvider{} - - _jsii_.Create( - "jsii-calc.AnonymousImplementationProvider", +func (i *jsiiProxy_IBell) Ring() { + _jsii_.InvokeVoid( + i, + "ring", nil, // no parameters - &j, ) +} - return &j + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IBellRinger.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +// Takes the object parameter as an interface. +type IBellRinger interface { + YourTurn(bell IBell) } -func NewAnonymousImplementationProvider_Override(a AnonymousImplementationProvider) { - _init_.Initialize() +// The jsii proxy for IBellRinger +type jsiiProxy_IBellRinger struct { + _ byte // padding +} - _jsii_.Create( - "jsii-calc.AnonymousImplementationProvider", - nil, // no parameters - a, +func (i *jsiiProxy_IBellRinger) YourTurn(bell IBell) { + _jsii_.InvokeVoid( + i, + "yourTurn", + []interface{}{bell}, ) } -func (a *jsiiProxy_AnonymousImplementationProvider) ProvideAsClass() Implementation { - var returns Implementation - _jsii_.Invoke( - a, - "provideAsClass", - nil, // no parameters - &returns, - ) +`; - return returns +exports[`Generated code for "jsii-calc": /go/jsiicalc/IConcreteBellRinger.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +// Takes the object parameter as a calss. +type IConcreteBellRinger interface { + YourTurn(bell Bell) } -func (a *jsiiProxy_AnonymousImplementationProvider) ProvideAsInterface() IAnonymouslyImplementMe { - var returns IAnonymouslyImplementMe +// The jsii proxy for IConcreteBellRinger +type jsiiProxy_IConcreteBellRinger struct { + _ byte // padding +} - _jsii_.Invoke( - a, - "provideAsInterface", - nil, // no parameters - &returns, +func (i *jsiiProxy_IConcreteBellRinger) YourTurn(bell Bell) { + _jsii_.InvokeVoid( + i, + "yourTurn", + []interface{}{bell}, ) - - return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AsyncVirtualMethods.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IDeprecatedInterface.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type AsyncVirtualMethods interface { - CallMe() *float64 - // Just calls "overrideMeToo". - CallMe2() *float64 - // This method calls the "callMe" async method indirectly, which will then invoke a virtual method. - // - // This is a "double promise" situation, which - // means that callbacks are not going to be available immediate, but only - // after an "immediates" cycle. - CallMeDoublePromise() *float64 - DontOverrideMe() *float64 - OverrideMe(mult *float64) *float64 - OverrideMeToo() *float64 +// Deprecated: useless interface. +type IDeprecatedInterface interface { + // Deprecated: services no purpose. + Method() + // Deprecated: could be better. + MutableProperty() *float64 + // Deprecated: could be better. + SetMutableProperty(m *float64) } -// The jsii proxy struct for AsyncVirtualMethods -type jsiiProxy_AsyncVirtualMethods struct { +// The jsii proxy for IDeprecatedInterface +type jsiiProxy_IDeprecatedInterface struct { _ byte // padding } -func NewAsyncVirtualMethods() AsyncVirtualMethods { - _init_.Initialize() +func (i *jsiiProxy_IDeprecatedInterface) Method() { + _jsii_.InvokeVoid( + i, + "method", + nil, // no parameters + ) +} - j := jsiiProxy_AsyncVirtualMethods{} +func (j *jsiiProxy_IDeprecatedInterface) MutableProperty() *float64 { + var returns *float64 + _jsii_.Get( + j, + "mutableProperty", + &returns, + ) + return returns +} - _jsii_.Create( - "jsii-calc.AsyncVirtualMethods", - nil, // no parameters - &j, +func (j *jsiiProxy_IDeprecatedInterface)SetMutableProperty(val *float64) { + _jsii_.Set( + j, + "mutableProperty", + val, ) +} - return &j + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IExperimentalInterface.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +// Experimental. +type IExperimentalInterface interface { + // Experimental. + Method() + // Experimental. + MutableProperty() *float64 + // Experimental. + SetMutableProperty(m *float64) } -func NewAsyncVirtualMethods_Override(a AsyncVirtualMethods) { - _init_.Initialize() +// The jsii proxy for IExperimentalInterface +type jsiiProxy_IExperimentalInterface struct { + _ byte // padding +} - _jsii_.Create( - "jsii-calc.AsyncVirtualMethods", +func (i *jsiiProxy_IExperimentalInterface) Method() { + _jsii_.InvokeVoid( + i, + "method", nil, // no parameters - a, ) } -func (a *jsiiProxy_AsyncVirtualMethods) CallMe() *float64 { +func (j *jsiiProxy_IExperimentalInterface) MutableProperty() *float64 { var returns *float64 - - _jsii_.Invoke( - a, - "callMe", - nil, // no parameters + _jsii_.Get( + j, + "mutableProperty", &returns, ) - return returns } -func (a *jsiiProxy_AsyncVirtualMethods) CallMe2() *float64 { - var returns *float64 - - _jsii_.Invoke( - a, - "callMe2", - nil, // no parameters - &returns, +func (j *jsiiProxy_IExperimentalInterface)SetMutableProperty(val *float64) { + _jsii_.Set( + j, + "mutableProperty", + val, ) +} - return returns + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IExtendsPrivateInterface.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +type IExtendsPrivateInterface interface { + MoreThings() *[]*string + Private() *string + SetPrivate(p *string) } -func (a *jsiiProxy_AsyncVirtualMethods) CallMeDoublePromise() *float64 { - var returns *float64 +// The jsii proxy for IExtendsPrivateInterface +type jsiiProxy_IExtendsPrivateInterface struct { + _ byte // padding +} - _jsii_.Invoke( - a, - "callMeDoublePromise", - nil, // no parameters +func (j *jsiiProxy_IExtendsPrivateInterface) MoreThings() *[]*string { + var returns *[]*string + _jsii_.Get( + j, + "moreThings", &returns, ) - return returns } -func (a *jsiiProxy_AsyncVirtualMethods) DontOverrideMe() *float64 { - var returns *float64 - - _jsii_.Invoke( - a, - "dontOverrideMe", - nil, // no parameters +func (j *jsiiProxy_IExtendsPrivateInterface) Private() *string { + var returns *string + _jsii_.Get( + j, + "private", &returns, ) - return returns } -func (a *jsiiProxy_AsyncVirtualMethods) OverrideMe(mult *float64) *float64 { - var returns *float64 - - _jsii_.Invoke( - a, - "overrideMe", - []interface{}{mult}, - &returns, +func (j *jsiiProxy_IExtendsPrivateInterface)SetPrivate(val *string) { + _jsii_.Set( + j, + "private", + val, ) +} - return returns + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IExternalInterface.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +type IExternalInterface interface { + Method() + MutableProperty() *float64 + SetMutableProperty(m *float64) } -func (a *jsiiProxy_AsyncVirtualMethods) OverrideMeToo() *float64 { - var returns *float64 +// The jsii proxy for IExternalInterface +type jsiiProxy_IExternalInterface struct { + _ byte // padding +} - _jsii_.Invoke( - a, - "overrideMeToo", +func (i *jsiiProxy_IExternalInterface) Method() { + _jsii_.InvokeVoid( + i, + "method", nil, // no parameters + ) +} + +func (j *jsiiProxy_IExternalInterface) MutableProperty() *float64 { + var returns *float64 + _jsii_.Get( + j, + "mutableProperty", &returns, ) - - return returns + return returns +} + +func (j *jsiiProxy_IExternalInterface)SetMutableProperty(val *float64) { + _jsii_.Set( + j, + "mutableProperty", + val, + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AugmentableClass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IFriendlier.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -type AugmentableClass interface { - MethodOne() - MethodTwo() +// Even friendlier classes can implement this interface. +type IFriendlier interface { + scopejsiicalclib.IFriendly + // Say farewell. + Farewell() *string + // Say goodbye. + // + // Returns: A goodbye blessing. + Goodbye() *string } -// The jsii proxy struct for AugmentableClass -type jsiiProxy_AugmentableClass struct { - _ byte // padding +// The jsii proxy for IFriendlier +type jsiiProxy_IFriendlier struct { + internal.Type__scopejsiicalclibIFriendly } -func NewAugmentableClass() AugmentableClass { - _init_.Initialize() - - j := jsiiProxy_AugmentableClass{} +func (i *jsiiProxy_IFriendlier) Farewell() *string { + var returns *string - _jsii_.Create( - "jsii-calc.AugmentableClass", + _jsii_.Invoke( + i, + "farewell", nil, // no parameters - &j, + &returns, ) - return &j + return returns } -func NewAugmentableClass_Override(a AugmentableClass) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.AugmentableClass", - nil, // no parameters - a, - ) -} +func (i *jsiiProxy_IFriendlier) Goodbye() *string { + var returns *string -func (a *jsiiProxy_AugmentableClass) MethodOne() { - _jsii_.InvokeVoid( - a, - "methodOne", + _jsii_.Invoke( + i, + "goodbye", nil, // no parameters + &returns, ) -} -func (a *jsiiProxy_AugmentableClass) MethodTwo() { - _jsii_.InvokeVoid( - a, - "methodTwo", - nil, // no parameters - ) + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_BaseClass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IFriendlyRandomGenerator.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -type BaseClass interface { - Property() *string - Method() *float64 +type IFriendlyRandomGenerator interface { + scopejsiicalclib.IFriendly + IRandomNumberGenerator } -// The jsii proxy struct for BaseClass -type jsiiProxy_BaseClass struct { - _ byte // padding +// The jsii proxy for IFriendlyRandomGenerator +type jsiiProxy_IFriendlyRandomGenerator struct { + internal.Type__scopejsiicalclibIFriendly + jsiiProxy_IRandomNumberGenerator } -func (j *jsiiProxy_BaseClass) Property() *string { +func (i *jsiiProxy_IFriendlyRandomGenerator) Hello() *string { var returns *string - _jsii_.Get( - j, - "property", - &returns, - ) - return returns -} - - -func NewBaseClass_Override(b BaseClass) { - _init_.Initialize() - _jsii_.Create( - "jsii-calc.BaseClass", + _jsii_.Invoke( + i, + "hello", nil, // no parameters - b, + &returns, ) + + return returns } -func (b *jsiiProxy_BaseClass) Method() *float64 { +func (i *jsiiProxy_IFriendlyRandomGenerator) Next() *float64 { var returns *float64 _jsii_.Invoke( - b, - "method", + i, + "next", nil, // no parameters &returns, ) @@ -8215,1092 +8903,1049 @@ func (b *jsiiProxy_BaseClass) Method() *float64 { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_BaseJsii976.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IIndirectlyImplemented.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type BaseJsii976 interface { +type IIndirectlyImplemented interface { + Method() *float64 + Property() *string } -// The jsii proxy struct for BaseJsii976 -type jsiiProxy_BaseJsii976 struct { +// The jsii proxy for IIndirectlyImplemented +type jsiiProxy_IIndirectlyImplemented struct { _ byte // padding } -func NewBaseJsii976() BaseJsii976 { - _init_.Initialize() - - j := jsiiProxy_BaseJsii976{} +func (i *jsiiProxy_IIndirectlyImplemented) Method() *float64 { + var returns *float64 - _jsii_.Create( - "jsii-calc.BaseJsii976", + _jsii_.Invoke( + i, + "method", nil, // no parameters - &j, + &returns, ) - return &j + return returns } -func NewBaseJsii976_Override(b BaseJsii976) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.BaseJsii976", - nil, // no parameters - b, +func (j *jsiiProxy_IIndirectlyImplemented) Property() *string { + var returns *string + _jsii_.Get( + j, + "property", + &returns, ) + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Bell.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceImplementedByAbstractClass.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type Bell interface { - IBell - Rung() *bool - SetRung(val *bool) - Ring() +// awslabs/jsii#220 Abstract return type. +type IInterfaceImplementedByAbstractClass interface { + PropFromInterface() *string } -// The jsii proxy struct for Bell -type jsiiProxy_Bell struct { - jsiiProxy_IBell +// The jsii proxy for IInterfaceImplementedByAbstractClass +type jsiiProxy_IInterfaceImplementedByAbstractClass struct { + _ byte // padding } -func (j *jsiiProxy_Bell) Rung() *bool { - var returns *bool +func (j *jsiiProxy_IInterfaceImplementedByAbstractClass) PropFromInterface() *string { + var returns *string _jsii_.Get( j, - "rung", + "propFromInterface", &returns, ) return returns } -func NewBell() Bell { - _init_.Initialize() +`; - j := jsiiProxy_Bell{} +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceThatShouldNotBeADataType.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - _jsii_.Create( - "jsii-calc.Bell", - nil, // no parameters - &j, - ) +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) - return &j +// Even though this interface has only properties, it is disqualified from being a datatype because it inherits from an interface that is not a datatype. +type IInterfaceThatShouldNotBeADataType interface { + IInterfaceWithMethods + OtherValue() *string } -func NewBell_Override(b Bell) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.Bell", - nil, // no parameters - b, - ) +// The jsii proxy for IInterfaceThatShouldNotBeADataType +type jsiiProxy_IInterfaceThatShouldNotBeADataType struct { + jsiiProxy_IInterfaceWithMethods } -func (j *jsiiProxy_Bell)SetRung(val *bool) { - _jsii_.Set( +func (j *jsiiProxy_IInterfaceThatShouldNotBeADataType) OtherValue() *string { + var returns *string + _jsii_.Get( j, - "rung", - val, - ) -} - -func (b *jsiiProxy_Bell) Ring() { - _jsii_.InvokeVoid( - b, - "ring", - nil, // no parameters + "otherValue", + &returns, ) + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_BinaryOperation.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceWithInternal.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -// Represents an operation with two operands. -type BinaryOperation interface { - scopejsiicalclib.Operation - scopejsiicalclib.IFriendly - // Left-hand side operand. - Lhs() scopejsiicalclib.NumericValue - // Right-hand side operand. - Rhs() scopejsiicalclib.NumericValue - // The value. - // Deprecated. - Value() *float64 - // Say hello! - Hello() *string - // String representation of the value. - // Deprecated. - ToString() *string - // Returns: the name of the class (to verify native type names are created for derived classes). - TypeName() interface{} +type IInterfaceWithInternal interface { + Visible() } -// The jsii proxy struct for BinaryOperation -type jsiiProxy_BinaryOperation struct { - internal.Type__scopejsiicalclibOperation - internal.Type__scopejsiicalclibIFriendly +// The jsii proxy for IInterfaceWithInternal +type jsiiProxy_IInterfaceWithInternal struct { + _ byte // padding } -func (j *jsiiProxy_BinaryOperation) Lhs() scopejsiicalclib.NumericValue { - var returns scopejsiicalclib.NumericValue - _jsii_.Get( - j, - "lhs", - &returns, +func (i *jsiiProxy_IInterfaceWithInternal) Visible() { + _jsii_.InvokeVoid( + i, + "visible", + nil, // no parameters ) - return returns } -func (j *jsiiProxy_BinaryOperation) Rhs() scopejsiicalclib.NumericValue { - var returns scopejsiicalclib.NumericValue - _jsii_.Get( - j, - "rhs", - &returns, - ) - return returns -} -func (j *jsiiProxy_BinaryOperation) Value() *float64 { - var returns *float64 - _jsii_.Get( - j, - "value", - &returns, - ) - return returns -} +`; +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceWithMethods.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -// Creates a BinaryOperation. -func NewBinaryOperation_Override(b BinaryOperation, lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) { - _init_.Initialize() +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) - _jsii_.Create( - "jsii-calc.BinaryOperation", - []interface{}{lhs, rhs}, - b, - ) +type IInterfaceWithMethods interface { + DoThings() + Value() *string } -func (b *jsiiProxy_BinaryOperation) Hello() *string { - var returns *string - - _jsii_.Invoke( - b, - "hello", - nil, // no parameters - &returns, - ) - - return returns +// The jsii proxy for IInterfaceWithMethods +type jsiiProxy_IInterfaceWithMethods struct { + _ byte // padding } -func (b *jsiiProxy_BinaryOperation) ToString() *string { - var returns *string - - _jsii_.Invoke( - b, - "toString", +func (i *jsiiProxy_IInterfaceWithMethods) DoThings() { + _jsii_.InvokeVoid( + i, + "doThings", nil, // no parameters - &returns, ) - - return returns } -func (b *jsiiProxy_BinaryOperation) TypeName() interface{} { - var returns interface{} - - _jsii_.Invoke( - b, - "typeName", - nil, // no parameters +func (j *jsiiProxy_IInterfaceWithMethods) Value() *string { + var returns *string + _jsii_.Get( + j, + "value", &returns, ) - return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_BurriedAnonymousObject.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceWithOptionalMethodArguments.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// See https://github.com/aws/aws-cdk/issues/7977. -type BurriedAnonymousObject interface { - Check() *bool - // Implement this method and have it return it's parameter. - // - // Returns: \`value\`. - GiveItBack(value interface{}) interface{} +// awslabs/jsii#175 Interface proxies (and builders) do not respect optional arguments in methods. +type IInterfaceWithOptionalMethodArguments interface { + Hello(arg1 *string, arg2 *float64) } -// The jsii proxy struct for BurriedAnonymousObject -type jsiiProxy_BurriedAnonymousObject struct { +// The jsii proxy for IInterfaceWithOptionalMethodArguments +type jsiiProxy_IInterfaceWithOptionalMethodArguments struct { _ byte // padding } -func NewBurriedAnonymousObject_Override(b BurriedAnonymousObject) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.BurriedAnonymousObject", - nil, // no parameters - b, - ) -} - -func (b *jsiiProxy_BurriedAnonymousObject) Check() *bool { - var returns *bool - - _jsii_.Invoke( - b, - "check", - nil, // no parameters - &returns, - ) - - return returns -} - -func (b *jsiiProxy_BurriedAnonymousObject) GiveItBack(value interface{}) interface{} { - var returns interface{} - - _jsii_.Invoke( - b, - "giveItBack", - []interface{}{value}, - &returns, +func (i *jsiiProxy_IInterfaceWithOptionalMethodArguments) Hello(arg1 *string, arg2 *float64) { + _jsii_.InvokeVoid( + i, + "hello", + []interface{}{arg1, arg2}, ) - - return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Calculator.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceWithProperties.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition" - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -// A calculator which maintains a current value and allows adding operations. -// -// Here's how you use it: -// -// \`\`\`ts -// const calculator = new calc.Calculator(); -// calculator.add(5); -// calculator.mul(3); -// console.log(calculator.expression.value); -// \`\`\` -// -// I will repeat this example again, but in an @example tag. -// -// Example: -// calculator := calc.NewCalculator() -// calculator.Add(jsii.Number(5)) -// calculator.Mul(jsii.Number(3)) -// fmt.Println(calculator.expression.Value) -// -type Calculator interface { - composition.CompositeOperation - // The current value. - Curr() scopejsiicalclib.NumericValue - SetCurr(val scopejsiicalclib.NumericValue) - // A set of postfixes to include in a decorated .toString(). - DecorationPostfixes() *[]*string - SetDecorationPostfixes(val *[]*string) - // A set of prefixes to include in a decorated .toString(). - DecorationPrefixes() *[]*string - SetDecorationPrefixes(val *[]*string) - // Returns the expression. - Expression() scopejsiicalclib.NumericValue - // The maximum value allows in this calculator. - MaxValue() *float64 - SetMaxValue(val *float64) - // A log of all operations. - OperationsLog() *[]scopejsiicalclib.NumericValue - // A map of per operation name of all operations performed. - OperationsMap() *map[string]*[]scopejsiicalclib.NumericValue - // The .toString() style. - StringStyle() composition.CompositeOperation_CompositionStringStyle - SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) - // Example of a property that accepts a union of types. - UnionProperty() interface{} - SetUnionProperty(val interface{}) - // The value. - Value() *float64 - // Adds a number to the current value. - Add(value *float64) - // Multiplies the current value by a number. - Mul(value *float64) - // Negates the current value. - Neg() - // Raises the current value by a power. - Pow(value *float64) - // Returns teh value of the union property (if defined). - ReadUnionValue() *float64 - // String representation of the value. - ToString() *string - // Returns: the name of the class (to verify native type names are created for derived classes). - TypeName() interface{} +type IInterfaceWithProperties interface { + ReadOnlyString() *string + ReadWriteString() *string + SetReadWriteString(r *string) } -// The jsii proxy struct for Calculator -type jsiiProxy_Calculator struct { - internal.Type__compositionCompositeOperation +// The jsii proxy for IInterfaceWithProperties +type jsiiProxy_IInterfaceWithProperties struct { + _ byte // padding } -func (j *jsiiProxy_Calculator) Curr() scopejsiicalclib.NumericValue { - var returns scopejsiicalclib.NumericValue +func (j *jsiiProxy_IInterfaceWithProperties) ReadOnlyString() *string { + var returns *string _jsii_.Get( j, - "curr", + "readOnlyString", &returns, ) return returns } -func (j *jsiiProxy_Calculator) DecorationPostfixes() *[]*string { - var returns *[]*string +func (j *jsiiProxy_IInterfaceWithProperties) ReadWriteString() *string { + var returns *string _jsii_.Get( j, - "decorationPostfixes", + "readWriteString", &returns, ) return returns } -func (j *jsiiProxy_Calculator) DecorationPrefixes() *[]*string { - var returns *[]*string - _jsii_.Get( +func (j *jsiiProxy_IInterfaceWithProperties)SetReadWriteString(val *string) { + _jsii_.Set( j, - "decorationPrefixes", - &returns, + "readWriteString", + val, ) - return returns } -func (j *jsiiProxy_Calculator) Expression() scopejsiicalclib.NumericValue { - var returns scopejsiicalclib.NumericValue - _jsii_.Get( - j, - "expression", - &returns, - ) - return returns + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceWithPropertiesExtension.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +type IInterfaceWithPropertiesExtension interface { + IInterfaceWithProperties + Foo() *float64 + SetFoo(f *float64) +} + +// The jsii proxy for IInterfaceWithPropertiesExtension +type jsiiProxy_IInterfaceWithPropertiesExtension struct { + jsiiProxy_IInterfaceWithProperties } -func (j *jsiiProxy_Calculator) MaxValue() *float64 { +func (j *jsiiProxy_IInterfaceWithPropertiesExtension) Foo() *float64 { var returns *float64 _jsii_.Get( j, - "maxValue", + "foo", &returns, ) return returns } -func (j *jsiiProxy_Calculator) OperationsLog() *[]scopejsiicalclib.NumericValue { - var returns *[]scopejsiicalclib.NumericValue - _jsii_.Get( +func (j *jsiiProxy_IInterfaceWithPropertiesExtension)SetFoo(val *float64) { + _jsii_.Set( j, - "operationsLog", - &returns, + "foo", + val, ) - return returns } -func (j *jsiiProxy_Calculator) OperationsMap() *map[string]*[]scopejsiicalclib.NumericValue { - var returns *map[string]*[]scopejsiicalclib.NumericValue - _jsii_.Get( - j, - "operationsMap", - &returns, + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IJSII417Derived.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +type IJSII417Derived interface { + IJSII417PublicBaseOfBase + Bar() + Baz() + Property() *string +} + +// The jsii proxy for IJSII417Derived +type jsiiProxy_IJSII417Derived struct { + jsiiProxy_IJSII417PublicBaseOfBase +} + +func (i *jsiiProxy_IJSII417Derived) Bar() { + _jsii_.InvokeVoid( + i, + "bar", + nil, // no parameters ) - return returns } -func (j *jsiiProxy_Calculator) StringStyle() composition.CompositeOperation_CompositionStringStyle { - var returns composition.CompositeOperation_CompositionStringStyle - _jsii_.Get( - j, - "stringStyle", - &returns, +func (i *jsiiProxy_IJSII417Derived) Baz() { + _jsii_.InvokeVoid( + i, + "baz", + nil, // no parameters ) - return returns } -func (j *jsiiProxy_Calculator) UnionProperty() interface{} { - var returns interface{} +func (j *jsiiProxy_IJSII417Derived) Property() *string { + var returns *string _jsii_.Get( j, - "unionProperty", + "property", &returns, ) return returns } -func (j *jsiiProxy_Calculator) Value() *float64 { - var returns *float64 + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IJSII417PublicBaseOfBase.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +type IJSII417PublicBaseOfBase interface { + Foo() + HasRoot() *bool +} + +// The jsii proxy for IJSII417PublicBaseOfBase +type jsiiProxy_IJSII417PublicBaseOfBase struct { + _ byte // padding +} + +func (i *jsiiProxy_IJSII417PublicBaseOfBase) Foo() { + _jsii_.InvokeVoid( + i, + "foo", + nil, // no parameters + ) +} + +func (j *jsiiProxy_IJSII417PublicBaseOfBase) HasRoot() *bool { + var returns *bool _jsii_.Get( j, - "value", + "hasRoot", &returns, ) return returns } -// Creates a Calculator object. -func NewCalculator(props *CalculatorProps) Calculator { - _init_.Initialize() +`; - j := jsiiProxy_Calculator{} +exports[`Generated code for "jsii-calc": /go/jsiicalc/IJavaReservedWordsInAnInterface.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - _jsii_.Create( - "jsii-calc.Calculator", - []interface{}{props}, - &j, - ) +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) - return &j +type IJavaReservedWordsInAnInterface interface { + Abstract() + Assert() + Boolean() + Break() + Byte() + Case() + Catch() + Char() + Class() + Const() + Continue() + Default() + Do() + Double() + Else() + Enum() + Extends() + False() + Final() + Finally() + Float() + For() + Goto() + If() + Implements() + Import() + Instanceof() + Int() + Interface() + Long() + Native() + Null() + Package() + Private() + Protected() + Public() + Return() + Short() + Static() + Strictfp() + Super() + Switch() + Synchronized() + This() + Throw() + Throws() + Transient() + True() + Try() + Void() + Volatile() + While() *string } -// Creates a Calculator object. -func NewCalculator_Override(c Calculator, props *CalculatorProps) { - _init_.Initialize() +// The jsii proxy for IJavaReservedWordsInAnInterface +type jsiiProxy_IJavaReservedWordsInAnInterface struct { + _ byte // padding +} - _jsii_.Create( - "jsii-calc.Calculator", - []interface{}{props}, - c, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Abstract() { + _jsii_.InvokeVoid( + i, + "abstract", + nil, // no parameters ) } -func (j *jsiiProxy_Calculator)SetCurr(val scopejsiicalclib.NumericValue) { - _jsii_.Set( - j, - "curr", - val, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Assert() { + _jsii_.InvokeVoid( + i, + "assert", + nil, // no parameters ) } -func (j *jsiiProxy_Calculator)SetDecorationPostfixes(val *[]*string) { - _jsii_.Set( - j, - "decorationPostfixes", - val, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Boolean() { + _jsii_.InvokeVoid( + i, + "boolean", + nil, // no parameters ) } -func (j *jsiiProxy_Calculator)SetDecorationPrefixes(val *[]*string) { - _jsii_.Set( - j, - "decorationPrefixes", - val, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Break() { + _jsii_.InvokeVoid( + i, + "break", + nil, // no parameters ) } -func (j *jsiiProxy_Calculator)SetMaxValue(val *float64) { - _jsii_.Set( - j, - "maxValue", - val, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Byte() { + _jsii_.InvokeVoid( + i, + "byte", + nil, // no parameters ) } -func (j *jsiiProxy_Calculator)SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) { - _jsii_.Set( - j, - "stringStyle", - val, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Case() { + _jsii_.InvokeVoid( + i, + "case", + nil, // no parameters ) } -func (j *jsiiProxy_Calculator)SetUnionProperty(val interface{}) { - _jsii_.Set( - j, - "unionProperty", - val, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Catch() { + _jsii_.InvokeVoid( + i, + "catch", + nil, // no parameters ) } -func (c *jsiiProxy_Calculator) Add(value *float64) { +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Char() { _jsii_.InvokeVoid( - c, - "add", - []interface{}{value}, + i, + "char", + nil, // no parameters ) } -func (c *jsiiProxy_Calculator) Mul(value *float64) { +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Class() { _jsii_.InvokeVoid( - c, - "mul", - []interface{}{value}, + i, + "class", + nil, // no parameters ) } -func (c *jsiiProxy_Calculator) Neg() { +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Const() { _jsii_.InvokeVoid( - c, - "neg", + i, + "const", nil, // no parameters ) } -func (c *jsiiProxy_Calculator) Pow(value *float64) { +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Continue() { _jsii_.InvokeVoid( - c, - "pow", - []interface{}{value}, + i, + "continue", + nil, // no parameters ) } -func (c *jsiiProxy_Calculator) ReadUnionValue() *float64 { - var returns *float64 - - _jsii_.Invoke( - c, - "readUnionValue", +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Default() { + _jsii_.InvokeVoid( + i, + "default", nil, // no parameters - &returns, ) - - return returns } -func (c *jsiiProxy_Calculator) ToString() *string { - var returns *string - - _jsii_.Invoke( - c, - "toString", +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Do() { + _jsii_.InvokeVoid( + i, + "do", nil, // no parameters - &returns, ) - - return returns } -func (c *jsiiProxy_Calculator) TypeName() interface{} { - var returns interface{} - - _jsii_.Invoke( - c, - "typeName", +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Double() { + _jsii_.InvokeVoid( + i, + "double", nil, // no parameters - &returns, ) - - return returns } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_CalculatorProps.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -// Properties for Calculator. -type CalculatorProps struct { - // The initial value of the calculator. - // - // NOTE: Any number works here, it's fine. - InitialValue *float64 \`field:"optional" json:"initialValue" yaml:"initialValue"\` - // The maximum value the calculator can store. - MaximumValue *float64 \`field:"optional" json:"maximumValue" yaml:"maximumValue"\` +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Else() { + _jsii_.InvokeVoid( + i, + "else", + nil, // no parameters + ) } +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Enum() { + _jsii_.InvokeVoid( + i, + "enum", + nil, // no parameters + ) +} -`; +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Extends() { + _jsii_.InvokeVoid( + i, + "extends", + nil, // no parameters + ) +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ChildStruct982.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) False() { + _jsii_.InvokeVoid( + i, + "false", + nil, // no parameters + ) +} +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Final() { + _jsii_.InvokeVoid( + i, + "final", + nil, // no parameters + ) +} -type ChildStruct982 struct { - Foo *string \`field:"required" json:"foo" yaml:"foo"\` - Bar *float64 \`field:"required" json:"bar" yaml:"bar"\` +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Finally() { + _jsii_.InvokeVoid( + i, + "finally", + nil, // no parameters + ) } +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Float() { + _jsii_.InvokeVoid( + i, + "float", + nil, // no parameters + ) +} -`; +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) For() { + _jsii_.InvokeVoid( + i, + "for", + nil, // no parameters + ) +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassThatImplementsTheInternalInterface.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Goto() { + _jsii_.InvokeVoid( + i, + "goto", + nil, // no parameters + ) +} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) If() { + _jsii_.InvokeVoid( + i, + "if", + nil, // no parameters + ) +} -type ClassThatImplementsTheInternalInterface interface { - INonInternalInterface - A() *string - SetA(val *string) - B() *string - SetB(val *string) - C() *string - SetC(val *string) - D() *string - SetD(val *string) +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Implements() { + _jsii_.InvokeVoid( + i, + "implements", + nil, // no parameters + ) } -// The jsii proxy struct for ClassThatImplementsTheInternalInterface -type jsiiProxy_ClassThatImplementsTheInternalInterface struct { - jsiiProxy_INonInternalInterface +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Import() { + _jsii_.InvokeVoid( + i, + "import", + nil, // no parameters + ) } -func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) A() *string { - var returns *string - _jsii_.Get( - j, - "a", - &returns, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Instanceof() { + _jsii_.InvokeVoid( + i, + "instanceof", + nil, // no parameters ) - return returns } -func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) B() *string { - var returns *string - _jsii_.Get( - j, - "b", - &returns, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Int() { + _jsii_.InvokeVoid( + i, + "int", + nil, // no parameters ) - return returns } -func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) C() *string { - var returns *string - _jsii_.Get( - j, - "c", - &returns, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Interface() { + _jsii_.InvokeVoid( + i, + "interface", + nil, // no parameters ) - return returns } -func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) D() *string { - var returns *string - _jsii_.Get( - j, - "d", - &returns, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Long() { + _jsii_.InvokeVoid( + i, + "long", + nil, // no parameters ) - return returns } +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Native() { + _jsii_.InvokeVoid( + i, + "native", + nil, // no parameters + ) +} -func NewClassThatImplementsTheInternalInterface() ClassThatImplementsTheInternalInterface { - _init_.Initialize() +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Null() { + _jsii_.InvokeVoid( + i, + "null", + nil, // no parameters + ) +} - j := jsiiProxy_ClassThatImplementsTheInternalInterface{} +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Package() { + _jsii_.InvokeVoid( + i, + "package", + nil, // no parameters + ) +} - _jsii_.Create( - "jsii-calc.ClassThatImplementsTheInternalInterface", +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Private() { + _jsii_.InvokeVoid( + i, + "private", nil, // no parameters - &j, ) - - return &j } -func NewClassThatImplementsTheInternalInterface_Override(c ClassThatImplementsTheInternalInterface) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.ClassThatImplementsTheInternalInterface", +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Protected() { + _jsii_.InvokeVoid( + i, + "protected", nil, // no parameters - c, ) } -func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetA(val *string) { - _jsii_.Set( - j, - "a", - val, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Public() { + _jsii_.InvokeVoid( + i, + "public", + nil, // no parameters ) } -func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetB(val *string) { - _jsii_.Set( - j, - "b", - val, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Return() { + _jsii_.InvokeVoid( + i, + "return", + nil, // no parameters ) } -func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetC(val *string) { - _jsii_.Set( - j, - "c", - val, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Short() { + _jsii_.InvokeVoid( + i, + "short", + nil, // no parameters ) } -func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetD(val *string) { - _jsii_.Set( - j, - "d", - val, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Static() { + _jsii_.InvokeVoid( + i, + "static", + nil, // no parameters ) } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassThatImplementsThePrivateInterface.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type ClassThatImplementsThePrivateInterface interface { - INonInternalInterface - A() *string - SetA(val *string) - B() *string - SetB(val *string) - C() *string - SetC(val *string) - E() *string - SetE(val *string) +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Strictfp() { + _jsii_.InvokeVoid( + i, + "strictfp", + nil, // no parameters + ) } -// The jsii proxy struct for ClassThatImplementsThePrivateInterface -type jsiiProxy_ClassThatImplementsThePrivateInterface struct { - jsiiProxy_INonInternalInterface +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Super() { + _jsii_.InvokeVoid( + i, + "super", + nil, // no parameters + ) } -func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) A() *string { - var returns *string - _jsii_.Get( - j, - "a", - &returns, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Switch() { + _jsii_.InvokeVoid( + i, + "switch", + nil, // no parameters ) - return returns } -func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) B() *string { - var returns *string - _jsii_.Get( - j, - "b", - &returns, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Synchronized() { + _jsii_.InvokeVoid( + i, + "synchronized", + nil, // no parameters ) - return returns } -func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) C() *string { - var returns *string - _jsii_.Get( - j, - "c", - &returns, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) This() { + _jsii_.InvokeVoid( + i, + "this", + nil, // no parameters ) - return returns } -func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) E() *string { - var returns *string - _jsii_.Get( - j, - "e", - &returns, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Throw() { + _jsii_.InvokeVoid( + i, + "throw", + nil, // no parameters ) - return returns } - -func NewClassThatImplementsThePrivateInterface() ClassThatImplementsThePrivateInterface { - _init_.Initialize() - - j := jsiiProxy_ClassThatImplementsThePrivateInterface{} - - _jsii_.Create( - "jsii-calc.ClassThatImplementsThePrivateInterface", +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Throws() { + _jsii_.InvokeVoid( + i, + "throws", nil, // no parameters - &j, ) - - return &j } -func NewClassThatImplementsThePrivateInterface_Override(c ClassThatImplementsThePrivateInterface) { - _init_.Initialize() +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Transient() { + _jsii_.InvokeVoid( + i, + "transient", + nil, // no parameters + ) +} - _jsii_.Create( - "jsii-calc.ClassThatImplementsThePrivateInterface", +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) True() { + _jsii_.InvokeVoid( + i, + "true", nil, // no parameters - c, ) } -func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetA(val *string) { - _jsii_.Set( - j, - "a", - val, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Try() { + _jsii_.InvokeVoid( + i, + "try", + nil, // no parameters ) } -func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetB(val *string) { - _jsii_.Set( - j, - "b", - val, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Void() { + _jsii_.InvokeVoid( + i, + "void", + nil, // no parameters ) } -func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetC(val *string) { - _jsii_.Set( - j, - "c", - val, +func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Volatile() { + _jsii_.InvokeVoid( + i, + "volatile", + nil, // no parameters ) } -func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetE(val *string) { - _jsii_.Set( +func (j *jsiiProxy_IJavaReservedWordsInAnInterface) While() *string { + var returns *string + _jsii_.Get( j, - "e", - val, + "while", + &returns, ) + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithCollectionOfUnions.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IJsii487External.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) -type ClassWithCollectionOfUnions interface { - UnionProperty() *[]*map[string]interface{} - SetUnionProperty(val *[]*map[string]interface{}) +type IJsii487External interface { } -// The jsii proxy struct for ClassWithCollectionOfUnions -type jsiiProxy_ClassWithCollectionOfUnions struct { +// The jsii proxy for IJsii487External +type jsiiProxy_IJsii487External struct { _ byte // padding } -func (j *jsiiProxy_ClassWithCollectionOfUnions) UnionProperty() *[]*map[string]interface{} { - var returns *[]*map[string]interface{} - _jsii_.Get( - j, - "unionProperty", - &returns, - ) - return returns -} +`; -func NewClassWithCollectionOfUnions(unionProperty *[]*map[string]interface{}) ClassWithCollectionOfUnions { - _init_.Initialize() +exports[`Generated code for "jsii-calc": /go/jsiicalc/IJsii487External2.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - j := jsiiProxy_ClassWithCollectionOfUnions{} - _jsii_.Create( - "jsii-calc.ClassWithCollectionOfUnions", - []interface{}{unionProperty}, - &j, - ) +type IJsii487External2 interface { +} - return &j +// The jsii proxy for IJsii487External2 +type jsiiProxy_IJsii487External2 struct { + _ byte // padding } -func NewClassWithCollectionOfUnions_Override(c ClassWithCollectionOfUnions, unionProperty *[]*map[string]interface{}) { - _init_.Initialize() - _jsii_.Create( - "jsii-calc.ClassWithCollectionOfUnions", - []interface{}{unionProperty}, - c, - ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IJsii496.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type IJsii496 interface { } -func (j *jsiiProxy_ClassWithCollectionOfUnions)SetUnionProperty(val *[]*map[string]interface{}) { - _jsii_.Set( - j, - "unionProperty", - val, - ) +// The jsii proxy for IJsii496 +type jsiiProxy_IJsii496 struct { + _ byte // padding } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithCollections.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IMutableObjectLiteral.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type ClassWithCollections interface { - Array() *[]*string - SetArray(val *[]*string) - Map() *map[string]*string - SetMap(val *map[string]*string) +type IMutableObjectLiteral interface { + Value() *string + SetValue(v *string) } -// The jsii proxy struct for ClassWithCollections -type jsiiProxy_ClassWithCollections struct { +// The jsii proxy for IMutableObjectLiteral +type jsiiProxy_IMutableObjectLiteral struct { _ byte // padding } -func (j *jsiiProxy_ClassWithCollections) Array() *[]*string { - var returns *[]*string +func (j *jsiiProxy_IMutableObjectLiteral) Value() *string { + var returns *string _jsii_.Get( j, - "array", + "value", &returns, ) return returns } -func (j *jsiiProxy_ClassWithCollections) Map() *map[string]*string { - var returns *map[string]*string - _jsii_.Get( +func (j *jsiiProxy_IMutableObjectLiteral)SetValue(val *string) { + _jsii_.Set( j, - "map", - &returns, + "value", + val, ) - return returns } -func NewClassWithCollections(map_ *map[string]*string, array *[]*string) ClassWithCollections { - _init_.Initialize() +`; - j := jsiiProxy_ClassWithCollections{} +exports[`Generated code for "jsii-calc": /go/jsiicalc/INonInternalInterface.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - _jsii_.Create( - "jsii-calc.ClassWithCollections", - []interface{}{map_, array}, - &j, - ) +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) - return &j +type INonInternalInterface interface { + IAnotherPublicInterface + B() *string + SetB(b *string) + C() *string + SetC(c *string) } -func NewClassWithCollections_Override(c ClassWithCollections, map_ *map[string]*string, array *[]*string) { - _init_.Initialize() +// The jsii proxy for INonInternalInterface +type jsiiProxy_INonInternalInterface struct { + jsiiProxy_IAnotherPublicInterface +} - _jsii_.Create( - "jsii-calc.ClassWithCollections", - []interface{}{map_, array}, - c, +func (j *jsiiProxy_INonInternalInterface) B() *string { + var returns *string + _jsii_.Get( + j, + "b", + &returns, ) + return returns } -func (j *jsiiProxy_ClassWithCollections)SetArray(val *[]*string) { +func (j *jsiiProxy_INonInternalInterface)SetB(val *string) { _jsii_.Set( j, - "array", + "b", val, ) } -func (j *jsiiProxy_ClassWithCollections)SetMap(val *map[string]*string) { +func (j *jsiiProxy_INonInternalInterface) C() *string { + var returns *string + _jsii_.Get( + j, + "c", + &returns, + ) + return returns +} + +func (j *jsiiProxy_INonInternalInterface)SetC(val *string) { _jsii_.Set( j, - "map", + "c", val, ) } -func ClassWithCollections_CreateAList() *[]*string { - _init_.Initialize() - var returns *[]*string +`; - _jsii_.StaticInvoke( - "jsii-calc.ClassWithCollections", - "createAList", - nil, // no parameters - &returns, - ) +exports[`Generated code for "jsii-calc": /go/jsiicalc/IObjectWithProperty.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - return returns +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +// Make sure that setters are properly called on objects with interfaces. +type IObjectWithProperty interface { + WasSet() *bool + Property() *string + SetProperty(p *string) } -func ClassWithCollections_CreateAMap() *map[string]*string { - _init_.Initialize() +// The jsii proxy for IObjectWithProperty +type jsiiProxy_IObjectWithProperty struct { + _ byte // padding +} - var returns *map[string]*string +func (i *jsiiProxy_IObjectWithProperty) WasSet() *bool { + var returns *bool - _jsii_.StaticInvoke( - "jsii-calc.ClassWithCollections", - "createAMap", + _jsii_.Invoke( + i, + "wasSet", nil, // no parameters &returns, ) @@ -9308,42 +9953,20 @@ func ClassWithCollections_CreateAMap() *map[string]*string { return returns } -func ClassWithCollections_StaticArray() *[]*string { - _init_.Initialize() - var returns *[]*string - _jsii_.StaticGet( - "jsii-calc.ClassWithCollections", - "staticArray", - &returns, - ) - return returns -} - -func ClassWithCollections_SetStaticArray(val *[]*string) { - _init_.Initialize() - _jsii_.StaticSet( - "jsii-calc.ClassWithCollections", - "staticArray", - val, - ) -} - -func ClassWithCollections_StaticMap() *map[string]*string { - _init_.Initialize() - var returns *map[string]*string - _jsii_.StaticGet( - "jsii-calc.ClassWithCollections", - "staticMap", +func (j *jsiiProxy_IObjectWithProperty) Property() *string { + var returns *string + _jsii_.Get( + j, + "property", &returns, ) return returns } -func ClassWithCollections_SetStaticMap(val *map[string]*string) { - _init_.Initialize() - _jsii_.StaticSet( - "jsii-calc.ClassWithCollections", - "staticMap", +func (j *jsiiProxy_IObjectWithProperty)SetProperty(val *string) { + _jsii_.Set( + j, + "property", val, ) } @@ -9351,210 +9974,164 @@ func ClassWithCollections_SetStaticMap(val *map[string]*string) { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithContainerTypes.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IOptionalMethod.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type ClassWithContainerTypes interface { - Array() *[]*DummyObj - Obj() *map[string]*DummyObj - Props() *ContainerProps - Record() *map[string]*DummyObj +// Checks that optional result from interface method code generates correctly. +type IOptionalMethod interface { + Optional() *string } -// The jsii proxy struct for ClassWithContainerTypes -type jsiiProxy_ClassWithContainerTypes struct { +// The jsii proxy for IOptionalMethod +type jsiiProxy_IOptionalMethod struct { _ byte // padding } -func (j *jsiiProxy_ClassWithContainerTypes) Array() *[]*DummyObj { - var returns *[]*DummyObj - _jsii_.Get( - j, - "array", - &returns, - ) - return returns -} - -func (j *jsiiProxy_ClassWithContainerTypes) Obj() *map[string]*DummyObj { - var returns *map[string]*DummyObj - _jsii_.Get( - j, - "obj", - &returns, - ) - return returns -} +func (i *jsiiProxy_IOptionalMethod) Optional() *string { + var returns *string -func (j *jsiiProxy_ClassWithContainerTypes) Props() *ContainerProps { - var returns *ContainerProps - _jsii_.Get( - j, - "props", + _jsii_.Invoke( + i, + "optional", + nil, // no parameters &returns, ) - return returns -} -func (j *jsiiProxy_ClassWithContainerTypes) Record() *map[string]*DummyObj { - var returns *map[string]*DummyObj - _jsii_.Get( - j, - "record", - &returns, - ) return returns } -func NewClassWithContainerTypes(array *[]*DummyObj, record *map[string]*DummyObj, obj *map[string]*DummyObj, props *ContainerProps) ClassWithContainerTypes { - _init_.Initialize() +`; - j := jsiiProxy_ClassWithContainerTypes{} +exports[`Generated code for "jsii-calc": /go/jsiicalc/IPrivatelyImplemented.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - _jsii_.Create( - "jsii-calc.ClassWithContainerTypes", - []interface{}{array, record, obj, props}, - &j, - ) +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) - return &j +type IPrivatelyImplemented interface { + Success() *bool } -func NewClassWithContainerTypes_Override(c ClassWithContainerTypes, array *[]*DummyObj, record *map[string]*DummyObj, obj *map[string]*DummyObj, props *ContainerProps) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.ClassWithContainerTypes", - []interface{}{array, record, obj, props}, - c, +// The jsii proxy for IPrivatelyImplemented +type jsiiProxy_IPrivatelyImplemented struct { + _ byte // padding +} + +func (j *jsiiProxy_IPrivatelyImplemented) Success() *bool { + var returns *bool + _jsii_.Get( + j, + "success", + &returns, ) + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithDocs.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IPublicInterface.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// This class has docs. -// -// The docs are great. They're a bunch of tags. -// -// Example: -// func anExample() { -// } -// -// See: https://aws.amazon.com/ -// -type ClassWithDocs interface { +type IPublicInterface interface { + Bye() *string } -// The jsii proxy struct for ClassWithDocs -type jsiiProxy_ClassWithDocs struct { +// The jsii proxy for IPublicInterface +type jsiiProxy_IPublicInterface struct { _ byte // padding } -func NewClassWithDocs() ClassWithDocs { - _init_.Initialize() - - j := jsiiProxy_ClassWithDocs{} +func (i *jsiiProxy_IPublicInterface) Bye() *string { + var returns *string - _jsii_.Create( - "jsii-calc.ClassWithDocs", + _jsii_.Invoke( + i, + "bye", nil, // no parameters - &j, + &returns, ) - return &j -} - -func NewClassWithDocs_Override(c ClassWithDocs) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.ClassWithDocs", - nil, // no parameters - c, - ) + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithJavaReservedWords.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IPublicInterface2.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type ClassWithJavaReservedWords interface { - Int() *string - Import(assert *string) *string +type IPublicInterface2 interface { + Ciao() *string } -// The jsii proxy struct for ClassWithJavaReservedWords -type jsiiProxy_ClassWithJavaReservedWords struct { +// The jsii proxy for IPublicInterface2 +type jsiiProxy_IPublicInterface2 struct { _ byte // padding } -func (j *jsiiProxy_ClassWithJavaReservedWords) Int() *string { +func (i *jsiiProxy_IPublicInterface2) Ciao() *string { var returns *string - _jsii_.Get( - j, - "int", + + _jsii_.Invoke( + i, + "ciao", + nil, // no parameters &returns, ) + return returns } -func NewClassWithJavaReservedWords(int *string) ClassWithJavaReservedWords { - _init_.Initialize() +`; - j := jsiiProxy_ClassWithJavaReservedWords{} +exports[`Generated code for "jsii-calc": /go/jsiicalc/IRandomNumberGenerator.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - _jsii_.Create( - "jsii-calc.ClassWithJavaReservedWords", - []interface{}{int}, - &j, - ) +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) - return &j +// Generates random numbers. +type IRandomNumberGenerator interface { + // Returns another random number. + // + // Returns: A random number. + Next() *float64 } -func NewClassWithJavaReservedWords_Override(c ClassWithJavaReservedWords, int *string) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.ClassWithJavaReservedWords", - []interface{}{int}, - c, - ) +// The jsii proxy for IRandomNumberGenerator +type jsiiProxy_IRandomNumberGenerator struct { + _ byte // padding } -func (c *jsiiProxy_ClassWithJavaReservedWords) Import(assert *string) *string { - var returns *string +func (i *jsiiProxy_IRandomNumberGenerator) Next() *float64 { + var returns *float64 _jsii_.Invoke( - c, - "import", - []interface{}{assert}, + i, + "next", + nil, // no parameters &returns, ) @@ -9564,129 +10141,124 @@ func (c *jsiiProxy_ClassWithJavaReservedWords) Import(assert *string) *string { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithMutableObjectLiteralProperty.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IReturnJsii976.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type ClassWithMutableObjectLiteralProperty interface { - MutableObject() IMutableObjectLiteral - SetMutableObject(val IMutableObjectLiteral) +// Returns a subclass of a known class which implements an interface. +type IReturnJsii976 interface { + Foo() *float64 } -// The jsii proxy struct for ClassWithMutableObjectLiteralProperty -type jsiiProxy_ClassWithMutableObjectLiteralProperty struct { +// The jsii proxy for IReturnJsii976 +type jsiiProxy_IReturnJsii976 struct { _ byte // padding } -func (j *jsiiProxy_ClassWithMutableObjectLiteralProperty) MutableObject() IMutableObjectLiteral { - var returns IMutableObjectLiteral +func (j *jsiiProxy_IReturnJsii976) Foo() *float64 { + var returns *float64 _jsii_.Get( j, - "mutableObject", + "foo", &returns, ) return returns } -func NewClassWithMutableObjectLiteralProperty() ClassWithMutableObjectLiteralProperty { - _init_.Initialize() +`; - j := jsiiProxy_ClassWithMutableObjectLiteralProperty{} +exports[`Generated code for "jsii-calc": /go/jsiicalc/IReturnsNumber.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - _jsii_.Create( - "jsii-calc.ClassWithMutableObjectLiteralProperty", - nil, // no parameters - &j, - ) +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" - return &j + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + +type IReturnsNumber interface { + ObtainNumber() scopejsiicalclib.IDoublable + NumberProp() scopejsiicalclib.Number } -func NewClassWithMutableObjectLiteralProperty_Override(c ClassWithMutableObjectLiteralProperty) { - _init_.Initialize() +// The jsii proxy for IReturnsNumber +type jsiiProxy_IReturnsNumber struct { + _ byte // padding +} - _jsii_.Create( - "jsii-calc.ClassWithMutableObjectLiteralProperty", +func (i *jsiiProxy_IReturnsNumber) ObtainNumber() scopejsiicalclib.IDoublable { + var returns scopejsiicalclib.IDoublable + + _jsii_.Invoke( + i, + "obtainNumber", nil, // no parameters - c, + &returns, ) + + return returns } -func (j *jsiiProxy_ClassWithMutableObjectLiteralProperty)SetMutableObject(val IMutableObjectLiteral) { - _jsii_.Set( +func (j *jsiiProxy_IReturnsNumber) NumberProp() scopejsiicalclib.Number { + var returns scopejsiicalclib.Number + _jsii_.Get( j, - "mutableObject", - val, + "numberProp", + &returns, ) + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithNestedUnion.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IStableInterface.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type ClassWithNestedUnion interface { - UnionProperty() *[]interface{} - SetUnionProperty(val *[]interface{}) +type IStableInterface interface { + Method() + MutableProperty() *float64 + SetMutableProperty(m *float64) } -// The jsii proxy struct for ClassWithNestedUnion -type jsiiProxy_ClassWithNestedUnion struct { +// The jsii proxy for IStableInterface +type jsiiProxy_IStableInterface struct { _ byte // padding } -func (j *jsiiProxy_ClassWithNestedUnion) UnionProperty() *[]interface{} { - var returns *[]interface{} +func (i *jsiiProxy_IStableInterface) Method() { + _jsii_.InvokeVoid( + i, + "method", + nil, // no parameters + ) +} + +func (j *jsiiProxy_IStableInterface) MutableProperty() *float64 { + var returns *float64 _jsii_.Get( j, - "unionProperty", + "mutableProperty", &returns, ) return returns } - -func NewClassWithNestedUnion(unionProperty *[]interface{}) ClassWithNestedUnion { - _init_.Initialize() - - j := jsiiProxy_ClassWithNestedUnion{} - - _jsii_.Create( - "jsii-calc.ClassWithNestedUnion", - []interface{}{unionProperty}, - &j, - ) - - return &j -} - -func NewClassWithNestedUnion_Override(c ClassWithNestedUnion, unionProperty *[]interface{}) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.ClassWithNestedUnion", - []interface{}{unionProperty}, - c, - ) -} - -func (j *jsiiProxy_ClassWithNestedUnion)SetUnionProperty(val *[]interface{}) { +func (j *jsiiProxy_IStableInterface)SetMutableProperty(val *float64) { _jsii_.Set( j, - "unionProperty", + "mutableProperty", val, ) } @@ -9694,66 +10266,66 @@ func (j *jsiiProxy_ClassWithNestedUnion)SetUnionProperty(val *[]interface{}) { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/IStructReturningDelegate.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Class that implements interface properties automatically, but using a private constructor. -type ClassWithPrivateConstructorAndAutomaticProperties interface { - IInterfaceWithProperties - ReadOnlyString() *string - ReadWriteString() *string - SetReadWriteString(val *string) +// Verifies that a "pure" implementation of an interface works correctly. +type IStructReturningDelegate interface { + ReturnStruct() *StructB } -// The jsii proxy struct for ClassWithPrivateConstructorAndAutomaticProperties -type jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties struct { - jsiiProxy_IInterfaceWithProperties +// The jsii proxy for IStructReturningDelegate +type jsiiProxy_IStructReturningDelegate struct { + _ byte // padding } -func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties) ReadOnlyString() *string { - var returns *string - _jsii_.Get( - j, - "readOnlyString", - &returns, - ) - return returns -} +func (i *jsiiProxy_IStructReturningDelegate) ReturnStruct() *StructB { + var returns *StructB -func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties) ReadWriteString() *string { - var returns *string - _jsii_.Get( - j, - "readWriteString", + _jsii_.Invoke( + i, + "returnStruct", + nil, // no parameters &returns, ) + return returns } -func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties)SetReadWriteString(val *string) { - _jsii_.Set( - j, - "readWriteString", - val, - ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IWallClock.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +// Implement this interface. +type IWallClock interface { + // Returns the current time, formatted as an ISO-8601 string. + Iso8601Now() *string } -func ClassWithPrivateConstructorAndAutomaticProperties_Create(readOnlyString *string, readWriteString *string) ClassWithPrivateConstructorAndAutomaticProperties { - _init_.Initialize() +// The jsii proxy for IWallClock +type jsiiProxy_IWallClock struct { + _ byte // padding +} - var returns ClassWithPrivateConstructorAndAutomaticProperties +func (i *jsiiProxy_IWallClock) Iso8601Now() *string { + var returns *string - _jsii_.StaticInvoke( - "jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties", - "create", - []interface{}{readOnlyString, readWriteString}, + _jsii_.Invoke( + i, + "iso8601Now", + nil, // no parameters &returns, ) @@ -9763,7 +10335,7 @@ func ClassWithPrivateConstructorAndAutomaticProperties_Create(readOnlyString *st `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConfusingToJackson.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/ImplementInternalInterface.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -9772,84 +10344,63 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// This tries to confuse Jackson by having overloaded property setters. -// See: https://github.com/aws/aws-cdk/issues/4080 -// -type ConfusingToJackson interface { - UnionProperty() interface{} - SetUnionProperty(val interface{}) +type ImplementInternalInterface interface { + Prop() *string + SetProp(val *string) } -// The jsii proxy struct for ConfusingToJackson -type jsiiProxy_ConfusingToJackson struct { +// The jsii proxy struct for ImplementInternalInterface +type jsiiProxy_ImplementInternalInterface struct { _ byte // padding } -func (j *jsiiProxy_ConfusingToJackson) UnionProperty() interface{} { - var returns interface{} +func (j *jsiiProxy_ImplementInternalInterface) Prop() *string { + var returns *string _jsii_.Get( j, - "unionProperty", + "prop", &returns, ) return returns } -func (j *jsiiProxy_ConfusingToJackson)SetUnionProperty(val interface{}) { - _jsii_.Set( - j, - "unionProperty", - val, - ) -} - -func ConfusingToJackson_MakeInstance() ConfusingToJackson { +func NewImplementInternalInterface() ImplementInternalInterface { _init_.Initialize() - var returns ConfusingToJackson + j := jsiiProxy_ImplementInternalInterface{} - _jsii_.StaticInvoke( - "jsii-calc.ConfusingToJackson", - "makeInstance", + _jsii_.Create( + "jsii-calc.ImplementInternalInterface", nil, // no parameters - &returns, + &j, ) - return returns + return &j } -func ConfusingToJackson_MakeStructInstance() *ConfusingToJacksonStruct { +func NewImplementInternalInterface_Override(i ImplementInternalInterface) { _init_.Initialize() - var returns *ConfusingToJacksonStruct - - _jsii_.StaticInvoke( - "jsii-calc.ConfusingToJackson", - "makeStructInstance", + _jsii_.Create( + "jsii-calc.ImplementInternalInterface", nil, // no parameters - &returns, + i, ) - - return returns } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConfusingToJacksonStruct.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type ConfusingToJacksonStruct struct { - UnionProperty interface{} \`field:"optional" json:"unionProperty" yaml:"unionProperty"\` +func (j *jsiiProxy_ImplementInternalInterface)SetProp(val *string) { + _jsii_.Set( + j, + "prop", + val, + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConstructorPassesThisOut.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/Implementation.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -9858,42 +10409,54 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type ConstructorPassesThisOut interface { +type Implementation interface { + Value() *float64 } -// The jsii proxy struct for ConstructorPassesThisOut -type jsiiProxy_ConstructorPassesThisOut struct { +// The jsii proxy struct for Implementation +type jsiiProxy_Implementation struct { _ byte // padding } -func NewConstructorPassesThisOut(consumer PartiallyInitializedThisConsumer) ConstructorPassesThisOut { +func (j *jsiiProxy_Implementation) Value() *float64 { + var returns *float64 + _jsii_.Get( + j, + "value", + &returns, + ) + return returns +} + + +func NewImplementation() Implementation { _init_.Initialize() - j := jsiiProxy_ConstructorPassesThisOut{} + j := jsiiProxy_Implementation{} _jsii_.Create( - "jsii-calc.ConstructorPassesThisOut", - []interface{}{consumer}, + "jsii-calc.Implementation", + nil, // no parameters &j, ) return &j } -func NewConstructorPassesThisOut_Override(c ConstructorPassesThisOut, consumer PartiallyInitializedThisConsumer) { +func NewImplementation_Override(i Implementation) { _init_.Initialize() _jsii_.Create( - "jsii-calc.ConstructorPassesThisOut", - []interface{}{consumer}, - c, + "jsii-calc.Implementation", + nil, // no parameters + i, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Constructors.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/ImplementsInterfaceWithInternal.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -9902,21 +10465,23 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type Constructors interface { +type ImplementsInterfaceWithInternal interface { + IInterfaceWithInternal + Visible() } -// The jsii proxy struct for Constructors -type jsiiProxy_Constructors struct { - _ byte // padding +// The jsii proxy struct for ImplementsInterfaceWithInternal +type jsiiProxy_ImplementsInterfaceWithInternal struct { + jsiiProxy_IInterfaceWithInternal } -func NewConstructors() Constructors { +func NewImplementsInterfaceWithInternal() ImplementsInterfaceWithInternal { _init_.Initialize() - j := jsiiProxy_Constructors{} + j := jsiiProxy_ImplementsInterfaceWithInternal{} _jsii_.Create( - "jsii-calc.Constructors", + "jsii-calc.ImplementsInterfaceWithInternal", nil, // no parameters &j, ) @@ -9924,125 +10489,166 @@ func NewConstructors() Constructors { return &j } -func NewConstructors_Override(c Constructors) { +func NewImplementsInterfaceWithInternal_Override(i ImplementsInterfaceWithInternal) { _init_.Initialize() _jsii_.Create( - "jsii-calc.Constructors", + "jsii-calc.ImplementsInterfaceWithInternal", nil, // no parameters - c, + i, ) } -func Constructors_HiddenInterface() IPublicInterface { - _init_.Initialize() - - var returns IPublicInterface - - _jsii_.StaticInvoke( - "jsii-calc.Constructors", - "hiddenInterface", +func (i *jsiiProxy_ImplementsInterfaceWithInternal) Visible() { + _jsii_.InvokeVoid( + i, + "visible", nil, // no parameters - &returns, ) +} - return returns + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ImplementsInterfaceWithInternalSubclass.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type ImplementsInterfaceWithInternalSubclass interface { + ImplementsInterfaceWithInternal + Visible() } -func Constructors_HiddenInterfaces() *[]IPublicInterface { +// The jsii proxy struct for ImplementsInterfaceWithInternalSubclass +type jsiiProxy_ImplementsInterfaceWithInternalSubclass struct { + jsiiProxy_ImplementsInterfaceWithInternal +} + +func NewImplementsInterfaceWithInternalSubclass() ImplementsInterfaceWithInternalSubclass { _init_.Initialize() - var returns *[]IPublicInterface + j := jsiiProxy_ImplementsInterfaceWithInternalSubclass{} - _jsii_.StaticInvoke( - "jsii-calc.Constructors", - "hiddenInterfaces", + _jsii_.Create( + "jsii-calc.ImplementsInterfaceWithInternalSubclass", nil, // no parameters - &returns, + &j, ) - return returns + return &j } -func Constructors_HiddenSubInterfaces() *[]IPublicInterface { +func NewImplementsInterfaceWithInternalSubclass_Override(i ImplementsInterfaceWithInternalSubclass) { _init_.Initialize() - var returns *[]IPublicInterface - - _jsii_.StaticInvoke( - "jsii-calc.Constructors", - "hiddenSubInterfaces", + _jsii_.Create( + "jsii-calc.ImplementsInterfaceWithInternalSubclass", nil, // no parameters - &returns, + i, ) +} - return returns +func (i *jsiiProxy_ImplementsInterfaceWithInternalSubclass) Visible() { + _jsii_.InvokeVoid( + i, + "visible", + nil, // no parameters + ) } -func Constructors_MakeClass() PublicClass { - _init_.Initialize() - var returns PublicClass +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ImplementsPrivateInterface.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type ImplementsPrivateInterface interface { + Private() *string + SetPrivate(val *string) +} + +// The jsii proxy struct for ImplementsPrivateInterface +type jsiiProxy_ImplementsPrivateInterface struct { + _ byte // padding +} - _jsii_.StaticInvoke( - "jsii-calc.Constructors", - "makeClass", - nil, // no parameters +func (j *jsiiProxy_ImplementsPrivateInterface) Private() *string { + var returns *string + _jsii_.Get( + j, + "private", &returns, ) - return returns } -func Constructors_MakeInterface() IPublicInterface { + +func NewImplementsPrivateInterface() ImplementsPrivateInterface { _init_.Initialize() - var returns IPublicInterface + j := jsiiProxy_ImplementsPrivateInterface{} - _jsii_.StaticInvoke( - "jsii-calc.Constructors", - "makeInterface", + _jsii_.Create( + "jsii-calc.ImplementsPrivateInterface", nil, // no parameters - &returns, + &j, ) - return returns + return &j } -func Constructors_MakeInterface2() IPublicInterface2 { +func NewImplementsPrivateInterface_Override(i ImplementsPrivateInterface) { _init_.Initialize() - var returns IPublicInterface2 - - _jsii_.StaticInvoke( - "jsii-calc.Constructors", - "makeInterface2", + _jsii_.Create( + "jsii-calc.ImplementsPrivateInterface", nil, // no parameters - &returns, + i, ) +} - return returns +func (j *jsiiProxy_ImplementsPrivateInterface)SetPrivate(val *string) { + _jsii_.Set( + j, + "private", + val, + ) } -func Constructors_MakeInterfaces() *[]IPublicInterface { - _init_.Initialize() - var returns *[]IPublicInterface +`; - _jsii_.StaticInvoke( - "jsii-calc.Constructors", - "makeInterfaces", - nil, // no parameters - &returns, - ) +exports[`Generated code for "jsii-calc": /go/jsiicalc/ImplictBaseOfBase.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - return returns +import ( + "time" + + "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" +) + +type ImplictBaseOfBase struct { + Foo scopejsiicalcbaseofbase.Very \`field:"required" json:"foo" yaml:"foo"\` + Bar *string \`field:"required" json:"bar" yaml:"bar"\` + Goo *time.Time \`field:"required" json:"goo" yaml:"goo"\` } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConsumePureInterface.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/InbetweenClass.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -10051,45 +10657,49 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type ConsumePureInterface interface { - WorkItBaby() *StructB +type InbetweenClass interface { + PublicClass + IPublicInterface2 + Ciao() *string + Hello() } -// The jsii proxy struct for ConsumePureInterface -type jsiiProxy_ConsumePureInterface struct { - _ byte // padding +// The jsii proxy struct for InbetweenClass +type jsiiProxy_InbetweenClass struct { + jsiiProxy_PublicClass + jsiiProxy_IPublicInterface2 } -func NewConsumePureInterface(delegate IStructReturningDelegate) ConsumePureInterface { +func NewInbetweenClass() InbetweenClass { _init_.Initialize() - j := jsiiProxy_ConsumePureInterface{} + j := jsiiProxy_InbetweenClass{} _jsii_.Create( - "jsii-calc.ConsumePureInterface", - []interface{}{delegate}, + "jsii-calc.InbetweenClass", + nil, // no parameters &j, ) return &j } -func NewConsumePureInterface_Override(c ConsumePureInterface, delegate IStructReturningDelegate) { +func NewInbetweenClass_Override(i InbetweenClass) { _init_.Initialize() _jsii_.Create( - "jsii-calc.ConsumePureInterface", - []interface{}{delegate}, - c, + "jsii-calc.InbetweenClass", + nil, // no parameters + i, ) } -func (c *jsiiProxy_ConsumePureInterface) WorkItBaby() *StructB { - var returns *StructB +func (i *jsiiProxy_InbetweenClass) Ciao() *string { + var returns *string _jsii_.Invoke( - c, - "workItBaby", + i, + "ciao", nil, // no parameters &returns, ) @@ -10097,10 +10707,18 @@ func (c *jsiiProxy_ConsumePureInterface) WorkItBaby() *StructB { return returns } +func (i *jsiiProxy_InbetweenClass) Hello() { + _jsii_.InvokeVoid( + i, + "hello", + nil, // no parameters + ) +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConsumerCanRingBell.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/InterfaceCollections.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -10109,176 +10727,157 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Test calling back to consumers that implement interfaces. +// Verifies that collections of interfaces or structs are correctly handled. // -// Check that if a JSII consumer implements IConsumerWithInterfaceParam, they can call -// the method on the argument that they're passed... -type ConsumerCanRingBell interface { - // ...if the interface is implemented using an object literal. - // - // Returns whether the bell was rung. - ImplementedByObjectLiteral(ringer IBellRinger) *bool - // ...if the interface is implemented using a private class. - // - // Return whether the bell was rung. - ImplementedByPrivateClass(ringer IBellRinger) *bool - // ...if the interface is implemented using a public class. - // - // Return whether the bell was rung. - ImplementedByPublicClass(ringer IBellRinger) *bool - // If the parameter is a concrete class instead of an interface. - // - // Return whether the bell was rung. - WhenTypedAsClass(ringer IConcreteBellRinger) *bool +// See: https://github.com/aws/jsii/issues/1196 +type InterfaceCollections interface { } -// The jsii proxy struct for ConsumerCanRingBell -type jsiiProxy_ConsumerCanRingBell struct { +// The jsii proxy struct for InterfaceCollections +type jsiiProxy_InterfaceCollections struct { _ byte // padding } -func NewConsumerCanRingBell() ConsumerCanRingBell { +func InterfaceCollections_ListOfInterfaces() *[]IBell { _init_.Initialize() - j := jsiiProxy_ConsumerCanRingBell{} + var returns *[]IBell - _jsii_.Create( - "jsii-calc.ConsumerCanRingBell", + _jsii_.StaticInvoke( + "jsii-calc.InterfaceCollections", + "listOfInterfaces", nil, // no parameters - &j, + &returns, ) - return &j + return returns } -func NewConsumerCanRingBell_Override(c ConsumerCanRingBell) { +func InterfaceCollections_ListOfStructs() *[]*StructA { _init_.Initialize() - _jsii_.Create( - "jsii-calc.ConsumerCanRingBell", + var returns *[]*StructA + + _jsii_.StaticInvoke( + "jsii-calc.InterfaceCollections", + "listOfStructs", nil, // no parameters - c, + &returns, ) + + return returns } -// ...if the interface is implemented using an object literal. -// -// Returns whether the bell was rung. -func ConsumerCanRingBell_StaticImplementedByObjectLiteral(ringer IBellRinger) *bool { +func InterfaceCollections_MapOfInterfaces() *map[string]IBell { _init_.Initialize() - var returns *bool + var returns *map[string]IBell _jsii_.StaticInvoke( - "jsii-calc.ConsumerCanRingBell", - "staticImplementedByObjectLiteral", - []interface{}{ringer}, + "jsii-calc.InterfaceCollections", + "mapOfInterfaces", + nil, // no parameters &returns, ) return returns } -// ...if the interface is implemented using a private class. -// -// Return whether the bell was rung. -func ConsumerCanRingBell_StaticImplementedByPrivateClass(ringer IBellRinger) *bool { +func InterfaceCollections_MapOfStructs() *map[string]*StructA { _init_.Initialize() - var returns *bool + var returns *map[string]*StructA _jsii_.StaticInvoke( - "jsii-calc.ConsumerCanRingBell", - "staticImplementedByPrivateClass", - []interface{}{ringer}, + "jsii-calc.InterfaceCollections", + "mapOfStructs", + nil, // no parameters &returns, ) return returns } -// ...if the interface is implemented using a public class. -// -// Return whether the bell was rung. -func ConsumerCanRingBell_StaticImplementedByPublicClass(ringer IBellRinger) *bool { - _init_.Initialize() - var returns *bool +`; - _jsii_.StaticInvoke( - "jsii-calc.ConsumerCanRingBell", - "staticImplementedByPublicClass", - []interface{}{ringer}, - &returns, - ) +exports[`Generated code for "jsii-calc": /go/jsiicalc/InterfacesMaker.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - return returns +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + +// We can return arrays of interfaces See aws/aws-cdk#2362. +type InterfacesMaker interface { } -// If the parameter is a concrete class instead of an interface. -// -// Return whether the bell was rung. -func ConsumerCanRingBell_StaticWhenTypedAsClass(ringer IConcreteBellRinger) *bool { +// The jsii proxy struct for InterfacesMaker +type jsiiProxy_InterfacesMaker struct { + _ byte // padding +} + +func InterfacesMaker_MakeInterfaces(count *float64) *[]scopejsiicalclib.IDoublable { _init_.Initialize() - var returns *bool + var returns *[]scopejsiicalclib.IDoublable _jsii_.StaticInvoke( - "jsii-calc.ConsumerCanRingBell", - "staticWhenTypedAsClass", - []interface{}{ringer}, + "jsii-calc.InterfacesMaker", + "makeInterfaces", + []interface{}{count}, &returns, ) return returns } -func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByObjectLiteral(ringer IBellRinger) *bool { - var returns *bool - _jsii_.Invoke( - c, - "implementedByObjectLiteral", - []interface{}{ringer}, - &returns, - ) +`; - return returns -} +exports[`Generated code for "jsii-calc": /go/jsiicalc/Isomorphism.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByPrivateClass(ringer IBellRinger) *bool { - var returns *bool +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) - _jsii_.Invoke( - c, - "implementedByPrivateClass", - []interface{}{ringer}, - &returns, - ) +// Checks the "same instance" isomorphism is preserved within the constructor. +// +// Create a subclass of this, and assert that \`this.myself()\` actually returns +// \`this\` from within the constructor. +type Isomorphism interface { + Myself() Isomorphism +} - return returns +// The jsii proxy struct for Isomorphism +type jsiiProxy_Isomorphism struct { + _ byte // padding } -func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByPublicClass(ringer IBellRinger) *bool { - var returns *bool +func NewIsomorphism_Override(i Isomorphism) { + _init_.Initialize() - _jsii_.Invoke( - c, - "implementedByPublicClass", - []interface{}{ringer}, - &returns, + _jsii_.Create( + "jsii-calc.Isomorphism", + nil, // no parameters + i, ) - - return returns } -func (c *jsiiProxy_ConsumerCanRingBell) WhenTypedAsClass(ringer IConcreteBellRinger) *bool { - var returns *bool +func (i *jsiiProxy_Isomorphism) Myself() Isomorphism { + var returns Isomorphism _jsii_.Invoke( - c, - "whenTypedAsClass", - []interface{}{ringer}, + i, + "myself", + nil, // no parameters &returns, ) @@ -10288,7 +10887,7 @@ func (c *jsiiProxy_ConsumerCanRingBell) WhenTypedAsClass(ringer IConcreteBellRin `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConsumersOfThisCrazyTypeSystem.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/Issue2638.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -10297,23 +10896,27 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type ConsumersOfThisCrazyTypeSystem interface { - ConsumeAnotherPublicInterface(obj IAnotherPublicInterface) *string - ConsumeNonInternalInterface(obj INonInternalInterface) interface{} +// Docstrings with period. +// See: https://github.com/aws/jsii/issues/2638 +// +type Issue2638 interface { } -// The jsii proxy struct for ConsumersOfThisCrazyTypeSystem -type jsiiProxy_ConsumersOfThisCrazyTypeSystem struct { +// The jsii proxy struct for Issue2638 +type jsiiProxy_Issue2638 struct { _ byte // padding } -func NewConsumersOfThisCrazyTypeSystem() ConsumersOfThisCrazyTypeSystem { +// First sentence. +// +// Second sentence. Third sentence. +func NewIssue2638() Issue2638 { _init_.Initialize() - j := jsiiProxy_ConsumersOfThisCrazyTypeSystem{} + j := jsiiProxy_Issue2638{} _jsii_.Create( - "jsii-calc.ConsumersOfThisCrazyTypeSystem", + "jsii-calc.Issue2638", nil, // no parameters &j, ) @@ -10321,149 +10924,177 @@ func NewConsumersOfThisCrazyTypeSystem() ConsumersOfThisCrazyTypeSystem { return &j } -func NewConsumersOfThisCrazyTypeSystem_Override(c ConsumersOfThisCrazyTypeSystem) { +// First sentence. +// +// Second sentence. Third sentence. +func NewIssue2638_Override(i Issue2638) { _init_.Initialize() _jsii_.Create( - "jsii-calc.ConsumersOfThisCrazyTypeSystem", + "jsii-calc.Issue2638", nil, // no parameters - c, + i, ) } -func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) ConsumeAnotherPublicInterface(obj IAnotherPublicInterface) *string { - var returns *string - _jsii_.Invoke( - c, - "consumeAnotherPublicInterface", - []interface{}{obj}, - &returns, - ) +`; - return returns -} +exports[`Generated code for "jsii-calc": /go/jsiicalc/Issue2638B.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) ConsumeNonInternalInterface(obj INonInternalInterface) interface{} { - var returns interface{} +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) - _jsii_.Invoke( - c, - "consumeNonInternalInterface", - []interface{}{obj}, - &returns, - ) +type Issue2638B interface { +} - return returns +// The jsii proxy struct for Issue2638B +type jsiiProxy_Issue2638B struct { + _ byte // padding } +func NewIssue2638B() Issue2638B { + _init_.Initialize() -`; + j := jsiiProxy_Issue2638B{} -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ContainerProps.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + _jsii_.Create( + "jsii-calc.Issue2638B", + nil, // no parameters + &j, + ) + return &j +} -type ContainerProps struct { - ArrayProp *[]*DummyObj \`field:"required" json:"arrayProp" yaml:"arrayProp"\` - ObjProp *map[string]*DummyObj \`field:"required" json:"objProp" yaml:"objProp"\` - RecordProp *map[string]*DummyObj \`field:"required" json:"recordProp" yaml:"recordProp"\` +func NewIssue2638B_Override(i Issue2638B) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.Issue2638B", + nil, // no parameters + i, + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DataRenderer.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/JSII417Derived.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -// Verifies proper type handling through dynamic overrides. -type DataRenderer interface { - Render(data *scopejsiicalclib.MyFirstStruct) *string - RenderArbitrary(data *map[string]interface{}) *string - RenderMap(map_ *map[string]interface{}) *string +type JSII417Derived interface { + JSII417PublicBaseOfBase + HasRoot() *bool + Property() *string + Bar() + Baz() + Foo() } -// The jsii proxy struct for DataRenderer -type jsiiProxy_DataRenderer struct { - _ byte // padding +// The jsii proxy struct for JSII417Derived +type jsiiProxy_JSII417Derived struct { + jsiiProxy_JSII417PublicBaseOfBase } -func NewDataRenderer() DataRenderer { +func (j *jsiiProxy_JSII417Derived) HasRoot() *bool { + var returns *bool + _jsii_.Get( + j, + "hasRoot", + &returns, + ) + return returns +} + +func (j *jsiiProxy_JSII417Derived) Property() *string { + var returns *string + _jsii_.Get( + j, + "property", + &returns, + ) + return returns +} + + +func NewJSII417Derived(property *string) JSII417Derived { _init_.Initialize() - j := jsiiProxy_DataRenderer{} + j := jsiiProxy_JSII417Derived{} _jsii_.Create( - "jsii-calc.DataRenderer", - nil, // no parameters + "jsii-calc.JSII417Derived", + []interface{}{property}, &j, ) return &j } -func NewDataRenderer_Override(d DataRenderer) { +func NewJSII417Derived_Override(j JSII417Derived, property *string) { _init_.Initialize() _jsii_.Create( - "jsii-calc.DataRenderer", - nil, // no parameters - d, + "jsii-calc.JSII417Derived", + []interface{}{property}, + j, ) } -func (d *jsiiProxy_DataRenderer) Render(data *scopejsiicalclib.MyFirstStruct) *string { - var returns *string +func JSII417Derived_MakeInstance() JSII417PublicBaseOfBase { + _init_.Initialize() - _jsii_.Invoke( - d, - "render", - []interface{}{data}, + var returns JSII417PublicBaseOfBase + + _jsii_.StaticInvoke( + "jsii-calc.JSII417Derived", + "makeInstance", + nil, // no parameters &returns, ) return returns } -func (d *jsiiProxy_DataRenderer) RenderArbitrary(data *map[string]interface{}) *string { - var returns *string - - _jsii_.Invoke( - d, - "renderArbitrary", - []interface{}{data}, - &returns, +func (j *jsiiProxy_JSII417Derived) Bar() { + _jsii_.InvokeVoid( + j, + "bar", + nil, // no parameters ) - - return returns } -func (d *jsiiProxy_DataRenderer) RenderMap(map_ *map[string]interface{}) *string { - var returns *string - - _jsii_.Invoke( - d, - "renderMap", - []interface{}{map_}, - &returns, +func (j *jsiiProxy_JSII417Derived) Baz() { + _jsii_.InvokeVoid( + j, + "baz", + nil, // no parameters ) +} - return returns +func (j *jsiiProxy_JSII417Derived) Foo() { + _jsii_.InvokeVoid( + j, + "foo", + nil, // no parameters + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Default.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/JSII417PublicBaseOfBase.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -10472,25 +11103,34 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// A class named "Default". -// See: https://github.com/aws/jsii/issues/2637 -// -type Default interface { - PleaseCompile() +type JSII417PublicBaseOfBase interface { + HasRoot() *bool + Foo() +} + +// The jsii proxy struct for JSII417PublicBaseOfBase +type jsiiProxy_JSII417PublicBaseOfBase struct { + _ byte // padding +} + +func (j *jsiiProxy_JSII417PublicBaseOfBase) HasRoot() *bool { + var returns *bool + _jsii_.Get( + j, + "hasRoot", + &returns, + ) + return returns } -// The jsii proxy struct for Default -type jsiiProxy_Default struct { - _ byte // padding -} -func NewDefault() Default { +func NewJSII417PublicBaseOfBase() JSII417PublicBaseOfBase { _init_.Initialize() - j := jsiiProxy_Default{} + j := jsiiProxy_JSII417PublicBaseOfBase{} _jsii_.Create( - "jsii-calc.Default", + "jsii-calc.JSII417PublicBaseOfBase", nil, // no parameters &j, ) @@ -10498,20 +11138,35 @@ func NewDefault() Default { return &j } -func NewDefault_Override(d Default) { +func NewJSII417PublicBaseOfBase_Override(j JSII417PublicBaseOfBase) { _init_.Initialize() _jsii_.Create( - "jsii-calc.Default", + "jsii-calc.JSII417PublicBaseOfBase", nil, // no parameters - d, + j, ) } -func (d *jsiiProxy_Default) PleaseCompile() { +func JSII417PublicBaseOfBase_MakeInstance() JSII417PublicBaseOfBase { + _init_.Initialize() + + var returns JSII417PublicBaseOfBase + + _jsii_.StaticInvoke( + "jsii-calc.JSII417PublicBaseOfBase", + "makeInstance", + nil, // no parameters + &returns, + ) + + return returns +} + +func (j *jsiiProxy_JSII417PublicBaseOfBase) Foo() { _jsii_.InvokeVoid( - d, - "pleaseCompile", + j, + "foo", nil, // no parameters ) } @@ -10519,87 +11174,81 @@ func (d *jsiiProxy_Default) PleaseCompile() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DefaultedConstructorArgument.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/JSObjectLiteralForInterface.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( - "time" - _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -type DefaultedConstructorArgument interface { - Arg1() *float64 - Arg2() *string - Arg3() *time.Time +type JSObjectLiteralForInterface interface { + GiveMeFriendly() scopejsiicalclib.IFriendly + GiveMeFriendlyGenerator() IFriendlyRandomGenerator } -// The jsii proxy struct for DefaultedConstructorArgument -type jsiiProxy_DefaultedConstructorArgument struct { +// The jsii proxy struct for JSObjectLiteralForInterface +type jsiiProxy_JSObjectLiteralForInterface struct { _ byte // padding } -func (j *jsiiProxy_DefaultedConstructorArgument) Arg1() *float64 { - var returns *float64 - _jsii_.Get( - j, - "arg1", - &returns, +func NewJSObjectLiteralForInterface() JSObjectLiteralForInterface { + _init_.Initialize() + + j := jsiiProxy_JSObjectLiteralForInterface{} + + _jsii_.Create( + "jsii-calc.JSObjectLiteralForInterface", + nil, // no parameters + &j, ) - return returns + + return &j } -func (j *jsiiProxy_DefaultedConstructorArgument) Arg2() *string { - var returns *string - _jsii_.Get( +func NewJSObjectLiteralForInterface_Override(j JSObjectLiteralForInterface) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.JSObjectLiteralForInterface", + nil, // no parameters j, - "arg2", - &returns, ) - return returns } -func (j *jsiiProxy_DefaultedConstructorArgument) Arg3() *time.Time { - var returns *time.Time - _jsii_.Get( +func (j *jsiiProxy_JSObjectLiteralForInterface) GiveMeFriendly() scopejsiicalclib.IFriendly { + var returns scopejsiicalclib.IFriendly + + _jsii_.Invoke( j, - "arg3", + "giveMeFriendly", + nil, // no parameters &returns, ) + return returns } +func (j *jsiiProxy_JSObjectLiteralForInterface) GiveMeFriendlyGenerator() IFriendlyRandomGenerator { + var returns IFriendlyRandomGenerator -func NewDefaultedConstructorArgument(arg1 *float64, arg2 *string, arg3 *time.Time) DefaultedConstructorArgument { - _init_.Initialize() - - j := jsiiProxy_DefaultedConstructorArgument{} - - _jsii_.Create( - "jsii-calc.DefaultedConstructorArgument", - []interface{}{arg1, arg2, arg3}, - &j, + _jsii_.Invoke( + j, + "giveMeFriendlyGenerator", + nil, // no parameters + &returns, ) - return &j -} - -func NewDefaultedConstructorArgument_Override(d DefaultedConstructorArgument, arg1 *float64, arg2 *string, arg3 *time.Time) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.DefaultedConstructorArgument", - []interface{}{arg1, arg2, arg3}, - d, - ) + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Demonstrate982.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/JSObjectLiteralToNative.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -10608,25 +11257,22 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// 1. -// -// call #takeThis() -> An ObjectRef will be provisioned for the value (it'll be re-used!) -// 2. call #takeThisToo() -> The ObjectRef from before will need to be down-cased to the ParentStruct982 type -type Demonstrate982 interface { +type JSObjectLiteralToNative interface { + ReturnLiteral() JSObjectLiteralToNativeClass } -// The jsii proxy struct for Demonstrate982 -type jsiiProxy_Demonstrate982 struct { +// The jsii proxy struct for JSObjectLiteralToNative +type jsiiProxy_JSObjectLiteralToNative struct { _ byte // padding } -func NewDemonstrate982() Demonstrate982 { +func NewJSObjectLiteralToNative() JSObjectLiteralToNative { _init_.Initialize() - j := jsiiProxy_Demonstrate982{} + j := jsiiProxy_JSObjectLiteralToNative{} _jsii_.Create( - "jsii-calc.Demonstrate982", + "jsii-calc.JSObjectLiteralToNative", nil, // no parameters &j, ) @@ -10634,41 +11280,22 @@ func NewDemonstrate982() Demonstrate982 { return &j } -func NewDemonstrate982_Override(d Demonstrate982) { +func NewJSObjectLiteralToNative_Override(j JSObjectLiteralToNative) { _init_.Initialize() _jsii_.Create( - "jsii-calc.Demonstrate982", - nil, // no parameters - d, - ) -} - -// It's dangerous to go alone! -func Demonstrate982_TakeThis() *ChildStruct982 { - _init_.Initialize() - - var returns *ChildStruct982 - - _jsii_.StaticInvoke( - "jsii-calc.Demonstrate982", - "takeThis", + "jsii-calc.JSObjectLiteralToNative", nil, // no parameters - &returns, + j, ) - - return returns } -// It's dangerous to go alone! -func Demonstrate982_TakeThisToo() *ParentStruct982 { - _init_.Initialize() - - var returns *ParentStruct982 +func (j *jsiiProxy_JSObjectLiteralToNative) ReturnLiteral() JSObjectLiteralToNativeClass { + var returns JSObjectLiteralToNativeClass - _jsii_.StaticInvoke( - "jsii-calc.Demonstrate982", - "takeThisToo", + _jsii_.Invoke( + j, + "returnLiteral", nil, // no parameters &returns, ) @@ -10679,7 +11306,7 @@ func Demonstrate982_TakeThisToo() *ParentStruct982 { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DeprecatedClass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/JSObjectLiteralToNativeClass.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -10688,562 +11315,616 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Deprecated: a pretty boring class. -type DeprecatedClass interface { - // Deprecated: shouldn't have been mutable. - MutableProperty() *float64 - // Deprecated: shouldn't have been mutable. - SetMutableProperty(val *float64) - // Deprecated: this is not always "wazoo", be ready to be disappointed. - ReadonlyProperty() *string - // Deprecated: it was a bad idea. - Method() +type JSObjectLiteralToNativeClass interface { + PropA() *string + SetPropA(val *string) + PropB() *float64 + SetPropB(val *float64) } -// The jsii proxy struct for DeprecatedClass -type jsiiProxy_DeprecatedClass struct { +// The jsii proxy struct for JSObjectLiteralToNativeClass +type jsiiProxy_JSObjectLiteralToNativeClass struct { _ byte // padding } -func (j *jsiiProxy_DeprecatedClass) MutableProperty() *float64 { - var returns *float64 +func (j *jsiiProxy_JSObjectLiteralToNativeClass) PropA() *string { + var returns *string _jsii_.Get( j, - "mutableProperty", + "propA", &returns, ) return returns } -func (j *jsiiProxy_DeprecatedClass) ReadonlyProperty() *string { - var returns *string +func (j *jsiiProxy_JSObjectLiteralToNativeClass) PropB() *float64 { + var returns *float64 _jsii_.Get( j, - "readonlyProperty", + "propB", &returns, ) return returns } -// Deprecated: this constructor is "just" okay. -func NewDeprecatedClass(readonlyString *string, mutableNumber *float64) DeprecatedClass { +func NewJSObjectLiteralToNativeClass() JSObjectLiteralToNativeClass { _init_.Initialize() - j := jsiiProxy_DeprecatedClass{} + j := jsiiProxy_JSObjectLiteralToNativeClass{} _jsii_.Create( - "jsii-calc.DeprecatedClass", - []interface{}{readonlyString, mutableNumber}, + "jsii-calc.JSObjectLiteralToNativeClass", + nil, // no parameters &j, ) return &j } -// Deprecated: this constructor is "just" okay. -func NewDeprecatedClass_Override(d DeprecatedClass, readonlyString *string, mutableNumber *float64) { +func NewJSObjectLiteralToNativeClass_Override(j JSObjectLiteralToNativeClass) { _init_.Initialize() _jsii_.Create( - "jsii-calc.DeprecatedClass", - []interface{}{readonlyString, mutableNumber}, - d, + "jsii-calc.JSObjectLiteralToNativeClass", + nil, // no parameters + j, ) } -func (j *jsiiProxy_DeprecatedClass)SetMutableProperty(val *float64) { +func (j *jsiiProxy_JSObjectLiteralToNativeClass)SetPropA(val *string) { _jsii_.Set( j, - "mutableProperty", + "propA", val, ) } -func (d *jsiiProxy_DeprecatedClass) Method() { - _jsii_.InvokeVoid( - d, - "method", - nil, // no parameters +func (j *jsiiProxy_JSObjectLiteralToNativeClass)SetPropB(val *float64) { + _jsii_.Set( + j, + "propB", + val, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DeprecatedEnum.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -// Deprecated: your deprecated selection of bad options. -type DeprecatedEnum string - -const ( - // Deprecated: option A is not great. - DeprecatedEnum_OPTION_A DeprecatedEnum = "OPTION_A" - // Deprecated: option B is kinda bad, too. - DeprecatedEnum_OPTION_B DeprecatedEnum = "OPTION_B" -) - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DeprecatedStruct.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -// Deprecated: it just wraps a string. -type DeprecatedStruct struct { - // Deprecated: well, yeah. - ReadonlyProperty *string \`field:"required" json:"readonlyProperty" yaml:"readonlyProperty"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DerivedStruct.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/JavaReservedWords.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( - "time" - - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// A struct which derives from another struct. -type DerivedStruct struct { - // An awesome number value. - // Deprecated. - Anumber *float64 \`field:"required" json:"anumber" yaml:"anumber"\` - // A string value. - // Deprecated. - Astring *string \`field:"required" json:"astring" yaml:"astring"\` - // Deprecated. - FirstOptional *[]*string \`field:"optional" json:"firstOptional" yaml:"firstOptional"\` - AnotherRequired *time.Time \`field:"required" json:"anotherRequired" yaml:"anotherRequired"\` - Bool *bool \`field:"required" json:"bool" yaml:"bool"\` - // An example of a non primitive property. - NonPrimitive DoubleTrouble \`field:"required" json:"nonPrimitive" yaml:"nonPrimitive"\` - // This is optional. - AnotherOptional *map[string]scopejsiicalclib.NumericValue \`field:"optional" json:"anotherOptional" yaml:"anotherOptional"\` - OptionalAny interface{} \`field:"optional" json:"optionalAny" yaml:"optionalAny"\` - OptionalArray *[]*string \`field:"optional" json:"optionalArray" yaml:"optionalArray"\` +type JavaReservedWords interface { + While() *string + SetWhile(val *string) + Abstract() + Assert() + Boolean() + Break() + Byte() + Case() + Catch() + Char() + Class() + Const() + Continue() + Default() + Do() + Double() + Else() + Enum() + Extends() + False() + Final() + Finally() + Float() + For() + Goto() + If() + Implements() + Import() + Instanceof() + Int() + Interface() + Long() + Native() + New() + Null() + Package() + Private() + Protected() + Public() + Return() + Short() + Static() + Strictfp() + Super() + Switch() + Synchronized() + This() + Throw() + Throws() + Transient() + True() + Try() + Void() + Volatile() } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DiamondBottom.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - "time" -) - -type DiamondBottom struct { - // Deprecated. - HoistedTop *string \`field:"optional" json:"hoistedTop" yaml:"hoistedTop"\` - // Deprecated. - Left *float64 \`field:"optional" json:"left" yaml:"left"\` - // Deprecated. - Right *bool \`field:"optional" json:"right" yaml:"right"\` - Bottom *time.Time \`field:"optional" json:"bottom" yaml:"bottom"\` +// The jsii proxy struct for JavaReservedWords +type jsiiProxy_JavaReservedWords struct { + _ byte // padding } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DiamondInheritanceBaseLevelStruct.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type DiamondInheritanceBaseLevelStruct struct { - BaseLevelProperty *string \`field:"required" json:"baseLevelProperty" yaml:"baseLevelProperty"\` +func (j *jsiiProxy_JavaReservedWords) While() *string { + var returns *string + _jsii_.Get( + j, + "while", + &returns, + ) + return returns } -`; +func NewJavaReservedWords() JavaReservedWords { + _init_.Initialize() -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DiamondInheritanceFirstMidLevelStruct.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + j := jsiiProxy_JavaReservedWords{} + _jsii_.Create( + "jsii-calc.JavaReservedWords", + nil, // no parameters + &j, + ) -type DiamondInheritanceFirstMidLevelStruct struct { - BaseLevelProperty *string \`field:"required" json:"baseLevelProperty" yaml:"baseLevelProperty"\` - FirstMidLevelProperty *string \`field:"required" json:"firstMidLevelProperty" yaml:"firstMidLevelProperty"\` + return &j } +func NewJavaReservedWords_Override(j JavaReservedWords) { + _init_.Initialize() -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DiamondInheritanceSecondMidLevelStruct.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type DiamondInheritanceSecondMidLevelStruct struct { - BaseLevelProperty *string \`field:"required" json:"baseLevelProperty" yaml:"baseLevelProperty"\` - SecondMidLevelProperty *string \`field:"required" json:"secondMidLevelProperty" yaml:"secondMidLevelProperty"\` + _jsii_.Create( + "jsii-calc.JavaReservedWords", + nil, // no parameters + j, + ) } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DiamondInheritanceTopLevelStruct.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type DiamondInheritanceTopLevelStruct struct { - BaseLevelProperty *string \`field:"required" json:"baseLevelProperty" yaml:"baseLevelProperty"\` - FirstMidLevelProperty *string \`field:"required" json:"firstMidLevelProperty" yaml:"firstMidLevelProperty"\` - SecondMidLevelProperty *string \`field:"required" json:"secondMidLevelProperty" yaml:"secondMidLevelProperty"\` - TopLevelProperty *string \`field:"required" json:"topLevelProperty" yaml:"topLevelProperty"\` +func (j *jsiiProxy_JavaReservedWords)SetWhile(val *string) { + _jsii_.Set( + j, + "while", + val, + ) } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DisappointingCollectionSource.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -// Verifies that null/undefined can be returned for optional collections. -// -// This source of collections is disappointing - it'll always give you nothing :(. -type DisappointingCollectionSource interface { +func (j *jsiiProxy_JavaReservedWords) Abstract() { + _jsii_.InvokeVoid( + j, + "abstract", + nil, // no parameters + ) } -// The jsii proxy struct for DisappointingCollectionSource -type jsiiProxy_DisappointingCollectionSource struct { - _ byte // padding +func (j *jsiiProxy_JavaReservedWords) Assert() { + _jsii_.InvokeVoid( + j, + "assert", + nil, // no parameters + ) } -func DisappointingCollectionSource_MaybeList() *[]*string { - _init_.Initialize() - var returns *[]*string - _jsii_.StaticGet( - "jsii-calc.DisappointingCollectionSource", - "maybeList", - &returns, +func (j *jsiiProxy_JavaReservedWords) Boolean() { + _jsii_.InvokeVoid( + j, + "boolean", + nil, // no parameters ) - return returns } -func DisappointingCollectionSource_MaybeMap() *map[string]*float64 { - _init_.Initialize() - var returns *map[string]*float64 - _jsii_.StaticGet( - "jsii-calc.DisappointingCollectionSource", - "maybeMap", - &returns, +func (j *jsiiProxy_JavaReservedWords) Break() { + _jsii_.InvokeVoid( + j, + "break", + nil, // no parameters ) - return returns } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DoNotOverridePrivates.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type DoNotOverridePrivates interface { - ChangePrivatePropertyValue(newValue *string) - PrivateMethodValue() *string - PrivatePropertyValue() *string +func (j *jsiiProxy_JavaReservedWords) Byte() { + _jsii_.InvokeVoid( + j, + "byte", + nil, // no parameters + ) } -// The jsii proxy struct for DoNotOverridePrivates -type jsiiProxy_DoNotOverridePrivates struct { - _ byte // padding +func (j *jsiiProxy_JavaReservedWords) Case() { + _jsii_.InvokeVoid( + j, + "case", + nil, // no parameters + ) } -func NewDoNotOverridePrivates() DoNotOverridePrivates { - _init_.Initialize() - - j := jsiiProxy_DoNotOverridePrivates{} - - _jsii_.Create( - "jsii-calc.DoNotOverridePrivates", +func (j *jsiiProxy_JavaReservedWords) Catch() { + _jsii_.InvokeVoid( + j, + "catch", nil, // no parameters - &j, ) - - return &j } -func NewDoNotOverridePrivates_Override(d DoNotOverridePrivates) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.DoNotOverridePrivates", +func (j *jsiiProxy_JavaReservedWords) Char() { + _jsii_.InvokeVoid( + j, + "char", nil, // no parameters - d, ) } -func (d *jsiiProxy_DoNotOverridePrivates) ChangePrivatePropertyValue(newValue *string) { +func (j *jsiiProxy_JavaReservedWords) Class() { _jsii_.InvokeVoid( - d, - "changePrivatePropertyValue", - []interface{}{newValue}, + j, + "class", + nil, // no parameters ) } -func (d *jsiiProxy_DoNotOverridePrivates) PrivateMethodValue() *string { - var returns *string - - _jsii_.Invoke( - d, - "privateMethodValue", +func (j *jsiiProxy_JavaReservedWords) Const() { + _jsii_.InvokeVoid( + j, + "const", nil, // no parameters - &returns, ) - - return returns } -func (d *jsiiProxy_DoNotOverridePrivates) PrivatePropertyValue() *string { - var returns *string - - _jsii_.Invoke( - d, - "privatePropertyValue", +func (j *jsiiProxy_JavaReservedWords) Continue() { + _jsii_.InvokeVoid( + j, + "continue", nil, // no parameters - &returns, ) - - return returns } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DoNotRecognizeAnyAsOptional.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -// jsii#284: do not recognize "any" as an optional argument. -type DoNotRecognizeAnyAsOptional interface { - Method(_requiredAny interface{}, _optionalAny interface{}, _optionalString *string) +func (j *jsiiProxy_JavaReservedWords) Default() { + _jsii_.InvokeVoid( + j, + "default", + nil, // no parameters + ) } -// The jsii proxy struct for DoNotRecognizeAnyAsOptional -type jsiiProxy_DoNotRecognizeAnyAsOptional struct { - _ byte // padding +func (j *jsiiProxy_JavaReservedWords) Do() { + _jsii_.InvokeVoid( + j, + "do", + nil, // no parameters + ) } -func NewDoNotRecognizeAnyAsOptional() DoNotRecognizeAnyAsOptional { - _init_.Initialize() +func (j *jsiiProxy_JavaReservedWords) Double() { + _jsii_.InvokeVoid( + j, + "double", + nil, // no parameters + ) +} - j := jsiiProxy_DoNotRecognizeAnyAsOptional{} +func (j *jsiiProxy_JavaReservedWords) Else() { + _jsii_.InvokeVoid( + j, + "else", + nil, // no parameters + ) +} - _jsii_.Create( - "jsii-calc.DoNotRecognizeAnyAsOptional", +func (j *jsiiProxy_JavaReservedWords) Enum() { + _jsii_.InvokeVoid( + j, + "enum", nil, // no parameters - &j, ) +} - return &j +func (j *jsiiProxy_JavaReservedWords) Extends() { + _jsii_.InvokeVoid( + j, + "extends", + nil, // no parameters + ) } -func NewDoNotRecognizeAnyAsOptional_Override(d DoNotRecognizeAnyAsOptional) { - _init_.Initialize() +func (j *jsiiProxy_JavaReservedWords) False() { + _jsii_.InvokeVoid( + j, + "false", + nil, // no parameters + ) +} - _jsii_.Create( - "jsii-calc.DoNotRecognizeAnyAsOptional", +func (j *jsiiProxy_JavaReservedWords) Final() { + _jsii_.InvokeVoid( + j, + "final", nil, // no parameters - d, ) } -func (d *jsiiProxy_DoNotRecognizeAnyAsOptional) Method(_requiredAny interface{}, _optionalAny interface{}, _optionalString *string) { +func (j *jsiiProxy_JavaReservedWords) Finally() { _jsii_.InvokeVoid( - d, - "method", - []interface{}{_requiredAny, _optionalAny, _optionalString}, + j, + "finally", + nil, // no parameters ) } +func (j *jsiiProxy_JavaReservedWords) Float() { + _jsii_.InvokeVoid( + j, + "float", + nil, // no parameters + ) +} -`; +func (j *jsiiProxy_JavaReservedWords) For() { + _jsii_.InvokeVoid( + j, + "for", + nil, // no parameters + ) +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DocumentedClass.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +func (j *jsiiProxy_JavaReservedWords) Goto() { + _jsii_.InvokeVoid( + j, + "goto", + nil, // no parameters + ) +} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) +func (j *jsiiProxy_JavaReservedWords) If() { + _jsii_.InvokeVoid( + j, + "if", + nil, // no parameters + ) +} -// Here's the first line of the TSDoc comment. -// -// This is the meat of the TSDoc comment. It may contain -// multiple lines and multiple paragraphs. -// -// Multiple paragraphs are separated by an empty line. -// -// Example: -// x := 12 + 44 -// s1 := "string" -// s2 := "string \\nwith new newlines" // see https://github.com/aws/jsii/issues/2569 -// s3 := \`string -// with -// new lines\` -// -type DocumentedClass interface { - // Greet the indicated person. - // - // This will print out a friendly greeting intended for the indicated person. - // - // Returns: A number that everyone knows very well and represents the answer - // to the ultimate question. - Greet(greetee *Greetee) *float64 - // Say ¡Hola! - // Experimental. - Hola() +func (j *jsiiProxy_JavaReservedWords) Implements() { + _jsii_.InvokeVoid( + j, + "implements", + nil, // no parameters + ) } -// The jsii proxy struct for DocumentedClass -type jsiiProxy_DocumentedClass struct { - _ byte // padding +func (j *jsiiProxy_JavaReservedWords) Import() { + _jsii_.InvokeVoid( + j, + "import", + nil, // no parameters + ) } -func NewDocumentedClass() DocumentedClass { - _init_.Initialize() +func (j *jsiiProxy_JavaReservedWords) Instanceof() { + _jsii_.InvokeVoid( + j, + "instanceof", + nil, // no parameters + ) +} - j := jsiiProxy_DocumentedClass{} +func (j *jsiiProxy_JavaReservedWords) Int() { + _jsii_.InvokeVoid( + j, + "int", + nil, // no parameters + ) +} - _jsii_.Create( - "jsii-calc.DocumentedClass", +func (j *jsiiProxy_JavaReservedWords) Interface() { + _jsii_.InvokeVoid( + j, + "interface", nil, // no parameters - &j, ) +} - return &j +func (j *jsiiProxy_JavaReservedWords) Long() { + _jsii_.InvokeVoid( + j, + "long", + nil, // no parameters + ) } -func NewDocumentedClass_Override(d DocumentedClass) { - _init_.Initialize() +func (j *jsiiProxy_JavaReservedWords) Native() { + _jsii_.InvokeVoid( + j, + "native", + nil, // no parameters + ) +} - _jsii_.Create( - "jsii-calc.DocumentedClass", +func (j *jsiiProxy_JavaReservedWords) New() { + _jsii_.InvokeVoid( + j, + "new", nil, // no parameters - d, ) } -func (d *jsiiProxy_DocumentedClass) Greet(greetee *Greetee) *float64 { - var returns *float64 +func (j *jsiiProxy_JavaReservedWords) Null() { + _jsii_.InvokeVoid( + j, + "null", + nil, // no parameters + ) +} - _jsii_.Invoke( - d, - "greet", - []interface{}{greetee}, - &returns, +func (j *jsiiProxy_JavaReservedWords) Package() { + _jsii_.InvokeVoid( + j, + "package", + nil, // no parameters ) +} - return returns +func (j *jsiiProxy_JavaReservedWords) Private() { + _jsii_.InvokeVoid( + j, + "private", + nil, // no parameters + ) } -func (d *jsiiProxy_DocumentedClass) Hola() { +func (j *jsiiProxy_JavaReservedWords) Protected() { _jsii_.InvokeVoid( - d, - "hola", + j, + "protected", nil, // no parameters ) } +func (j *jsiiProxy_JavaReservedWords) Public() { + _jsii_.InvokeVoid( + j, + "public", + nil, // no parameters + ) +} -`; +func (j *jsiiProxy_JavaReservedWords) Return() { + _jsii_.InvokeVoid( + j, + "return", + nil, // no parameters + ) +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DontComplainAboutVariadicAfterOptional.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +func (j *jsiiProxy_JavaReservedWords) Short() { + _jsii_.InvokeVoid( + j, + "short", + nil, // no parameters + ) +} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) +func (j *jsiiProxy_JavaReservedWords) Static() { + _jsii_.InvokeVoid( + j, + "static", + nil, // no parameters + ) +} -type DontComplainAboutVariadicAfterOptional interface { - OptionalAndVariadic(optional *string, things ...*string) *string +func (j *jsiiProxy_JavaReservedWords) Strictfp() { + _jsii_.InvokeVoid( + j, + "strictfp", + nil, // no parameters + ) } -// The jsii proxy struct for DontComplainAboutVariadicAfterOptional -type jsiiProxy_DontComplainAboutVariadicAfterOptional struct { - _ byte // padding +func (j *jsiiProxy_JavaReservedWords) Super() { + _jsii_.InvokeVoid( + j, + "super", + nil, // no parameters + ) } -func NewDontComplainAboutVariadicAfterOptional() DontComplainAboutVariadicAfterOptional { - _init_.Initialize() +func (j *jsiiProxy_JavaReservedWords) Switch() { + _jsii_.InvokeVoid( + j, + "switch", + nil, // no parameters + ) +} - j := jsiiProxy_DontComplainAboutVariadicAfterOptional{} +func (j *jsiiProxy_JavaReservedWords) Synchronized() { + _jsii_.InvokeVoid( + j, + "synchronized", + nil, // no parameters + ) +} - _jsii_.Create( - "jsii-calc.DontComplainAboutVariadicAfterOptional", +func (j *jsiiProxy_JavaReservedWords) This() { + _jsii_.InvokeVoid( + j, + "this", nil, // no parameters - &j, ) +} - return &j +func (j *jsiiProxy_JavaReservedWords) Throw() { + _jsii_.InvokeVoid( + j, + "throw", + nil, // no parameters + ) } -func NewDontComplainAboutVariadicAfterOptional_Override(d DontComplainAboutVariadicAfterOptional) { - _init_.Initialize() +func (j *jsiiProxy_JavaReservedWords) Throws() { + _jsii_.InvokeVoid( + j, + "throws", + nil, // no parameters + ) +} - _jsii_.Create( - "jsii-calc.DontComplainAboutVariadicAfterOptional", +func (j *jsiiProxy_JavaReservedWords) Transient() { + _jsii_.InvokeVoid( + j, + "transient", nil, // no parameters - d, ) } -func (d *jsiiProxy_DontComplainAboutVariadicAfterOptional) OptionalAndVariadic(optional *string, things ...*string) *string { - args := []interface{}{optional} - for _, a := range things { - args = append(args, a) - } +func (j *jsiiProxy_JavaReservedWords) True() { + _jsii_.InvokeVoid( + j, + "true", + nil, // no parameters + ) +} - var returns *string +func (j *jsiiProxy_JavaReservedWords) Try() { + _jsii_.InvokeVoid( + j, + "try", + nil, // no parameters + ) +} - _jsii_.Invoke( - d, - "optionalAndVariadic", - args, - &returns, +func (j *jsiiProxy_JavaReservedWords) Void() { + _jsii_.InvokeVoid( + j, + "void", + nil, // no parameters ) +} - return returns +func (j *jsiiProxy_JavaReservedWords) Volatile() { + _jsii_.InvokeVoid( + j, + "volatile", + nil, // no parameters + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DoubleTrouble.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/Jsii487Derived.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -11252,85 +11933,45 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type DoubleTrouble interface { - IFriendlyRandomGenerator - // Say hello! - Hello() *string - // Returns another random number. - Next() *float64 +type Jsii487Derived interface { + IJsii487External + IJsii487External2 } -// The jsii proxy struct for DoubleTrouble -type jsiiProxy_DoubleTrouble struct { - jsiiProxy_IFriendlyRandomGenerator +// The jsii proxy struct for Jsii487Derived +type jsiiProxy_Jsii487Derived struct { + jsiiProxy_IJsii487External + jsiiProxy_IJsii487External2 } -func NewDoubleTrouble() DoubleTrouble { +func NewJsii487Derived() Jsii487Derived { _init_.Initialize() - j := jsiiProxy_DoubleTrouble{} - - _jsii_.Create( - "jsii-calc.DoubleTrouble", - nil, // no parameters - &j, - ) - - return &j -} - -func NewDoubleTrouble_Override(d DoubleTrouble) { - _init_.Initialize() + j := jsiiProxy_Jsii487Derived{} _jsii_.Create( - "jsii-calc.DoubleTrouble", - nil, // no parameters - d, - ) -} - -func (d *jsiiProxy_DoubleTrouble) Hello() *string { - var returns *string - - _jsii_.Invoke( - d, - "hello", - nil, // no parameters - &returns, - ) - - return returns -} - -func (d *jsiiProxy_DoubleTrouble) Next() *float64 { - var returns *float64 - - _jsii_.Invoke( - d, - "next", - nil, // no parameters - &returns, - ) - - return returns -} - - -`; + "jsii-calc.Jsii487Derived", + nil, // no parameters + &j, + ) -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DummyObj.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + return &j +} +func NewJsii487Derived_Override(j Jsii487Derived) { + _init_.Initialize() -type DummyObj struct { - Example *string \`field:"required" json:"example" yaml:"example"\` + _jsii_.Create( + "jsii-calc.Jsii487Derived", + nil, // no parameters + j, + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DynamicPropertyBearer.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/Jsii496Derived.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -11339,84 +11980,43 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Ensures we can override a dynamic property that was inherited. -type DynamicPropertyBearer interface { - DynamicProperty() *string - SetDynamicProperty(val *string) - ValueStore() *string - SetValueStore(val *string) -} - -// The jsii proxy struct for DynamicPropertyBearer -type jsiiProxy_DynamicPropertyBearer struct { - _ byte // padding -} - -func (j *jsiiProxy_DynamicPropertyBearer) DynamicProperty() *string { - var returns *string - _jsii_.Get( - j, - "dynamicProperty", - &returns, - ) - return returns +type Jsii496Derived interface { + IJsii496 } -func (j *jsiiProxy_DynamicPropertyBearer) ValueStore() *string { - var returns *string - _jsii_.Get( - j, - "valueStore", - &returns, - ) - return returns +// The jsii proxy struct for Jsii496Derived +type jsiiProxy_Jsii496Derived struct { + jsiiProxy_IJsii496 } - -func NewDynamicPropertyBearer(valueStore *string) DynamicPropertyBearer { +func NewJsii496Derived() Jsii496Derived { _init_.Initialize() - j := jsiiProxy_DynamicPropertyBearer{} + j := jsiiProxy_Jsii496Derived{} _jsii_.Create( - "jsii-calc.DynamicPropertyBearer", - []interface{}{valueStore}, + "jsii-calc.Jsii496Derived", + nil, // no parameters &j, ) return &j } -func NewDynamicPropertyBearer_Override(d DynamicPropertyBearer, valueStore *string) { +func NewJsii496Derived_Override(j Jsii496Derived) { _init_.Initialize() _jsii_.Create( - "jsii-calc.DynamicPropertyBearer", - []interface{}{valueStore}, - d, - ) -} - -func (j *jsiiProxy_DynamicPropertyBearer)SetDynamicProperty(val *string) { - _jsii_.Set( - j, - "dynamicProperty", - val, - ) -} - -func (j *jsiiProxy_DynamicPropertyBearer)SetValueStore(val *string) { - _jsii_.Set( + "jsii-calc.Jsii496Derived", + nil, // no parameters j, - "valueStore", - val, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DynamicPropertyBearerChild.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/JsiiAgent.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -11425,112 +12025,54 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type DynamicPropertyBearerChild interface { - DynamicPropertyBearer - DynamicProperty() *string - SetDynamicProperty(val *string) - OriginalValue() *string - ValueStore() *string - SetValueStore(val *string) - // Sets \`this.dynamicProperty\` to the new value, and returns the old value. - // - // Returns: the old value that was set. - OverrideValue(newValue *string) *string -} - -// The jsii proxy struct for DynamicPropertyBearerChild -type jsiiProxy_DynamicPropertyBearerChild struct { - jsiiProxy_DynamicPropertyBearer -} - -func (j *jsiiProxy_DynamicPropertyBearerChild) DynamicProperty() *string { - var returns *string - _jsii_.Get( - j, - "dynamicProperty", - &returns, - ) - return returns -} - -func (j *jsiiProxy_DynamicPropertyBearerChild) OriginalValue() *string { - var returns *string - _jsii_.Get( - j, - "originalValue", - &returns, - ) - return returns +// Host runtime version should be set via JSII_AGENT. +type JsiiAgent interface { } -func (j *jsiiProxy_DynamicPropertyBearerChild) ValueStore() *string { - var returns *string - _jsii_.Get( - j, - "valueStore", - &returns, - ) - return returns +// The jsii proxy struct for JsiiAgent +type jsiiProxy_JsiiAgent struct { + _ byte // padding } - -func NewDynamicPropertyBearerChild(originalValue *string) DynamicPropertyBearerChild { +func NewJsiiAgent() JsiiAgent { _init_.Initialize() - j := jsiiProxy_DynamicPropertyBearerChild{} + j := jsiiProxy_JsiiAgent{} _jsii_.Create( - "jsii-calc.DynamicPropertyBearerChild", - []interface{}{originalValue}, + "jsii-calc.JsiiAgent", + nil, // no parameters &j, ) return &j } -func NewDynamicPropertyBearerChild_Override(d DynamicPropertyBearerChild, originalValue *string) { +func NewJsiiAgent_Override(j JsiiAgent) { _init_.Initialize() _jsii_.Create( - "jsii-calc.DynamicPropertyBearerChild", - []interface{}{originalValue}, - d, - ) -} - -func (j *jsiiProxy_DynamicPropertyBearerChild)SetDynamicProperty(val *string) { - _jsii_.Set( - j, - "dynamicProperty", - val, - ) -} - -func (j *jsiiProxy_DynamicPropertyBearerChild)SetValueStore(val *string) { - _jsii_.Set( + "jsii-calc.JsiiAgent", + nil, // no parameters j, - "valueStore", - val, ) } -func (d *jsiiProxy_DynamicPropertyBearerChild) OverrideValue(newValue *string) *string { +func JsiiAgent_Value() *string { + _init_.Initialize() var returns *string - - _jsii_.Invoke( - d, - "overrideValue", - []interface{}{newValue}, + _jsii_.StaticGet( + "jsii-calc.JsiiAgent", + "value", &returns, ) - return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Entropy.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/JsonFormatter.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -11539,40 +12081,40 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// This class is used to validate that serialization and deserialization does not interpret ISO-8601-formatted timestampts to the native date/time object, as the jsii protocol has a $jsii$date wrapper for this purpose (node's JSON parsing does *NOT* detect dates automatically in this way, so host libraries should not either). -type Entropy interface { - // Increases entropy by consuming time from the clock (yes, this is a long shot, please don't judge). - // - // Returns: the time from the \`WallClock\`. - Increase() *string - // Implement this method such that it returns \`word\`. - // - // Returns: \`word\`. - Repeat(word *string) *string +// Make sure structs are un-decorated on the way in. +// See: https://github.com/aws/aws-cdk/issues/5066 +// +type JsonFormatter interface { } -// The jsii proxy struct for Entropy -type jsiiProxy_Entropy struct { +// The jsii proxy struct for JsonFormatter +type jsiiProxy_JsonFormatter struct { _ byte // padding } -// Creates a new instance of Entropy. -func NewEntropy_Override(e Entropy, clock IWallClock) { +func JsonFormatter_AnyArray() interface{} { _init_.Initialize() - _jsii_.Create( - "jsii-calc.Entropy", - []interface{}{clock}, - e, + var returns interface{} + + _jsii_.StaticInvoke( + "jsii-calc.JsonFormatter", + "anyArray", + nil, // no parameters + &returns, ) + + return returns } -func (e *jsiiProxy_Entropy) Increase() *string { - var returns *string +func JsonFormatter_AnyBooleanFalse() interface{} { + _init_.Initialize() - _jsii_.Invoke( - e, - "increase", + var returns interface{} + + _jsii_.StaticInvoke( + "jsii-calc.JsonFormatter", + "anyBooleanFalse", nil, // no parameters &returns, ) @@ -11580,47 +12122,59 @@ func (e *jsiiProxy_Entropy) Increase() *string { return returns } -func (e *jsiiProxy_Entropy) Repeat(word *string) *string { - var returns *string +func JsonFormatter_AnyBooleanTrue() interface{} { + _init_.Initialize() - _jsii_.Invoke( - e, - "repeat", - []interface{}{word}, + var returns interface{} + + _jsii_.StaticInvoke( + "jsii-calc.JsonFormatter", + "anyBooleanTrue", + nil, // no parameters &returns, ) return returns } +func JsonFormatter_AnyDate() interface{} { + _init_.Initialize() -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_EnumDispenser.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + var returns interface{} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) + _jsii_.StaticInvoke( + "jsii-calc.JsonFormatter", + "anyDate", + nil, // no parameters + &returns, + ) -type EnumDispenser interface { + return returns } -// The jsii proxy struct for EnumDispenser -type jsiiProxy_EnumDispenser struct { - _ byte // padding +func JsonFormatter_AnyEmptyString() interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "jsii-calc.JsonFormatter", + "anyEmptyString", + nil, // no parameters + &returns, + ) + + return returns } -func EnumDispenser_RandomIntegerLikeEnum() AllTypesEnum { +func JsonFormatter_AnyFunction() interface{} { _init_.Initialize() - var returns AllTypesEnum + var returns interface{} _jsii_.StaticInvoke( - "jsii-calc.EnumDispenser", - "randomIntegerLikeEnum", + "jsii-calc.JsonFormatter", + "anyFunction", nil, // no parameters &returns, ) @@ -11628,14 +12182,14 @@ func EnumDispenser_RandomIntegerLikeEnum() AllTypesEnum { return returns } -func EnumDispenser_RandomStringLikeEnum() StringEnum { +func JsonFormatter_AnyHash() interface{} { _init_.Initialize() - var returns StringEnum + var returns interface{} _jsii_.StaticInvoke( - "jsii-calc.EnumDispenser", - "randomStringLikeEnum", + "jsii-calc.JsonFormatter", + "anyHash", nil, // no parameters &returns, ) @@ -11643,118 +12197,320 @@ func EnumDispenser_RandomStringLikeEnum() StringEnum { return returns } +func JsonFormatter_AnyNull() interface{} { + _init_.Initialize() -`; + var returns interface{} -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_EraseUndefinedHashValues.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + _jsii_.StaticInvoke( + "jsii-calc.JsonFormatter", + "anyNull", + nil, // no parameters + &returns, + ) -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) + return returns +} -type EraseUndefinedHashValues interface { +func JsonFormatter_AnyNumber() interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "jsii-calc.JsonFormatter", + "anyNumber", + nil, // no parameters + &returns, + ) + + return returns } -// The jsii proxy struct for EraseUndefinedHashValues -type jsiiProxy_EraseUndefinedHashValues struct { - _ byte // padding +func JsonFormatter_AnyRef() interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "jsii-calc.JsonFormatter", + "anyRef", + nil, // no parameters + &returns, + ) + + return returns } -func NewEraseUndefinedHashValues() EraseUndefinedHashValues { +func JsonFormatter_AnyString() interface{} { _init_.Initialize() - j := jsiiProxy_EraseUndefinedHashValues{} + var returns interface{} - _jsii_.Create( - "jsii-calc.EraseUndefinedHashValues", + _jsii_.StaticInvoke( + "jsii-calc.JsonFormatter", + "anyString", nil, // no parameters - &j, + &returns, ) - return &j + return returns } -func NewEraseUndefinedHashValues_Override(e EraseUndefinedHashValues) { +func JsonFormatter_AnyUndefined() interface{} { _init_.Initialize() - _jsii_.Create( - "jsii-calc.EraseUndefinedHashValues", + var returns interface{} + + _jsii_.StaticInvoke( + "jsii-calc.JsonFormatter", + "anyUndefined", nil, // no parameters - e, + &returns, ) + + return returns } -// Returns \`true\` if \`key\` is defined in \`opts\`. -// -// Used to check that undefined/null hash values -// are being erased when sending values from native code to JS. -func EraseUndefinedHashValues_DoesKeyExist(opts *EraseUndefinedHashValuesOptions, key *string) *bool { +func JsonFormatter_AnyZero() interface{} { _init_.Initialize() - var returns *bool + var returns interface{} _jsii_.StaticInvoke( - "jsii-calc.EraseUndefinedHashValues", - "doesKeyExist", - []interface{}{opts, key}, + "jsii-calc.JsonFormatter", + "anyZero", + nil, // no parameters &returns, ) return returns } -// We expect "prop1" to be erased. -func EraseUndefinedHashValues_Prop1IsNull() *map[string]interface{} { +func JsonFormatter_Stringify(value interface{}) *string { _init_.Initialize() - var returns *map[string]interface{} + var returns *string + + _jsii_.StaticInvoke( + "jsii-calc.JsonFormatter", + "stringify", + []interface{}{value}, + &returns, + ) + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/LICENSE 1`] = ` + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. - _jsii_.StaticInvoke( - "jsii-calc.EraseUndefinedHashValues", - "prop1IsNull", - nil, // no parameters - &returns, - ) + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. - return returns -} + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. -// We expect "prop2" to be erased. -func EraseUndefinedHashValues_Prop2IsUndefined() *map[string]interface{} { - _init_.Initialize() + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. - var returns *map[string]interface{} + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. - _jsii_.StaticInvoke( - "jsii-calc.EraseUndefinedHashValues", - "prop2IsUndefined", - nil, // no parameters - &returns, - ) + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. - return returns -} + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + END OF TERMS AND CONDITIONS -`; + APPENDIX: How to apply the Apache License to your work. -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_EraseUndefinedHashValuesOptions.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. -type EraseUndefinedHashValuesOptions struct { - Option1 *string \`field:"optional" json:"option1" yaml:"option1"\` - Option2 *string \`field:"optional" json:"option2" yaml:"option2"\` -} + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExperimentalClass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/LevelOne.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -11763,122 +12519,139 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Experimental. -type ExperimentalClass interface { - // Experimental. - MutableProperty() *float64 - // Experimental. - SetMutableProperty(val *float64) - // Experimental. - ReadonlyProperty() *string - // Experimental. - Method() +// Validates that nested classes get correct code generation for the occasional forward reference. +type LevelOne interface { + Props() *LevelOneProps } -// The jsii proxy struct for ExperimentalClass -type jsiiProxy_ExperimentalClass struct { +// The jsii proxy struct for LevelOne +type jsiiProxy_LevelOne struct { _ byte // padding } -func (j *jsiiProxy_ExperimentalClass) MutableProperty() *float64 { - var returns *float64 - _jsii_.Get( - j, - "mutableProperty", - &returns, - ) - return returns -} - -func (j *jsiiProxy_ExperimentalClass) ReadonlyProperty() *string { - var returns *string +func (j *jsiiProxy_LevelOne) Props() *LevelOneProps { + var returns *LevelOneProps _jsii_.Get( j, - "readonlyProperty", + "props", &returns, ) return returns } -// Experimental. -func NewExperimentalClass(readonlyString *string, mutableNumber *float64) ExperimentalClass { +func NewLevelOne(props *LevelOneProps) LevelOne { _init_.Initialize() - j := jsiiProxy_ExperimentalClass{} + j := jsiiProxy_LevelOne{} _jsii_.Create( - "jsii-calc.ExperimentalClass", - []interface{}{readonlyString, mutableNumber}, + "jsii-calc.LevelOne", + []interface{}{props}, &j, ) return &j } -// Experimental. -func NewExperimentalClass_Override(e ExperimentalClass, readonlyString *string, mutableNumber *float64) { +func NewLevelOne_Override(l LevelOne, props *LevelOneProps) { _init_.Initialize() _jsii_.Create( - "jsii-calc.ExperimentalClass", - []interface{}{readonlyString, mutableNumber}, - e, + "jsii-calc.LevelOne", + []interface{}{props}, + l, ) } -func (j *jsiiProxy_ExperimentalClass)SetMutableProperty(val *float64) { - _jsii_.Set( - j, - "mutableProperty", - val, - ) -} -func (e *jsiiProxy_ExperimentalClass) Method() { - _jsii_.InvokeVoid( - e, - "method", - nil, // no parameters - ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/LevelOne_PropBooleanValue.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type LevelOne_PropBooleanValue struct { + Value *bool \`field:"required" json:"value" yaml:"value"\` } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExperimentalEnum.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/LevelOne_PropProperty.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc -// Experimental. -type ExperimentalEnum string +type LevelOne_PropProperty struct { + Prop *LevelOne_PropBooleanValue \`field:"required" json:"prop" yaml:"prop"\` +} -const ( - // Experimental. - ExperimentalEnum_OPTION_A ExperimentalEnum = "OPTION_A" - // Experimental. - ExperimentalEnum_OPTION_B ExperimentalEnum = "OPTION_B" -) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/LevelOneProps.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type LevelOneProps struct { + Prop *LevelOne_PropProperty \`field:"required" json:"prop" yaml:"prop"\` +} `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExperimentalStruct.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/LoadBalancedFargateServiceProps.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc -// Experimental. -type ExperimentalStruct struct { - // Experimental. - ReadonlyProperty *string \`field:"required" json:"readonlyProperty" yaml:"readonlyProperty"\` +// jsii#298: show default values in sphinx documentation, and respect newlines. +type LoadBalancedFargateServiceProps struct { + // The container port of the application load balancer attached to your Fargate service. + // + // Corresponds to container port mapping. + ContainerPort *float64 \`field:"optional" json:"containerPort" yaml:"containerPort"\` + // The number of cpu units used by the task. + // + // Valid values, which determines your range of valid values for the memory parameter: + // 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB + // 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB + // 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB + // 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments + // 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments + // + // This default is set in the underlying FargateTaskDefinition construct. + Cpu *string \`field:"optional" json:"cpu" yaml:"cpu"\` + // The amount (in MiB) of memory used by the task. + // + // This field is required and you must use one of the following values, which determines your range of valid values + // for the cpu parameter: + // + // 0.5GB, 1GB, 2GB - Available cpu values: 256 (.25 vCPU) + // + // 1GB, 2GB, 3GB, 4GB - Available cpu values: 512 (.5 vCPU) + // + // 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - Available cpu values: 1024 (1 vCPU) + // + // Between 4GB and 16GB in 1GB increments - Available cpu values: 2048 (2 vCPU) + // + // Between 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU) + // + // This default is set in the underlying FargateTaskDefinition construct. + MemoryMiB *string \`field:"optional" json:"memoryMiB" yaml:"memoryMiB"\` + // Determines whether the Application Load Balancer will be internet-facing. + PublicLoadBalancer *bool \`field:"optional" json:"publicLoadBalancer" yaml:"publicLoadBalancer"\` + // Determines whether your Fargate Service will be assigned a public IP address. + PublicTasks *bool \`field:"optional" json:"publicTasks" yaml:"publicTasks"\` } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExportedBaseClass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/MethodNamedProperty.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -11887,216 +12660,238 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type ExportedBaseClass interface { - Success() *bool +type MethodNamedProperty interface { + Elite() *float64 + Property() *string } -// The jsii proxy struct for ExportedBaseClass -type jsiiProxy_ExportedBaseClass struct { +// The jsii proxy struct for MethodNamedProperty +type jsiiProxy_MethodNamedProperty struct { _ byte // padding } -func (j *jsiiProxy_ExportedBaseClass) Success() *bool { - var returns *bool +func (j *jsiiProxy_MethodNamedProperty) Elite() *float64 { + var returns *float64 _jsii_.Get( j, - "success", + "elite", &returns, ) return returns } -func NewExportedBaseClass(success *bool) ExportedBaseClass { +func NewMethodNamedProperty() MethodNamedProperty { _init_.Initialize() - j := jsiiProxy_ExportedBaseClass{} + j := jsiiProxy_MethodNamedProperty{} _jsii_.Create( - "jsii-calc.ExportedBaseClass", - []interface{}{success}, + "jsii-calc.MethodNamedProperty", + nil, // no parameters &j, ) return &j } -func NewExportedBaseClass_Override(e ExportedBaseClass, success *bool) { +func NewMethodNamedProperty_Override(m MethodNamedProperty) { _init_.Initialize() _jsii_.Create( - "jsii-calc.ExportedBaseClass", - []interface{}{success}, - e, + "jsii-calc.MethodNamedProperty", + nil, // no parameters + m, ) } +func (m *jsiiProxy_MethodNamedProperty) Property() *string { + var returns *string -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExtendsInternalInterface.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - + _jsii_.Invoke( + m, + "property", + nil, // no parameters + &returns, + ) -type ExtendsInternalInterface struct { - Boom *bool \`field:"required" json:"boom" yaml:"boom"\` - Prop *string \`field:"required" json:"prop" yaml:"prop"\` + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExternalClass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/Multiply.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -type ExternalClass interface { - MutableProperty() *float64 - SetMutableProperty(val *float64) - ReadonlyProperty() *string - Method() +// The "*" binary operation. +type Multiply interface { + BinaryOperation + IFriendlier + IRandomNumberGenerator + // Left-hand side operand. + Lhs() scopejsiicalclib.NumericValue + // Right-hand side operand. + Rhs() scopejsiicalclib.NumericValue + // The value. + Value() *float64 + // Say farewell. + Farewell() *string + // Say goodbye. + Goodbye() *string + // Say hello! + Hello() *string + // Returns another random number. + Next() *float64 + // String representation of the value. + ToString() *string + // Returns: the name of the class (to verify native type names are created for derived classes). + TypeName() interface{} } -// The jsii proxy struct for ExternalClass -type jsiiProxy_ExternalClass struct { - _ byte // padding +// The jsii proxy struct for Multiply +type jsiiProxy_Multiply struct { + jsiiProxy_BinaryOperation + jsiiProxy_IFriendlier + jsiiProxy_IRandomNumberGenerator } -func (j *jsiiProxy_ExternalClass) MutableProperty() *float64 { - var returns *float64 +func (j *jsiiProxy_Multiply) Lhs() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue _jsii_.Get( j, - "mutableProperty", + "lhs", &returns, ) return returns } -func (j *jsiiProxy_ExternalClass) ReadonlyProperty() *string { - var returns *string +func (j *jsiiProxy_Multiply) Rhs() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue _jsii_.Get( j, - "readonlyProperty", + "rhs", + &returns, + ) + return returns +} + +func (j *jsiiProxy_Multiply) Value() *float64 { + var returns *float64 + _jsii_.Get( + j, + "value", &returns, ) return returns } -func NewExternalClass(readonlyString *string, mutableNumber *float64) ExternalClass { +// Creates a BinaryOperation. +func NewMultiply(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) Multiply { _init_.Initialize() - j := jsiiProxy_ExternalClass{} + j := jsiiProxy_Multiply{} _jsii_.Create( - "jsii-calc.ExternalClass", - []interface{}{readonlyString, mutableNumber}, + "jsii-calc.Multiply", + []interface{}{lhs, rhs}, &j, ) return &j } -func NewExternalClass_Override(e ExternalClass, readonlyString *string, mutableNumber *float64) { +// Creates a BinaryOperation. +func NewMultiply_Override(m Multiply, lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) { _init_.Initialize() _jsii_.Create( - "jsii-calc.ExternalClass", - []interface{}{readonlyString, mutableNumber}, - e, + "jsii-calc.Multiply", + []interface{}{lhs, rhs}, + m, ) } -func (j *jsiiProxy_ExternalClass)SetMutableProperty(val *float64) { - _jsii_.Set( - j, - "mutableProperty", - val, - ) -} +func (m *jsiiProxy_Multiply) Farewell() *string { + var returns *string -func (e *jsiiProxy_ExternalClass) Method() { - _jsii_.InvokeVoid( - e, - "method", + _jsii_.Invoke( + m, + "farewell", nil, // no parameters + &returns, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExternalEnum.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type ExternalEnum string -const ( - ExternalEnum_OPTION_A ExternalEnum = "OPTION_A" - ExternalEnum_OPTION_B ExternalEnum = "OPTION_B" -) - - -`; + return returns +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExternalStruct.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +func (m *jsiiProxy_Multiply) Goodbye() *string { + var returns *string + _jsii_.Invoke( + m, + "goodbye", + nil, // no parameters + &returns, + ) -type ExternalStruct struct { - ReadonlyProperty *string \`field:"required" json:"readonlyProperty" yaml:"readonlyProperty"\` + return returns } +func (m *jsiiProxy_Multiply) Hello() *string { + var returns *string -`; + _jsii_.Invoke( + m, + "hello", + nil, // no parameters + &returns, + ) -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_FullCombo.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + return returns +} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) +func (m *jsiiProxy_Multiply) Next() *float64 { + var returns *float64 -type FullCombo interface { - BaseClass - IIndirectlyImplemented - Property() *string - Method() *float64 -} + _jsii_.Invoke( + m, + "next", + nil, // no parameters + &returns, + ) -// The jsii proxy struct for FullCombo -type jsiiProxy_FullCombo struct { - jsiiProxy_BaseClass - jsiiProxy_IIndirectlyImplemented + return returns } -func (j *jsiiProxy_FullCombo) Property() *string { +func (m *jsiiProxy_Multiply) ToString() *string { var returns *string - _jsii_.Get( - j, - "property", + + _jsii_.Invoke( + m, + "toString", + nil, // no parameters &returns, ) + return returns } - -func (f *jsiiProxy_FullCombo) Method() *float64 { - var returns *float64 +func (m *jsiiProxy_Multiply) TypeName() interface{} { + var returns interface{} _jsii_.Invoke( - f, - "method", + m, + "typeName", nil, // no parameters &returns, ) @@ -12107,7 +12902,13 @@ func (f *jsiiProxy_FullCombo) Method() *float64 { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_GiveMeStructs.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/NOTICE 1`] = ` +jsii +Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/Negate.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -12118,113 +12919,145 @@ import ( "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -type GiveMeStructs interface { - StructLiteral() *scopejsiicalclib.StructWithOnlyOptionals - // Accepts a struct of type DerivedStruct and returns a struct of type FirstStruct. - DerivedToFirst(derived *DerivedStruct) *scopejsiicalclib.MyFirstStruct - // Returns the boolean from a DerivedStruct struct. - ReadDerivedNonPrimitive(derived *DerivedStruct) DoubleTrouble - // Returns the "anumber" from a MyFirstStruct struct;. - ReadFirstNumber(first *scopejsiicalclib.MyFirstStruct) *float64 +// The negation operation ("-value"). +type Negate interface { + UnaryOperation + IFriendlier + Operand() scopejsiicalclib.NumericValue + // The value. + Value() *float64 + // Say farewell. + Farewell() *string + // Say goodbye. + Goodbye() *string + // Say hello! + Hello() *string + // String representation of the value. + ToString() *string + // Returns: the name of the class (to verify native type names are created for derived classes). + TypeName() interface{} } -// The jsii proxy struct for GiveMeStructs -type jsiiProxy_GiveMeStructs struct { - _ byte // padding +// The jsii proxy struct for Negate +type jsiiProxy_Negate struct { + jsiiProxy_UnaryOperation + jsiiProxy_IFriendlier } -func (j *jsiiProxy_GiveMeStructs) StructLiteral() *scopejsiicalclib.StructWithOnlyOptionals { - var returns *scopejsiicalclib.StructWithOnlyOptionals +func (j *jsiiProxy_Negate) Operand() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue + _jsii_.Get( + j, + "operand", + &returns, + ) + return returns +} + +func (j *jsiiProxy_Negate) Value() *float64 { + var returns *float64 _jsii_.Get( j, - "structLiteral", + "value", &returns, ) return returns } -func NewGiveMeStructs() GiveMeStructs { +func NewNegate(operand scopejsiicalclib.NumericValue) Negate { _init_.Initialize() - j := jsiiProxy_GiveMeStructs{} + j := jsiiProxy_Negate{} _jsii_.Create( - "jsii-calc.GiveMeStructs", - nil, // no parameters + "jsii-calc.Negate", + []interface{}{operand}, &j, ) return &j } -func NewGiveMeStructs_Override(g GiveMeStructs) { +func NewNegate_Override(n Negate, operand scopejsiicalclib.NumericValue) { _init_.Initialize() _jsii_.Create( - "jsii-calc.GiveMeStructs", - nil, // no parameters - g, + "jsii-calc.Negate", + []interface{}{operand}, + n, ) } -func (g *jsiiProxy_GiveMeStructs) DerivedToFirst(derived *DerivedStruct) *scopejsiicalclib.MyFirstStruct { - var returns *scopejsiicalclib.MyFirstStruct +func (n *jsiiProxy_Negate) Farewell() *string { + var returns *string _jsii_.Invoke( - g, - "derivedToFirst", - []interface{}{derived}, + n, + "farewell", + nil, // no parameters &returns, ) return returns } -func (g *jsiiProxy_GiveMeStructs) ReadDerivedNonPrimitive(derived *DerivedStruct) DoubleTrouble { - var returns DoubleTrouble +func (n *jsiiProxy_Negate) Goodbye() *string { + var returns *string _jsii_.Invoke( - g, - "readDerivedNonPrimitive", - []interface{}{derived}, + n, + "goodbye", + nil, // no parameters &returns, ) return returns } -func (g *jsiiProxy_GiveMeStructs) ReadFirstNumber(first *scopejsiicalclib.MyFirstStruct) *float64 { - var returns *float64 +func (n *jsiiProxy_Negate) Hello() *string { + var returns *string _jsii_.Invoke( - g, - "readFirstNumber", - []interface{}{first}, + n, + "hello", + nil, // no parameters &returns, ) return returns } +func (n *jsiiProxy_Negate) ToString() *string { + var returns *string -`; + _jsii_.Invoke( + n, + "toString", + nil, // no parameters + &returns, + ) -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Greetee.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + return returns +} + +func (n *jsiiProxy_Negate) TypeName() interface{} { + var returns interface{} + _jsii_.Invoke( + n, + "typeName", + nil, // no parameters + &returns, + ) -// These are some arguments you can pass to a method. -type Greetee struct { - // The name of the greetee. - Name *string \`field:"optional" json:"name" yaml:"name"\` + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_GreetingAugmenter.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/NestedClassInstance.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -12232,130 +13065,134 @@ import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/customsubmodulename" ) -type GreetingAugmenter interface { - BetterGreeting(friendly scopejsiicalclib.IFriendly) *string +type NestedClassInstance interface { } -// The jsii proxy struct for GreetingAugmenter -type jsiiProxy_GreetingAugmenter struct { +// The jsii proxy struct for NestedClassInstance +type jsiiProxy_NestedClassInstance struct { _ byte // padding } -func NewGreetingAugmenter() GreetingAugmenter { +func NestedClassInstance_MakeInstance() customsubmodulename.NestingClass_NestedClass { _init_.Initialize() - j := jsiiProxy_GreetingAugmenter{} + var returns customsubmodulename.NestingClass_NestedClass - _jsii_.Create( - "jsii-calc.GreetingAugmenter", + _jsii_.StaticInvoke( + "jsii-calc.NestedClassInstance", + "makeInstance", nil, // no parameters - &j, + &returns, ) - return &j + return returns } -func NewGreetingAugmenter_Override(g GreetingAugmenter) { - _init_.Initialize() - _jsii_.Create( - "jsii-calc.GreetingAugmenter", - nil, // no parameters - g, - ) -} +`; -func (g *jsiiProxy_GreetingAugmenter) BetterGreeting(friendly scopejsiicalclib.IFriendly) *string { - var returns *string +exports[`Generated code for "jsii-calc": /go/jsiicalc/NestedStruct.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - _jsii_.Invoke( - g, - "betterGreeting", - []interface{}{friendly}, - &returns, - ) - return returns +type NestedStruct struct { + // When provided, must be > 0. + NumberProp *float64 \`field:"required" json:"numberProp" yaml:"numberProp"\` } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IAnonymousImplementationProvider.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/NodeStandardLibrary.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// We can return an anonymous interface implementation from an override without losing the interface declarations. -type IAnonymousImplementationProvider interface { - ProvideAsClass() Implementation - ProvideAsInterface() IAnonymouslyImplementMe +// Test fixture to verify that jsii modules can use the node standard library. +type NodeStandardLibrary interface { + // Returns the current os.platform() from the "os" node module. + OsPlatform() *string + // Uses node.js "crypto" module to calculate sha256 of a string. + // + // Returns: "6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50". + CryptoSha256() *string + // Reads a local resource file (resource.txt) asynchronously. + // + // Returns: "Hello, resource!" + FsReadFile() *string + // Sync version of fsReadFile. + // + // Returns: "Hello, resource! SYNC!" + FsReadFileSync() *string } -// The jsii proxy for IAnonymousImplementationProvider -type jsiiProxy_IAnonymousImplementationProvider struct { +// The jsii proxy struct for NodeStandardLibrary +type jsiiProxy_NodeStandardLibrary struct { _ byte // padding } -func (i *jsiiProxy_IAnonymousImplementationProvider) ProvideAsClass() Implementation { - var returns Implementation - - _jsii_.Invoke( - i, - "provideAsClass", - nil, // no parameters +func (j *jsiiProxy_NodeStandardLibrary) OsPlatform() *string { + var returns *string + _jsii_.Get( + j, + "osPlatform", &returns, ) - return returns } -func (i *jsiiProxy_IAnonymousImplementationProvider) ProvideAsInterface() IAnonymouslyImplementMe { - var returns IAnonymouslyImplementMe - _jsii_.Invoke( - i, - "provideAsInterface", +func NewNodeStandardLibrary() NodeStandardLibrary { + _init_.Initialize() + + j := jsiiProxy_NodeStandardLibrary{} + + _jsii_.Create( + "jsii-calc.NodeStandardLibrary", nil, // no parameters - &returns, + &j, ) - return returns + return &j } +func NewNodeStandardLibrary_Override(n NodeStandardLibrary) { + _init_.Initialize() -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IAnonymouslyImplementMe.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + _jsii_.Create( + "jsii-calc.NodeStandardLibrary", + nil, // no parameters + n, + ) +} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) +func (n *jsiiProxy_NodeStandardLibrary) CryptoSha256() *string { + var returns *string -type IAnonymouslyImplementMe interface { - Verb() *string - Value() *float64 -} + _jsii_.Invoke( + n, + "cryptoSha256", + nil, // no parameters + &returns, + ) -// The jsii proxy for IAnonymouslyImplementMe -type jsiiProxy_IAnonymouslyImplementMe struct { - _ byte // padding + return returns } -func (i *jsiiProxy_IAnonymouslyImplementMe) Verb() *string { +func (n *jsiiProxy_NodeStandardLibrary) FsReadFile() *string { var returns *string _jsii_.Invoke( - i, - "verb", + n, + "fsReadFile", nil, // no parameters &returns, ) @@ -12363,79 +13200,108 @@ func (i *jsiiProxy_IAnonymouslyImplementMe) Verb() *string { return returns } -func (j *jsiiProxy_IAnonymouslyImplementMe) Value() *float64 { - var returns *float64 - _jsii_.Get( - j, - "value", +func (n *jsiiProxy_NodeStandardLibrary) FsReadFileSync() *string { + var returns *string + + _jsii_.Invoke( + n, + "fsReadFileSync", + nil, // no parameters &returns, ) + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IAnotherPublicInterface.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/NullShouldBeTreatedAsUndefined.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type IAnotherPublicInterface interface { - A() *string - SetA(a *string) +// jsii#282, aws-cdk#157: null should be treated as "undefined". +type NullShouldBeTreatedAsUndefined interface { + ChangeMeToUndefined() *string + SetChangeMeToUndefined(val *string) + GiveMeUndefined(value interface{}) + GiveMeUndefinedInsideAnObject(input *NullShouldBeTreatedAsUndefinedData) + VerifyPropertyIsUndefined() } -// The jsii proxy for IAnotherPublicInterface -type jsiiProxy_IAnotherPublicInterface struct { +// The jsii proxy struct for NullShouldBeTreatedAsUndefined +type jsiiProxy_NullShouldBeTreatedAsUndefined struct { _ byte // padding } -func (j *jsiiProxy_IAnotherPublicInterface) A() *string { +func (j *jsiiProxy_NullShouldBeTreatedAsUndefined) ChangeMeToUndefined() *string { var returns *string _jsii_.Get( j, - "a", + "changeMeToUndefined", &returns, ) return returns } -func (j *jsiiProxy_IAnotherPublicInterface)SetA(val *string) { - _jsii_.Set( - j, - "a", - val, + +func NewNullShouldBeTreatedAsUndefined(_param1 *string, optional interface{}) NullShouldBeTreatedAsUndefined { + _init_.Initialize() + + j := jsiiProxy_NullShouldBeTreatedAsUndefined{} + + _jsii_.Create( + "jsii-calc.NullShouldBeTreatedAsUndefined", + []interface{}{_param1, optional}, + &j, ) -} + return &j +} -`; +func NewNullShouldBeTreatedAsUndefined_Override(n NullShouldBeTreatedAsUndefined, _param1 *string, optional interface{}) { + _init_.Initialize() -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IBell.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + _jsii_.Create( + "jsii-calc.NullShouldBeTreatedAsUndefined", + []interface{}{_param1, optional}, + n, + ) +} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) +func (j *jsiiProxy_NullShouldBeTreatedAsUndefined)SetChangeMeToUndefined(val *string) { + _jsii_.Set( + j, + "changeMeToUndefined", + val, + ) +} -type IBell interface { - Ring() +func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) GiveMeUndefined(value interface{}) { + _jsii_.InvokeVoid( + n, + "giveMeUndefined", + []interface{}{value}, + ) } -// The jsii proxy for IBell -type jsiiProxy_IBell struct { - _ byte // padding +func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) GiveMeUndefinedInsideAnObject(input *NullShouldBeTreatedAsUndefinedData) { + _jsii_.InvokeVoid( + n, + "giveMeUndefinedInsideAnObject", + []interface{}{input}, + ) } -func (i *jsiiProxy_IBell) Ring() { +func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) VerifyPropertyIsUndefined() { _jsii_.InvokeVoid( - i, - "ring", + n, + "verifyPropertyIsUndefined", nil, // no parameters ) } @@ -12443,1842 +13309,1705 @@ func (i *jsiiProxy_IBell) Ring() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IBellRinger.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/NullShouldBeTreatedAsUndefinedData.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -// Takes the object parameter as an interface. -type IBellRinger interface { - YourTurn(bell IBell) -} - -// The jsii proxy for IBellRinger -type jsiiProxy_IBellRinger struct { - _ byte // padding -} -func (i *jsiiProxy_IBellRinger) YourTurn(bell IBell) { - _jsii_.InvokeVoid( - i, - "yourTurn", - []interface{}{bell}, - ) +type NullShouldBeTreatedAsUndefinedData struct { + ArrayWithThreeElementsAndUndefinedAsSecondArgument *[]interface{} \`field:"required" json:"arrayWithThreeElementsAndUndefinedAsSecondArgument" yaml:"arrayWithThreeElementsAndUndefinedAsSecondArgument"\` + ThisShouldBeUndefined interface{} \`field:"optional" json:"thisShouldBeUndefined" yaml:"thisShouldBeUndefined"\` } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IConcreteBellRinger.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/NumberGenerator.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Takes the object parameter as a calss. -type IConcreteBellRinger interface { - YourTurn(bell Bell) +// This allows us to test that a reference can be stored for objects that implement interfaces. +type NumberGenerator interface { + Generator() IRandomNumberGenerator + SetGenerator(val IRandomNumberGenerator) + IsSameGenerator(gen IRandomNumberGenerator) *bool + NextTimes100() *float64 } -// The jsii proxy for IConcreteBellRinger -type jsiiProxy_IConcreteBellRinger struct { +// The jsii proxy struct for NumberGenerator +type jsiiProxy_NumberGenerator struct { _ byte // padding } -func (i *jsiiProxy_IConcreteBellRinger) YourTurn(bell Bell) { - _jsii_.InvokeVoid( - i, - "yourTurn", - []interface{}{bell}, +func (j *jsiiProxy_NumberGenerator) Generator() IRandomNumberGenerator { + var returns IRandomNumberGenerator + _jsii_.Get( + j, + "generator", + &returns, ) + return returns } -`; +func NewNumberGenerator(generator IRandomNumberGenerator) NumberGenerator { + _init_.Initialize() -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IDeprecatedInterface.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + j := jsiiProxy_NumberGenerator{} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) + _jsii_.Create( + "jsii-calc.NumberGenerator", + []interface{}{generator}, + &j, + ) -// Deprecated: useless interface. -type IDeprecatedInterface interface { - // Deprecated: services no purpose. - Method() - // Deprecated: could be better. - MutableProperty() *float64 - // Deprecated: could be better. - SetMutableProperty(m *float64) + return &j } -// The jsii proxy for IDeprecatedInterface -type jsiiProxy_IDeprecatedInterface struct { - _ byte // padding -} +func NewNumberGenerator_Override(n NumberGenerator, generator IRandomNumberGenerator) { + _init_.Initialize() -func (i *jsiiProxy_IDeprecatedInterface) Method() { - _jsii_.InvokeVoid( - i, - "method", - nil, // no parameters + _jsii_.Create( + "jsii-calc.NumberGenerator", + []interface{}{generator}, + n, ) } -func (j *jsiiProxy_IDeprecatedInterface) MutableProperty() *float64 { - var returns *float64 - _jsii_.Get( +func (j *jsiiProxy_NumberGenerator)SetGenerator(val IRandomNumberGenerator) { + _jsii_.Set( j, - "mutableProperty", + "generator", + val, + ) +} + +func (n *jsiiProxy_NumberGenerator) IsSameGenerator(gen IRandomNumberGenerator) *bool { + var returns *bool + + _jsii_.Invoke( + n, + "isSameGenerator", + []interface{}{gen}, &returns, ) + return returns } -func (j *jsiiProxy_IDeprecatedInterface)SetMutableProperty(val *float64) { - _jsii_.Set( - j, - "mutableProperty", - val, +func (n *jsiiProxy_NumberGenerator) NextTimes100() *float64 { + var returns *float64 + + _jsii_.Invoke( + n, + "nextTimes100", + nil, // no parameters + &returns, ) + + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IExperimentalInterface.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/ObjectRefsInCollections.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -// Experimental. -type IExperimentalInterface interface { - // Experimental. - Method() - // Experimental. - MutableProperty() *float64 - // Experimental. - SetMutableProperty(m *float64) +// Verify that object references can be passed inside collections. +type ObjectRefsInCollections interface { + // Returns the sum of all values. + SumFromArray(values *[]scopejsiicalclib.NumericValue) *float64 + // Returns the sum of all values in a map. + SumFromMap(values *map[string]scopejsiicalclib.NumericValue) *float64 } -// The jsii proxy for IExperimentalInterface -type jsiiProxy_IExperimentalInterface struct { +// The jsii proxy struct for ObjectRefsInCollections +type jsiiProxy_ObjectRefsInCollections struct { _ byte // padding } -func (i *jsiiProxy_IExperimentalInterface) Method() { - _jsii_.InvokeVoid( - i, - "method", - nil, // no parameters - ) -} +func NewObjectRefsInCollections() ObjectRefsInCollections { + _init_.Initialize() -func (j *jsiiProxy_IExperimentalInterface) MutableProperty() *float64 { - var returns *float64 - _jsii_.Get( - j, - "mutableProperty", - &returns, - ) - return returns -} + j := jsiiProxy_ObjectRefsInCollections{} -func (j *jsiiProxy_IExperimentalInterface)SetMutableProperty(val *float64) { - _jsii_.Set( - j, - "mutableProperty", - val, + _jsii_.Create( + "jsii-calc.ObjectRefsInCollections", + nil, // no parameters + &j, ) -} + return &j +} -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IExtendsPrivateInterface.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) +func NewObjectRefsInCollections_Override(o ObjectRefsInCollections) { + _init_.Initialize() -type IExtendsPrivateInterface interface { - MoreThings() *[]*string - Private() *string - SetPrivate(p *string) + _jsii_.Create( + "jsii-calc.ObjectRefsInCollections", + nil, // no parameters + o, + ) } -// The jsii proxy for IExtendsPrivateInterface -type jsiiProxy_IExtendsPrivateInterface struct { - _ byte // padding -} +func (o *jsiiProxy_ObjectRefsInCollections) SumFromArray(values *[]scopejsiicalclib.NumericValue) *float64 { + var returns *float64 -func (j *jsiiProxy_IExtendsPrivateInterface) MoreThings() *[]*string { - var returns *[]*string - _jsii_.Get( - j, - "moreThings", + _jsii_.Invoke( + o, + "sumFromArray", + []interface{}{values}, &returns, ) + return returns } -func (j *jsiiProxy_IExtendsPrivateInterface) Private() *string { - var returns *string - _jsii_.Get( - j, - "private", +func (o *jsiiProxy_ObjectRefsInCollections) SumFromMap(values *map[string]scopejsiicalclib.NumericValue) *float64 { + var returns *float64 + + _jsii_.Invoke( + o, + "sumFromMap", + []interface{}{values}, &returns, ) - return returns -} -func (j *jsiiProxy_IExtendsPrivateInterface)SetPrivate(val *string) { - _jsii_.Set( - j, - "private", - val, - ) + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IExternalInterface.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/ObjectWithPropertyProvider.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type IExternalInterface interface { - Method() - MutableProperty() *float64 - SetMutableProperty(m *float64) +type ObjectWithPropertyProvider interface { } -// The jsii proxy for IExternalInterface -type jsiiProxy_IExternalInterface struct { +// The jsii proxy struct for ObjectWithPropertyProvider +type jsiiProxy_ObjectWithPropertyProvider struct { _ byte // padding } -func (i *jsiiProxy_IExternalInterface) Method() { - _jsii_.InvokeVoid( - i, - "method", - nil, // no parameters - ) -} +func ObjectWithPropertyProvider_Provide() IObjectWithProperty { + _init_.Initialize() -func (j *jsiiProxy_IExternalInterface) MutableProperty() *float64 { - var returns *float64 - _jsii_.Get( - j, - "mutableProperty", + var returns IObjectWithProperty + + _jsii_.StaticInvoke( + "jsii-calc.ObjectWithPropertyProvider", + "provide", + nil, // no parameters &returns, ) - return returns -} -func (j *jsiiProxy_IExternalInterface)SetMutableProperty(val *float64) { - _jsii_.Set( - j, - "mutableProperty", - val, - ) + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IFriendlier.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/Old.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Even friendlier classes can implement this interface. -type IFriendlier interface { - scopejsiicalclib.IFriendly - // Say farewell. - Farewell() *string - // Say goodbye. - // - // Returns: A goodbye blessing. - Goodbye() *string +// Old class. +// Deprecated: Use the new class or the old class whatever you want because +// whatever you like is always the best. +type Old interface { + // Doo wop that thing. + // Deprecated: Use the new class or the old class whatever you want because + // whatever you like is always the best. + DoAThing() } -// The jsii proxy for IFriendlier -type jsiiProxy_IFriendlier struct { - internal.Type__scopejsiicalclibIFriendly +// The jsii proxy struct for Old +type jsiiProxy_Old struct { + _ byte // padding } -func (i *jsiiProxy_IFriendlier) Farewell() *string { - var returns *string +// Deprecated: Use the new class or the old class whatever you want because +// whatever you like is always the best. +func NewOld() Old { + _init_.Initialize() - _jsii_.Invoke( - i, - "farewell", + j := jsiiProxy_Old{} + + _jsii_.Create( + "jsii-calc.Old", nil, // no parameters - &returns, + &j, ) - return returns + return &j } -func (i *jsiiProxy_IFriendlier) Goodbye() *string { - var returns *string +// Deprecated: Use the new class or the old class whatever you want because +// whatever you like is always the best. +func NewOld_Override(o Old) { + _init_.Initialize() - _jsii_.Invoke( - i, - "goodbye", + _jsii_.Create( + "jsii-calc.Old", nil, // no parameters - &returns, + o, ) +} - return returns +func (o *jsiiProxy_Old) DoAThing() { + _jsii_.InvokeVoid( + o, + "doAThing", + nil, // no parameters + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IFriendlyRandomGenerator.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/OptionalArgumentInvoker.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type IFriendlyRandomGenerator interface { - scopejsiicalclib.IFriendly - IRandomNumberGenerator +type OptionalArgumentInvoker interface { + InvokeWithOptional() + InvokeWithoutOptional() } -// The jsii proxy for IFriendlyRandomGenerator -type jsiiProxy_IFriendlyRandomGenerator struct { - internal.Type__scopejsiicalclibIFriendly - jsiiProxy_IRandomNumberGenerator +// The jsii proxy struct for OptionalArgumentInvoker +type jsiiProxy_OptionalArgumentInvoker struct { + _ byte // padding } -func (i *jsiiProxy_IFriendlyRandomGenerator) Hello() *string { - var returns *string +func NewOptionalArgumentInvoker(delegate IInterfaceWithOptionalMethodArguments) OptionalArgumentInvoker { + _init_.Initialize() - _jsii_.Invoke( - i, - "hello", - nil, // no parameters - &returns, + j := jsiiProxy_OptionalArgumentInvoker{} + + _jsii_.Create( + "jsii-calc.OptionalArgumentInvoker", + []interface{}{delegate}, + &j, ) - return returns + return &j } -func (i *jsiiProxy_IFriendlyRandomGenerator) Next() *float64 { - var returns *float64 +func NewOptionalArgumentInvoker_Override(o OptionalArgumentInvoker, delegate IInterfaceWithOptionalMethodArguments) { + _init_.Initialize() - _jsii_.Invoke( - i, - "next", + _jsii_.Create( + "jsii-calc.OptionalArgumentInvoker", + []interface{}{delegate}, + o, + ) +} + +func (o *jsiiProxy_OptionalArgumentInvoker) InvokeWithOptional() { + _jsii_.InvokeVoid( + o, + "invokeWithOptional", nil, // no parameters - &returns, ) +} - return returns +func (o *jsiiProxy_OptionalArgumentInvoker) InvokeWithoutOptional() { + _jsii_.InvokeVoid( + o, + "invokeWithoutOptional", + nil, // no parameters + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IIndirectlyImplemented.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/OptionalConstructorArgument.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( + "time" + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type IIndirectlyImplemented interface { - Method() *float64 - Property() *string +type OptionalConstructorArgument interface { + Arg1() *float64 + Arg2() *string + Arg3() *time.Time } -// The jsii proxy for IIndirectlyImplemented -type jsiiProxy_IIndirectlyImplemented struct { +// The jsii proxy struct for OptionalConstructorArgument +type jsiiProxy_OptionalConstructorArgument struct { _ byte // padding } -func (i *jsiiProxy_IIndirectlyImplemented) Method() *float64 { +func (j *jsiiProxy_OptionalConstructorArgument) Arg1() *float64 { var returns *float64 - - _jsii_.Invoke( - i, - "method", - nil, // no parameters + _jsii_.Get( + j, + "arg1", &returns, ) - return returns } -func (j *jsiiProxy_IIndirectlyImplemented) Property() *string { +func (j *jsiiProxy_OptionalConstructorArgument) Arg2() *string { var returns *string _jsii_.Get( j, - "property", + "arg2", &returns, ) return returns } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceImplementedByAbstractClass.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -// awslabs/jsii#220 Abstract return type. -type IInterfaceImplementedByAbstractClass interface { - PropFromInterface() *string -} - -// The jsii proxy for IInterfaceImplementedByAbstractClass -type jsiiProxy_IInterfaceImplementedByAbstractClass struct { - _ byte // padding -} - -func (j *jsiiProxy_IInterfaceImplementedByAbstractClass) PropFromInterface() *string { - var returns *string +func (j *jsiiProxy_OptionalConstructorArgument) Arg3() *time.Time { + var returns *time.Time _jsii_.Get( j, - "propFromInterface", + "arg3", &returns, ) return returns } -`; +func NewOptionalConstructorArgument(arg1 *float64, arg2 *string, arg3 *time.Time) OptionalConstructorArgument { + _init_.Initialize() -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceThatShouldNotBeADataType.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + j := jsiiProxy_OptionalConstructorArgument{} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) + _jsii_.Create( + "jsii-calc.OptionalConstructorArgument", + []interface{}{arg1, arg2, arg3}, + &j, + ) -// Even though this interface has only properties, it is disqualified from being a datatype because it inherits from an interface that is not a datatype. -type IInterfaceThatShouldNotBeADataType interface { - IInterfaceWithMethods - OtherValue() *string + return &j } -// The jsii proxy for IInterfaceThatShouldNotBeADataType -type jsiiProxy_IInterfaceThatShouldNotBeADataType struct { - jsiiProxy_IInterfaceWithMethods -} +func NewOptionalConstructorArgument_Override(o OptionalConstructorArgument, arg1 *float64, arg2 *string, arg3 *time.Time) { + _init_.Initialize() -func (j *jsiiProxy_IInterfaceThatShouldNotBeADataType) OtherValue() *string { - var returns *string - _jsii_.Get( - j, - "otherValue", - &returns, + _jsii_.Create( + "jsii-calc.OptionalConstructorArgument", + []interface{}{arg1, arg2, arg3}, + o, ) - return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceWithInternal.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/OptionalStruct.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -type IInterfaceWithInternal interface { - Visible() -} - -// The jsii proxy for IInterfaceWithInternal -type jsiiProxy_IInterfaceWithInternal struct { - _ byte // padding -} -func (i *jsiiProxy_IInterfaceWithInternal) Visible() { - _jsii_.InvokeVoid( - i, - "visible", - nil, // no parameters - ) +type OptionalStruct struct { + Field *string \`field:"optional" json:"field" yaml:"field"\` } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceWithMethods.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/OptionalStructConsumer.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type IInterfaceWithMethods interface { - DoThings() - Value() *string +type OptionalStructConsumer interface { + FieldValue() *string + ParameterWasUndefined() *bool } -// The jsii proxy for IInterfaceWithMethods -type jsiiProxy_IInterfaceWithMethods struct { +// The jsii proxy struct for OptionalStructConsumer +type jsiiProxy_OptionalStructConsumer struct { _ byte // padding } -func (i *jsiiProxy_IInterfaceWithMethods) DoThings() { - _jsii_.InvokeVoid( - i, - "doThings", - nil, // no parameters +func (j *jsiiProxy_OptionalStructConsumer) FieldValue() *string { + var returns *string + _jsii_.Get( + j, + "fieldValue", + &returns, ) + return returns } -func (j *jsiiProxy_IInterfaceWithMethods) Value() *string { - var returns *string +func (j *jsiiProxy_OptionalStructConsumer) ParameterWasUndefined() *bool { + var returns *bool _jsii_.Get( j, - "value", + "parameterWasUndefined", &returns, ) return returns } -`; +func NewOptionalStructConsumer(optionalStruct *OptionalStruct) OptionalStructConsumer { + _init_.Initialize() -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceWithOptionalMethodArguments.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + j := jsiiProxy_OptionalStructConsumer{} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) + _jsii_.Create( + "jsii-calc.OptionalStructConsumer", + []interface{}{optionalStruct}, + &j, + ) -// awslabs/jsii#175 Interface proxies (and builders) do not respect optional arguments in methods. -type IInterfaceWithOptionalMethodArguments interface { - Hello(arg1 *string, arg2 *float64) + return &j } -// The jsii proxy for IInterfaceWithOptionalMethodArguments -type jsiiProxy_IInterfaceWithOptionalMethodArguments struct { - _ byte // padding -} +func NewOptionalStructConsumer_Override(o OptionalStructConsumer, optionalStruct *OptionalStruct) { + _init_.Initialize() -func (i *jsiiProxy_IInterfaceWithOptionalMethodArguments) Hello(arg1 *string, arg2 *float64) { - _jsii_.InvokeVoid( - i, - "hello", - []interface{}{arg1, arg2}, + _jsii_.Create( + "jsii-calc.OptionalStructConsumer", + []interface{}{optionalStruct}, + o, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceWithProperties.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/OverridableProtectedMember.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type IInterfaceWithProperties interface { - ReadOnlyString() *string - ReadWriteString() *string - SetReadWriteString(r *string) +// See: https://github.com/aws/jsii/issues/903 +// +type OverridableProtectedMember interface { + OverrideReadOnly() *string + OverrideReadWrite() *string + SetOverrideReadWrite(val *string) + OverrideMe() *string + SwitchModes() + ValueFromProtected() *string } -// The jsii proxy for IInterfaceWithProperties -type jsiiProxy_IInterfaceWithProperties struct { +// The jsii proxy struct for OverridableProtectedMember +type jsiiProxy_OverridableProtectedMember struct { _ byte // padding } -func (j *jsiiProxy_IInterfaceWithProperties) ReadOnlyString() *string { +func (j *jsiiProxy_OverridableProtectedMember) OverrideReadOnly() *string { var returns *string _jsii_.Get( j, - "readOnlyString", + "overrideReadOnly", &returns, ) return returns } -func (j *jsiiProxy_IInterfaceWithProperties) ReadWriteString() *string { +func (j *jsiiProxy_OverridableProtectedMember) OverrideReadWrite() *string { var returns *string _jsii_.Get( j, - "readWriteString", + "overrideReadWrite", &returns, ) return returns } -func (j *jsiiProxy_IInterfaceWithProperties)SetReadWriteString(val *string) { - _jsii_.Set( - j, - "readWriteString", - val, - ) -} - -`; +func NewOverridableProtectedMember() OverridableProtectedMember { + _init_.Initialize() -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceWithPropertiesExtension.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + j := jsiiProxy_OverridableProtectedMember{} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) + _jsii_.Create( + "jsii-calc.OverridableProtectedMember", + nil, // no parameters + &j, + ) -type IInterfaceWithPropertiesExtension interface { - IInterfaceWithProperties - Foo() *float64 - SetFoo(f *float64) + return &j } -// The jsii proxy for IInterfaceWithPropertiesExtension -type jsiiProxy_IInterfaceWithPropertiesExtension struct { - jsiiProxy_IInterfaceWithProperties +func NewOverridableProtectedMember_Override(o OverridableProtectedMember) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.OverridableProtectedMember", + nil, // no parameters + o, + ) } -func (j *jsiiProxy_IInterfaceWithPropertiesExtension) Foo() *float64 { - var returns *float64 - _jsii_.Get( +func (j *jsiiProxy_OverridableProtectedMember)SetOverrideReadWrite(val *string) { + _jsii_.Set( j, - "foo", + "overrideReadWrite", + val, + ) +} + +func (o *jsiiProxy_OverridableProtectedMember) OverrideMe() *string { + var returns *string + + _jsii_.Invoke( + o, + "overrideMe", + nil, // no parameters &returns, ) + return returns } -func (j *jsiiProxy_IInterfaceWithPropertiesExtension)SetFoo(val *float64) { - _jsii_.Set( - j, - "foo", - val, +func (o *jsiiProxy_OverridableProtectedMember) SwitchModes() { + _jsii_.InvokeVoid( + o, + "switchModes", + nil, // no parameters + ) +} + +func (o *jsiiProxy_OverridableProtectedMember) ValueFromProtected() *string { + var returns *string + + _jsii_.Invoke( + o, + "valueFromProtected", + nil, // no parameters + &returns, ) + + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IJSII417Derived.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/OverrideReturnsObject.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type IJSII417Derived interface { - IJSII417PublicBaseOfBase - Bar() - Baz() - Property() *string +type OverrideReturnsObject interface { + Test(obj IReturnsNumber) *float64 } -// The jsii proxy for IJSII417Derived -type jsiiProxy_IJSII417Derived struct { - jsiiProxy_IJSII417PublicBaseOfBase +// The jsii proxy struct for OverrideReturnsObject +type jsiiProxy_OverrideReturnsObject struct { + _ byte // padding } -func (i *jsiiProxy_IJSII417Derived) Bar() { - _jsii_.InvokeVoid( - i, - "bar", +func NewOverrideReturnsObject() OverrideReturnsObject { + _init_.Initialize() + + j := jsiiProxy_OverrideReturnsObject{} + + _jsii_.Create( + "jsii-calc.OverrideReturnsObject", nil, // no parameters + &j, ) + + return &j } -func (i *jsiiProxy_IJSII417Derived) Baz() { - _jsii_.InvokeVoid( - i, - "baz", +func NewOverrideReturnsObject_Override(o OverrideReturnsObject) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.OverrideReturnsObject", nil, // no parameters + o, ) } -func (j *jsiiProxy_IJSII417Derived) Property() *string { - var returns *string - _jsii_.Get( - j, - "property", +func (o *jsiiProxy_OverrideReturnsObject) Test(obj IReturnsNumber) *float64 { + var returns *float64 + + _jsii_.Invoke( + o, + "test", + []interface{}{obj}, &returns, ) + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IJSII417PublicBaseOfBase.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/ParamShadowsBuiltins.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type IJSII417PublicBaseOfBase interface { - Foo() - HasRoot() *bool +// Validate that parameters named "str" or "builtins" do not shadow the actual type names in Python. +type ParamShadowsBuiltins interface { } -// The jsii proxy for IJSII417PublicBaseOfBase -type jsiiProxy_IJSII417PublicBaseOfBase struct { +// The jsii proxy struct for ParamShadowsBuiltins +type jsiiProxy_ParamShadowsBuiltins struct { _ byte // padding } -func (i *jsiiProxy_IJSII417PublicBaseOfBase) Foo() { - _jsii_.InvokeVoid( - i, - "foo", - nil, // no parameters +func NewParamShadowsBuiltins(builtins *string, str *string, props *ParamShadowsBuiltinsProps) ParamShadowsBuiltins { + _init_.Initialize() + + j := jsiiProxy_ParamShadowsBuiltins{} + + _jsii_.Create( + "jsii-calc.ParamShadowsBuiltins", + []interface{}{builtins, str, props}, + &j, ) + + return &j } -func (j *jsiiProxy_IJSII417PublicBaseOfBase) HasRoot() *bool { - var returns *bool - _jsii_.Get( - j, - "hasRoot", - &returns, +func NewParamShadowsBuiltins_Override(p ParamShadowsBuiltins, builtins *string, str *string, props *ParamShadowsBuiltinsProps) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ParamShadowsBuiltins", + []interface{}{builtins, str, props}, + p, ) - return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IJavaReservedWordsInAnInterface.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/ParamShadowsBuiltinsProps.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type ParamShadowsBuiltinsProps struct { + BooleanProperty *bool \`field:"required" json:"booleanProperty" yaml:"booleanProperty"\` + StringProperty *string \`field:"required" json:"stringProperty" yaml:"stringProperty"\` + StructProperty *StructA \`field:"required" json:"structProperty" yaml:"structProperty"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ParamShadowsScope.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -type IJavaReservedWordsInAnInterface interface { - Abstract() - Assert() - Boolean() - Break() - Byte() - Case() - Catch() - Char() - Class() - Const() - Continue() - Default() - Do() - Double() - Else() - Enum() - Extends() - False() - Final() - Finally() - Float() - For() - Goto() - If() - Implements() - Import() - Instanceof() - Int() - Interface() - Long() - Native() - Null() - Package() - Private() - Protected() - Public() - Return() - Short() - Static() - Strictfp() - Super() - Switch() - Synchronized() - This() - Throw() - Throws() - Transient() - True() - Try() - Void() - Volatile() - While() *string +// Validate that namespaces being shadowed by local variables does not cause type checking issues. +// See: https://github.com/aws/aws-cdk/issues/22975 +// +type ParamShadowsScope interface { + UseScope(scope scopejsiicalclib.Number) scopejsiicalclib.Number } -// The jsii proxy for IJavaReservedWordsInAnInterface -type jsiiProxy_IJavaReservedWordsInAnInterface struct { +// The jsii proxy struct for ParamShadowsScope +type jsiiProxy_ParamShadowsScope struct { _ byte // padding } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Abstract() { - _jsii_.InvokeVoid( - i, - "abstract", - nil, // no parameters - ) -} +func NewParamShadowsScope() ParamShadowsScope { + _init_.Initialize() -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Assert() { - _jsii_.InvokeVoid( - i, - "assert", - nil, // no parameters - ) -} + j := jsiiProxy_ParamShadowsScope{} -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Boolean() { - _jsii_.InvokeVoid( - i, - "boolean", + _jsii_.Create( + "jsii-calc.ParamShadowsScope", nil, // no parameters + &j, ) -} -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Break() { - _jsii_.InvokeVoid( - i, - "break", - nil, // no parameters - ) + return &j } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Byte() { - _jsii_.InvokeVoid( - i, - "byte", - nil, // no parameters - ) -} +func NewParamShadowsScope_Override(p ParamShadowsScope) { + _init_.Initialize() -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Case() { - _jsii_.InvokeVoid( - i, - "case", + _jsii_.Create( + "jsii-calc.ParamShadowsScope", nil, // no parameters + p, ) } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Catch() { - _jsii_.InvokeVoid( - i, - "catch", - nil, // no parameters - ) -} +func (p *jsiiProxy_ParamShadowsScope) UseScope(scope scopejsiicalclib.Number) scopejsiicalclib.Number { + var returns scopejsiicalclib.Number -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Char() { - _jsii_.InvokeVoid( - i, - "char", - nil, // no parameters + _jsii_.Invoke( + p, + "useScope", + []interface{}{scope}, + &returns, ) -} -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Class() { - _jsii_.InvokeVoid( - i, - "class", - nil, // no parameters - ) + return returns } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Const() { - _jsii_.InvokeVoid( - i, - "const", - nil, // no parameters - ) -} -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Continue() { - _jsii_.InvokeVoid( - i, - "continue", - nil, // no parameters - ) -} +`; -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Default() { - _jsii_.InvokeVoid( - i, - "default", - nil, // no parameters - ) -} +exports[`Generated code for "jsii-calc": /go/jsiicalc/ParentStruct982.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Do() { - _jsii_.InvokeVoid( - i, - "do", - nil, // no parameters - ) -} -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Double() { - _jsii_.InvokeVoid( - i, - "double", - nil, // no parameters - ) +// https://github.com/aws/jsii/issues/982. +type ParentStruct982 struct { + Foo *string \`field:"required" json:"foo" yaml:"foo"\` } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Else() { - _jsii_.InvokeVoid( - i, - "else", - nil, // no parameters - ) -} -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Enum() { - _jsii_.InvokeVoid( - i, - "enum", - nil, // no parameters - ) -} +`; -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Extends() { - _jsii_.InvokeVoid( - i, - "extends", - nil, // no parameters - ) -} +exports[`Generated code for "jsii-calc": /go/jsiicalc/PartiallyInitializedThisConsumer.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) False() { - _jsii_.InvokeVoid( - i, - "false", - nil, // no parameters - ) -} +import ( + "time" -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Final() { - _jsii_.InvokeVoid( - i, - "final", - nil, // no parameters - ) -} + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Finally() { - _jsii_.InvokeVoid( - i, - "finally", - nil, // no parameters - ) +type PartiallyInitializedThisConsumer interface { + ConsumePartiallyInitializedThis(obj ConstructorPassesThisOut, dt *time.Time, ev AllTypesEnum) *string } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Float() { - _jsii_.InvokeVoid( - i, - "float", - nil, // no parameters - ) +// The jsii proxy struct for PartiallyInitializedThisConsumer +type jsiiProxy_PartiallyInitializedThisConsumer struct { + _ byte // padding } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) For() { - _jsii_.InvokeVoid( - i, - "for", - nil, // no parameters - ) -} +func NewPartiallyInitializedThisConsumer_Override(p PartiallyInitializedThisConsumer) { + _init_.Initialize() -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Goto() { - _jsii_.InvokeVoid( - i, - "goto", + _jsii_.Create( + "jsii-calc.PartiallyInitializedThisConsumer", nil, // no parameters + p, ) } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) If() { - _jsii_.InvokeVoid( - i, - "if", - nil, // no parameters - ) -} +func (p *jsiiProxy_PartiallyInitializedThisConsumer) ConsumePartiallyInitializedThis(obj ConstructorPassesThisOut, dt *time.Time, ev AllTypesEnum) *string { + var returns *string -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Implements() { - _jsii_.InvokeVoid( - i, - "implements", - nil, // no parameters + _jsii_.Invoke( + p, + "consumePartiallyInitializedThis", + []interface{}{obj, dt, ev}, + &returns, ) -} -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Import() { - _jsii_.InvokeVoid( - i, - "import", - nil, // no parameters - ) + return returns } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Instanceof() { - _jsii_.InvokeVoid( - i, - "instanceof", - nil, // no parameters - ) -} -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Int() { - _jsii_.InvokeVoid( - i, - "int", - nil, // no parameters - ) -} +`; -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Interface() { - _jsii_.InvokeVoid( - i, - "interface", - nil, // no parameters - ) -} +exports[`Generated code for "jsii-calc": /go/jsiicalc/Polymorphism.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Long() { - _jsii_.InvokeVoid( - i, - "long", - nil, // no parameters - ) -} +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Native() { - _jsii_.InvokeVoid( - i, - "native", - nil, // no parameters - ) -} + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Null() { - _jsii_.InvokeVoid( - i, - "null", - nil, // no parameters - ) +type Polymorphism interface { + SayHello(friendly scopejsiicalclib.IFriendly) *string } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Package() { - _jsii_.InvokeVoid( - i, - "package", - nil, // no parameters - ) +// The jsii proxy struct for Polymorphism +type jsiiProxy_Polymorphism struct { + _ byte // padding } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Private() { - _jsii_.InvokeVoid( - i, - "private", - nil, // no parameters - ) -} +func NewPolymorphism() Polymorphism { + _init_.Initialize() -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Protected() { - _jsii_.InvokeVoid( - i, - "protected", + j := jsiiProxy_Polymorphism{} + + _jsii_.Create( + "jsii-calc.Polymorphism", nil, // no parameters + &j, ) + + return &j } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Public() { - _jsii_.InvokeVoid( - i, - "public", +func NewPolymorphism_Override(p Polymorphism) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.Polymorphism", nil, // no parameters + p, ) } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Return() { - _jsii_.InvokeVoid( - i, - "return", - nil, // no parameters +func (p *jsiiProxy_Polymorphism) SayHello(friendly scopejsiicalclib.IFriendly) *string { + var returns *string + + _jsii_.Invoke( + p, + "sayHello", + []interface{}{friendly}, + &returns, ) + + return returns } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Short() { - _jsii_.InvokeVoid( - i, - "short", - nil, // no parameters - ) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/Power.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + +// The power operation. +type Power interface { + composition.CompositeOperation + // The base of the power. + Base() scopejsiicalclib.NumericValue + // A set of postfixes to include in a decorated .toString(). + DecorationPostfixes() *[]*string + SetDecorationPostfixes(val *[]*string) + // A set of prefixes to include in a decorated .toString(). + DecorationPrefixes() *[]*string + SetDecorationPrefixes(val *[]*string) + // The expression that this operation consists of. + // + // Must be implemented by derived classes. + Expression() scopejsiicalclib.NumericValue + // The number of times to multiply. + Pow() scopejsiicalclib.NumericValue + // The .toString() style. + StringStyle() composition.CompositeOperation_CompositionStringStyle + SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) + // The value. + Value() *float64 + // String representation of the value. + ToString() *string + // Returns: the name of the class (to verify native type names are created for derived classes). + TypeName() interface{} } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Static() { - _jsii_.InvokeVoid( - i, - "static", - nil, // no parameters - ) +// The jsii proxy struct for Power +type jsiiProxy_Power struct { + internal.Type__compositionCompositeOperation } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Strictfp() { - _jsii_.InvokeVoid( - i, - "strictfp", - nil, // no parameters +func (j *jsiiProxy_Power) Base() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue + _jsii_.Get( + j, + "base", + &returns, ) + return returns } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Super() { - _jsii_.InvokeVoid( - i, - "super", - nil, // no parameters +func (j *jsiiProxy_Power) DecorationPostfixes() *[]*string { + var returns *[]*string + _jsii_.Get( + j, + "decorationPostfixes", + &returns, ) + return returns } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Switch() { - _jsii_.InvokeVoid( - i, - "switch", - nil, // no parameters +func (j *jsiiProxy_Power) DecorationPrefixes() *[]*string { + var returns *[]*string + _jsii_.Get( + j, + "decorationPrefixes", + &returns, ) + return returns } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Synchronized() { - _jsii_.InvokeVoid( - i, - "synchronized", - nil, // no parameters +func (j *jsiiProxy_Power) Expression() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue + _jsii_.Get( + j, + "expression", + &returns, ) + return returns } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) This() { - _jsii_.InvokeVoid( - i, - "this", - nil, // no parameters +func (j *jsiiProxy_Power) Pow() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue + _jsii_.Get( + j, + "pow", + &returns, ) + return returns } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Throw() { - _jsii_.InvokeVoid( - i, - "throw", - nil, // no parameters +func (j *jsiiProxy_Power) StringStyle() composition.CompositeOperation_CompositionStringStyle { + var returns composition.CompositeOperation_CompositionStringStyle + _jsii_.Get( + j, + "stringStyle", + &returns, ) + return returns } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Throws() { - _jsii_.InvokeVoid( - i, - "throws", - nil, // no parameters +func (j *jsiiProxy_Power) Value() *float64 { + var returns *float64 + _jsii_.Get( + j, + "value", + &returns, ) + return returns } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Transient() { - _jsii_.InvokeVoid( - i, - "transient", - nil, // no parameters + +// Creates a Power operation. +func NewPower(base scopejsiicalclib.NumericValue, pow scopejsiicalclib.NumericValue) Power { + _init_.Initialize() + + j := jsiiProxy_Power{} + + _jsii_.Create( + "jsii-calc.Power", + []interface{}{base, pow}, + &j, ) + + return &j } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) True() { - _jsii_.InvokeVoid( - i, - "true", - nil, // no parameters +// Creates a Power operation. +func NewPower_Override(p Power, base scopejsiicalclib.NumericValue, pow scopejsiicalclib.NumericValue) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.Power", + []interface{}{base, pow}, + p, ) } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Try() { - _jsii_.InvokeVoid( - i, - "try", - nil, // no parameters +func (j *jsiiProxy_Power)SetDecorationPostfixes(val *[]*string) { + _jsii_.Set( + j, + "decorationPostfixes", + val, ) } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Void() { - _jsii_.InvokeVoid( - i, - "void", - nil, // no parameters +func (j *jsiiProxy_Power)SetDecorationPrefixes(val *[]*string) { + _jsii_.Set( + j, + "decorationPrefixes", + val, ) } -func (i *jsiiProxy_IJavaReservedWordsInAnInterface) Volatile() { - _jsii_.InvokeVoid( - i, - "volatile", - nil, // no parameters +func (j *jsiiProxy_Power)SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) { + _jsii_.Set( + j, + "stringStyle", + val, ) } -func (j *jsiiProxy_IJavaReservedWordsInAnInterface) While() *string { +func (p *jsiiProxy_Power) ToString() *string { var returns *string - _jsii_.Get( - j, - "while", + + _jsii_.Invoke( + p, + "toString", + nil, // no parameters &returns, ) + return returns } +func (p *jsiiProxy_Power) TypeName() interface{} { + var returns interface{} -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IJsii487External.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type IJsii487External interface { -} + _jsii_.Invoke( + p, + "typeName", + nil, // no parameters + &returns, + ) -// The jsii proxy for IJsii487External -type jsiiProxy_IJsii487External struct { - _ byte // padding + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IJsii487External2.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/PromiseNothing.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) -type IJsii487External2 interface { +type PromiseNothing interface { + InstancePromiseIt() } -// The jsii proxy for IJsii487External2 -type jsiiProxy_IJsii487External2 struct { +// The jsii proxy struct for PromiseNothing +type jsiiProxy_PromiseNothing struct { _ byte // padding } +func NewPromiseNothing() PromiseNothing { + _init_.Initialize() -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IJsii496.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - + j := jsiiProxy_PromiseNothing{} -type IJsii496 interface { -} + _jsii_.Create( + "jsii-calc.PromiseNothing", + nil, // no parameters + &j, + ) -// The jsii proxy for IJsii496 -type jsiiProxy_IJsii496 struct { - _ byte // padding + return &j } +func NewPromiseNothing_Override(p PromiseNothing) { + _init_.Initialize() -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IMutableObjectLiteral.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -type IMutableObjectLiteral interface { - Value() *string - SetValue(v *string) + _jsii_.Create( + "jsii-calc.PromiseNothing", + nil, // no parameters + p, + ) } -// The jsii proxy for IMutableObjectLiteral -type jsiiProxy_IMutableObjectLiteral struct { - _ byte // padding -} +func PromiseNothing_PromiseIt() { + _init_.Initialize() -func (j *jsiiProxy_IMutableObjectLiteral) Value() *string { - var returns *string - _jsii_.Get( - j, - "value", - &returns, + _jsii_.StaticInvokeVoid( + "jsii-calc.PromiseNothing", + "promiseIt", + nil, // no parameters ) - return returns } -func (j *jsiiProxy_IMutableObjectLiteral)SetValue(val *string) { - _jsii_.Set( - j, - "value", - val, +func (p *jsiiProxy_PromiseNothing) InstancePromiseIt() { + _jsii_.InvokeVoid( + p, + "instancePromiseIt", + nil, // no parameters ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_INonInternalInterface.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/PropertyNamedProperty.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type INonInternalInterface interface { - IAnotherPublicInterface - B() *string - SetB(b *string) - C() *string - SetC(c *string) +// Reproduction for https://github.com/aws/jsii/issues/1113 Where a method or property named "property" would result in impossible to load Python code. +type PropertyNamedProperty interface { + Property() *string + YetAnoterOne() *bool } -// The jsii proxy for INonInternalInterface -type jsiiProxy_INonInternalInterface struct { - jsiiProxy_IAnotherPublicInterface +// The jsii proxy struct for PropertyNamedProperty +type jsiiProxy_PropertyNamedProperty struct { + _ byte // padding } -func (j *jsiiProxy_INonInternalInterface) B() *string { +func (j *jsiiProxy_PropertyNamedProperty) Property() *string { var returns *string _jsii_.Get( j, - "b", + "property", &returns, ) return returns } -func (j *jsiiProxy_INonInternalInterface)SetB(val *string) { - _jsii_.Set( - j, - "b", - val, - ) -} - -func (j *jsiiProxy_INonInternalInterface) C() *string { - var returns *string +func (j *jsiiProxy_PropertyNamedProperty) YetAnoterOne() *bool { + var returns *bool _jsii_.Get( j, - "c", + "yetAnoterOne", &returns, ) return returns } -func (j *jsiiProxy_INonInternalInterface)SetC(val *string) { - _jsii_.Set( - j, - "c", - val, + +func NewPropertyNamedProperty() PropertyNamedProperty { + _init_.Initialize() + + j := jsiiProxy_PropertyNamedProperty{} + + _jsii_.Create( + "jsii-calc.PropertyNamedProperty", + nil, // no parameters + &j, + ) + + return &j +} + +func NewPropertyNamedProperty_Override(p PropertyNamedProperty) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.PropertyNamedProperty", + nil, // no parameters + p, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IObjectWithProperty.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/PublicClass.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Make sure that setters are properly called on objects with interfaces. -type IObjectWithProperty interface { - WasSet() *bool - Property() *string - SetProperty(p *string) +type PublicClass interface { + Hello() } -// The jsii proxy for IObjectWithProperty -type jsiiProxy_IObjectWithProperty struct { +// The jsii proxy struct for PublicClass +type jsiiProxy_PublicClass struct { _ byte // padding } -func (i *jsiiProxy_IObjectWithProperty) WasSet() *bool { - var returns *bool +func NewPublicClass() PublicClass { + _init_.Initialize() - _jsii_.Invoke( - i, - "wasSet", + j := jsiiProxy_PublicClass{} + + _jsii_.Create( + "jsii-calc.PublicClass", nil, // no parameters - &returns, + &j, ) - return returns + return &j } -func (j *jsiiProxy_IObjectWithProperty) Property() *string { - var returns *string - _jsii_.Get( - j, - "property", - &returns, +func NewPublicClass_Override(p PublicClass) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.PublicClass", + nil, // no parameters + p, ) - return returns } -func (j *jsiiProxy_IObjectWithProperty)SetProperty(val *string) { - _jsii_.Set( - j, - "property", - val, +func (p *jsiiProxy_PublicClass) Hello() { + _jsii_.InvokeVoid( + p, + "hello", + nil, // no parameters ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IOptionalMethod.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/PythonReservedWords.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Checks that optional result from interface method code generates correctly. -type IOptionalMethod interface { - Optional() *string +type PythonReservedWords interface { + And() + As() + Assert() + Async() + Await() + Break() + Class() + Continue() + Def() + Del() + Elif() + Else() + Except() + Finally() + For() + From() + Global() + If() + Import() + In() + Is() + Lambda() + Nonlocal() + Not() + Or() + Pass() + Raise() + Return() + Try() + While() + With() + Yield() } -// The jsii proxy for IOptionalMethod -type jsiiProxy_IOptionalMethod struct { +// The jsii proxy struct for PythonReservedWords +type jsiiProxy_PythonReservedWords struct { _ byte // padding } -func (i *jsiiProxy_IOptionalMethod) Optional() *string { - var returns *string +func NewPythonReservedWords() PythonReservedWords { + _init_.Initialize() - _jsii_.Invoke( - i, - "optional", + j := jsiiProxy_PythonReservedWords{} + + _jsii_.Create( + "jsii-calc.PythonReservedWords", nil, // no parameters - &returns, + &j, ) - return returns + return &j } +func NewPythonReservedWords_Override(p PythonReservedWords) { + _init_.Initialize() -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IPrivatelyImplemented.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + _jsii_.Create( + "jsii-calc.PythonReservedWords", + nil, // no parameters + p, + ) +} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) +func (p *jsiiProxy_PythonReservedWords) And() { + _jsii_.InvokeVoid( + p, + "and", + nil, // no parameters + ) +} -type IPrivatelyImplemented interface { - Success() *bool +func (p *jsiiProxy_PythonReservedWords) As() { + _jsii_.InvokeVoid( + p, + "as", + nil, // no parameters + ) } -// The jsii proxy for IPrivatelyImplemented -type jsiiProxy_IPrivatelyImplemented struct { - _ byte // padding +func (p *jsiiProxy_PythonReservedWords) Assert() { + _jsii_.InvokeVoid( + p, + "assert", + nil, // no parameters + ) } -func (j *jsiiProxy_IPrivatelyImplemented) Success() *bool { - var returns *bool - _jsii_.Get( - j, - "success", - &returns, +func (p *jsiiProxy_PythonReservedWords) Async() { + _jsii_.InvokeVoid( + p, + "async", + nil, // no parameters ) - return returns } +func (p *jsiiProxy_PythonReservedWords) Await() { + _jsii_.InvokeVoid( + p, + "await", + nil, // no parameters + ) +} -`; +func (p *jsiiProxy_PythonReservedWords) Break() { + _jsii_.InvokeVoid( + p, + "break", + nil, // no parameters + ) +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IPublicInterface.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +func (p *jsiiProxy_PythonReservedWords) Class() { + _jsii_.InvokeVoid( + p, + "class", + nil, // no parameters + ) +} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) +func (p *jsiiProxy_PythonReservedWords) Continue() { + _jsii_.InvokeVoid( + p, + "continue", + nil, // no parameters + ) +} -type IPublicInterface interface { - Bye() *string +func (p *jsiiProxy_PythonReservedWords) Def() { + _jsii_.InvokeVoid( + p, + "def", + nil, // no parameters + ) } -// The jsii proxy for IPublicInterface -type jsiiProxy_IPublicInterface struct { - _ byte // padding +func (p *jsiiProxy_PythonReservedWords) Del() { + _jsii_.InvokeVoid( + p, + "del", + nil, // no parameters + ) } -func (i *jsiiProxy_IPublicInterface) Bye() *string { - var returns *string - - _jsii_.Invoke( - i, - "bye", +func (p *jsiiProxy_PythonReservedWords) Elif() { + _jsii_.InvokeVoid( + p, + "elif", nil, // no parameters - &returns, ) - - return returns } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IPublicInterface2.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -type IPublicInterface2 interface { - Ciao() *string +func (p *jsiiProxy_PythonReservedWords) Else() { + _jsii_.InvokeVoid( + p, + "else", + nil, // no parameters + ) } -// The jsii proxy for IPublicInterface2 -type jsiiProxy_IPublicInterface2 struct { - _ byte // padding +func (p *jsiiProxy_PythonReservedWords) Except() { + _jsii_.InvokeVoid( + p, + "except", + nil, // no parameters + ) } -func (i *jsiiProxy_IPublicInterface2) Ciao() *string { - var returns *string - - _jsii_.Invoke( - i, - "ciao", +func (p *jsiiProxy_PythonReservedWords) Finally() { + _jsii_.InvokeVoid( + p, + "finally", nil, // no parameters - &returns, ) - - return returns } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IRandomNumberGenerator.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -// Generates random numbers. -type IRandomNumberGenerator interface { - // Returns another random number. - // - // Returns: A random number. - Next() *float64 +func (p *jsiiProxy_PythonReservedWords) For() { + _jsii_.InvokeVoid( + p, + "for", + nil, // no parameters + ) } -// The jsii proxy for IRandomNumberGenerator -type jsiiProxy_IRandomNumberGenerator struct { - _ byte // padding +func (p *jsiiProxy_PythonReservedWords) From() { + _jsii_.InvokeVoid( + p, + "from", + nil, // no parameters + ) } -func (i *jsiiProxy_IRandomNumberGenerator) Next() *float64 { - var returns *float64 - - _jsii_.Invoke( - i, - "next", +func (p *jsiiProxy_PythonReservedWords) Global() { + _jsii_.InvokeVoid( + p, + "global", nil, // no parameters - &returns, ) - - return returns } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IReturnJsii976.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -// Returns a subclass of a known class which implements an interface. -type IReturnJsii976 interface { - Foo() *float64 +func (p *jsiiProxy_PythonReservedWords) If() { + _jsii_.InvokeVoid( + p, + "if", + nil, // no parameters + ) } -// The jsii proxy for IReturnJsii976 -type jsiiProxy_IReturnJsii976 struct { - _ byte // padding +func (p *jsiiProxy_PythonReservedWords) Import() { + _jsii_.InvokeVoid( + p, + "import", + nil, // no parameters + ) } -func (j *jsiiProxy_IReturnJsii976) Foo() *float64 { - var returns *float64 - _jsii_.Get( - j, - "foo", - &returns, +func (p *jsiiProxy_PythonReservedWords) In() { + _jsii_.InvokeVoid( + p, + "in", + nil, // no parameters ) - return returns } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IReturnsNumber.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" -) - -type IReturnsNumber interface { - ObtainNumber() scopejsiicalclib.IDoublable - NumberProp() scopejsiicalclib.Number +func (p *jsiiProxy_PythonReservedWords) Is() { + _jsii_.InvokeVoid( + p, + "is", + nil, // no parameters + ) } -// The jsii proxy for IReturnsNumber -type jsiiProxy_IReturnsNumber struct { - _ byte // padding +func (p *jsiiProxy_PythonReservedWords) Lambda() { + _jsii_.InvokeVoid( + p, + "lambda", + nil, // no parameters + ) } -func (i *jsiiProxy_IReturnsNumber) ObtainNumber() scopejsiicalclib.IDoublable { - var returns scopejsiicalclib.IDoublable - - _jsii_.Invoke( - i, - "obtainNumber", +func (p *jsiiProxy_PythonReservedWords) Nonlocal() { + _jsii_.InvokeVoid( + p, + "nonlocal", nil, // no parameters - &returns, ) - - return returns } -func (j *jsiiProxy_IReturnsNumber) NumberProp() scopejsiicalclib.Number { - var returns scopejsiicalclib.Number - _jsii_.Get( - j, - "numberProp", - &returns, +func (p *jsiiProxy_PythonReservedWords) Not() { + _jsii_.InvokeVoid( + p, + "not", + nil, // no parameters ) - return returns } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IStableInterface.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -type IStableInterface interface { - Method() - MutableProperty() *float64 - SetMutableProperty(m *float64) +func (p *jsiiProxy_PythonReservedWords) Or() { + _jsii_.InvokeVoid( + p, + "or", + nil, // no parameters + ) } -// The jsii proxy for IStableInterface -type jsiiProxy_IStableInterface struct { - _ byte // padding +func (p *jsiiProxy_PythonReservedWords) Pass() { + _jsii_.InvokeVoid( + p, + "pass", + nil, // no parameters + ) } -func (i *jsiiProxy_IStableInterface) Method() { +func (p *jsiiProxy_PythonReservedWords) Raise() { _jsii_.InvokeVoid( - i, - "method", + p, + "raise", nil, // no parameters ) } -func (j *jsiiProxy_IStableInterface) MutableProperty() *float64 { - var returns *float64 - _jsii_.Get( - j, - "mutableProperty", - &returns, +func (p *jsiiProxy_PythonReservedWords) Return() { + _jsii_.InvokeVoid( + p, + "return", + nil, // no parameters ) - return returns } -func (j *jsiiProxy_IStableInterface)SetMutableProperty(val *float64) { - _jsii_.Set( - j, - "mutableProperty", - val, +func (p *jsiiProxy_PythonReservedWords) Try() { + _jsii_.InvokeVoid( + p, + "try", + nil, // no parameters ) } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IStructReturningDelegate.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -// Verifies that a "pure" implementation of an interface works correctly. -type IStructReturningDelegate interface { - ReturnStruct() *StructB +func (p *jsiiProxy_PythonReservedWords) While() { + _jsii_.InvokeVoid( + p, + "while", + nil, // no parameters + ) } -// The jsii proxy for IStructReturningDelegate -type jsiiProxy_IStructReturningDelegate struct { - _ byte // padding +func (p *jsiiProxy_PythonReservedWords) With() { + _jsii_.InvokeVoid( + p, + "with", + nil, // no parameters + ) } -func (i *jsiiProxy_IStructReturningDelegate) ReturnStruct() *StructB { - var returns *StructB - - _jsii_.Invoke( - i, - "returnStruct", +func (p *jsiiProxy_PythonReservedWords) Yield() { + _jsii_.InvokeVoid( + p, + "yield", nil, // no parameters - &returns, ) - - return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IWallClock.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +exports[`Generated code for "jsii-calc": /go/jsiicalc/README.md 1`] = ` +# jsii Calculator -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) +This library is used to demonstrate and test the features of JSII -// Implement this interface. -type IWallClock interface { - // Returns the current time, formatted as an ISO-8601 string. - Iso8601Now() *string -} +## How to use running sum API: -// The jsii proxy for IWallClock -type jsiiProxy_IWallClock struct { - _ byte // padding -} +First, create a calculator: -func (i *jsiiProxy_IWallClock) Iso8601Now() *string { - var returns *string +\`\`\`go +calculator := calc.NewCalculator() +\`\`\` - _jsii_.Invoke( - i, - "iso8601Now", - nil, // no parameters - &returns, - ) +Then call some operations: - return returns -} +\`\`\`go +calculator.add(jsii.Number(10)) +\`\`\` + +## Code Samples +\`\`\`go +/* This is totes a magic comment in here, just you wait! */ +foo := "bar" +\`\`\` `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ImplementInternalInterface.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/ReferenceEnumFromScopedPackage.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -type ImplementInternalInterface interface { - Prop() *string - SetProp(val *string) +// See awslabs/jsii#138. +type ReferenceEnumFromScopedPackage interface { + Foo() scopejsiicalclib.EnumFromScopedModule + SetFoo(val scopejsiicalclib.EnumFromScopedModule) + LoadFoo() scopejsiicalclib.EnumFromScopedModule + SaveFoo(value scopejsiicalclib.EnumFromScopedModule) } -// The jsii proxy struct for ImplementInternalInterface -type jsiiProxy_ImplementInternalInterface struct { +// The jsii proxy struct for ReferenceEnumFromScopedPackage +type jsiiProxy_ReferenceEnumFromScopedPackage struct { _ byte // padding } -func (j *jsiiProxy_ImplementInternalInterface) Prop() *string { - var returns *string +func (j *jsiiProxy_ReferenceEnumFromScopedPackage) Foo() scopejsiicalclib.EnumFromScopedModule { + var returns scopejsiicalclib.EnumFromScopedModule _jsii_.Get( j, - "prop", + "foo", &returns, ) return returns } -func NewImplementInternalInterface() ImplementInternalInterface { +func NewReferenceEnumFromScopedPackage() ReferenceEnumFromScopedPackage { _init_.Initialize() - j := jsiiProxy_ImplementInternalInterface{} + j := jsiiProxy_ReferenceEnumFromScopedPackage{} _jsii_.Create( - "jsii-calc.ImplementInternalInterface", + "jsii-calc.ReferenceEnumFromScopedPackage", nil, // no parameters &j, ) @@ -14286,28 +15015,49 @@ func NewImplementInternalInterface() ImplementInternalInterface { return &j } -func NewImplementInternalInterface_Override(i ImplementInternalInterface) { +func NewReferenceEnumFromScopedPackage_Override(r ReferenceEnumFromScopedPackage) { _init_.Initialize() _jsii_.Create( - "jsii-calc.ImplementInternalInterface", + "jsii-calc.ReferenceEnumFromScopedPackage", nil, // no parameters - i, + r, ) } -func (j *jsiiProxy_ImplementInternalInterface)SetProp(val *string) { +func (j *jsiiProxy_ReferenceEnumFromScopedPackage)SetFoo(val scopejsiicalclib.EnumFromScopedModule) { _jsii_.Set( j, - "prop", + "foo", val, ) } +func (r *jsiiProxy_ReferenceEnumFromScopedPackage) LoadFoo() scopejsiicalclib.EnumFromScopedModule { + var returns scopejsiicalclib.EnumFromScopedModule + + _jsii_.Invoke( + r, + "loadFoo", + nil, // no parameters + &returns, + ) + + return returns +} + +func (r *jsiiProxy_ReferenceEnumFromScopedPackage) SaveFoo(value scopejsiicalclib.EnumFromScopedModule) { + _jsii_.InvokeVoid( + r, + "saveFoo", + []interface{}{value}, + ) +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Implementation.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/ReturnsPrivateImplementationOfInterface.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -14316,33 +15066,38 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type Implementation interface { - Value() *float64 +// Helps ensure the JSII kernel & runtime cooperate correctly when an un-exported instance of a class is returned with a declared type that is an exported interface, and the instance inherits from an exported class. +// +// Returns: an instance of an un-exported class that extends \`ExportedBaseClass\`, declared as \`IPrivatelyImplemented\`. +// See: https://github.com/aws/jsii/issues/320 +// +type ReturnsPrivateImplementationOfInterface interface { + PrivateImplementation() IPrivatelyImplemented } -// The jsii proxy struct for Implementation -type jsiiProxy_Implementation struct { +// The jsii proxy struct for ReturnsPrivateImplementationOfInterface +type jsiiProxy_ReturnsPrivateImplementationOfInterface struct { _ byte // padding } -func (j *jsiiProxy_Implementation) Value() *float64 { - var returns *float64 +func (j *jsiiProxy_ReturnsPrivateImplementationOfInterface) PrivateImplementation() IPrivatelyImplemented { + var returns IPrivatelyImplemented _jsii_.Get( j, - "value", + "privateImplementation", &returns, ) return returns } -func NewImplementation() Implementation { +func NewReturnsPrivateImplementationOfInterface() ReturnsPrivateImplementationOfInterface { _init_.Initialize() - j := jsiiProxy_Implementation{} + j := jsiiProxy_ReturnsPrivateImplementationOfInterface{} _jsii_.Create( - "jsii-calc.Implementation", + "jsii-calc.ReturnsPrivateImplementationOfInterface", nil, // no parameters &j, ) @@ -14350,74 +15105,38 @@ func NewImplementation() Implementation { return &j } -func NewImplementation_Override(i Implementation) { +func NewReturnsPrivateImplementationOfInterface_Override(r ReturnsPrivateImplementationOfInterface) { _init_.Initialize() _jsii_.Create( - "jsii-calc.Implementation", + "jsii-calc.ReturnsPrivateImplementationOfInterface", nil, // no parameters - i, + r, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ImplementsInterfaceWithInternal.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/RootStruct.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type ImplementsInterfaceWithInternal interface { - IInterfaceWithInternal - Visible() -} - -// The jsii proxy struct for ImplementsInterfaceWithInternal -type jsiiProxy_ImplementsInterfaceWithInternal struct { - jsiiProxy_IInterfaceWithInternal -} - -func NewImplementsInterfaceWithInternal() ImplementsInterfaceWithInternal { - _init_.Initialize() - - j := jsiiProxy_ImplementsInterfaceWithInternal{} - - _jsii_.Create( - "jsii-calc.ImplementsInterfaceWithInternal", - nil, // no parameters - &j, - ) - - return &j -} - -func NewImplementsInterfaceWithInternal_Override(i ImplementsInterfaceWithInternal) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.ImplementsInterfaceWithInternal", - nil, // no parameters - i, - ) -} -func (i *jsiiProxy_ImplementsInterfaceWithInternal) Visible() { - _jsii_.InvokeVoid( - i, - "visible", - nil, // no parameters - ) +// This is here to check that we can pass a nested struct into a kwargs by specifying it as an in-line dictionary. +// +// This is cheating with the (current) declared types, but this is the "more +// idiomatic" way for Pythonists. +type RootStruct struct { + // May not be empty. + StringProp *string \`field:"required" json:"stringProp" yaml:"stringProp"\` + NestedStruct *NestedStruct \`field:"optional" json:"nestedStruct" yaml:"nestedStruct"\` } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ImplementsInterfaceWithInternalSubclass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/RootStructValidator.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -14426,88 +15145,57 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type ImplementsInterfaceWithInternalSubclass interface { - ImplementsInterfaceWithInternal - Visible() -} - -// The jsii proxy struct for ImplementsInterfaceWithInternalSubclass -type jsiiProxy_ImplementsInterfaceWithInternalSubclass struct { - jsiiProxy_ImplementsInterfaceWithInternal +type RootStructValidator interface { } -func NewImplementsInterfaceWithInternalSubclass() ImplementsInterfaceWithInternalSubclass { - _init_.Initialize() - - j := jsiiProxy_ImplementsInterfaceWithInternalSubclass{} - - _jsii_.Create( - "jsii-calc.ImplementsInterfaceWithInternalSubclass", - nil, // no parameters - &j, - ) - - return &j +// The jsii proxy struct for RootStructValidator +type jsiiProxy_RootStructValidator struct { + _ byte // padding } -func NewImplementsInterfaceWithInternalSubclass_Override(i ImplementsInterfaceWithInternalSubclass) { +func RootStructValidator_Validate(struct_ *RootStruct) { _init_.Initialize() - _jsii_.Create( - "jsii-calc.ImplementsInterfaceWithInternalSubclass", - nil, // no parameters - i, - ) -} - -func (i *jsiiProxy_ImplementsInterfaceWithInternalSubclass) Visible() { - _jsii_.InvokeVoid( - i, - "visible", - nil, // no parameters + _jsii_.StaticInvokeVoid( + "jsii-calc.RootStructValidator", + "validate", + []interface{}{struct_}, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ImplementsPrivateInterface.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/RuntimeTypeChecking.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( + "time" + _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type ImplementsPrivateInterface interface { - Private() *string - SetPrivate(val *string) +type RuntimeTypeChecking interface { + MethodWithDefaultedArguments(arg1 *float64, arg2 *string, arg3 *time.Time) + MethodWithOptionalAnyArgument(arg interface{}) + // Used to verify verification of number of method arguments. + MethodWithOptionalArguments(arg1 *float64, arg2 *string, arg3 *time.Time) } -// The jsii proxy struct for ImplementsPrivateInterface -type jsiiProxy_ImplementsPrivateInterface struct { +// The jsii proxy struct for RuntimeTypeChecking +type jsiiProxy_RuntimeTypeChecking struct { _ byte // padding } -func (j *jsiiProxy_ImplementsPrivateInterface) Private() *string { - var returns *string - _jsii_.Get( - j, - "private", - &returns, - ) - return returns -} - - -func NewImplementsPrivateInterface() ImplementsPrivateInterface { +func NewRuntimeTypeChecking() RuntimeTypeChecking { _init_.Initialize() - j := jsiiProxy_ImplementsPrivateInterface{} + j := jsiiProxy_RuntimeTypeChecking{} _jsii_.Create( - "jsii-calc.ImplementsPrivateInterface", + "jsii-calc.RuntimeTypeChecking", nil, // no parameters &j, ) @@ -14515,47 +15203,59 @@ func NewImplementsPrivateInterface() ImplementsPrivateInterface { return &j } -func NewImplementsPrivateInterface_Override(i ImplementsPrivateInterface) { +func NewRuntimeTypeChecking_Override(r RuntimeTypeChecking) { _init_.Initialize() _jsii_.Create( - "jsii-calc.ImplementsPrivateInterface", + "jsii-calc.RuntimeTypeChecking", nil, // no parameters - i, + r, ) } -func (j *jsiiProxy_ImplementsPrivateInterface)SetPrivate(val *string) { - _jsii_.Set( - j, - "private", - val, +func (r *jsiiProxy_RuntimeTypeChecking) MethodWithDefaultedArguments(arg1 *float64, arg2 *string, arg3 *time.Time) { + _jsii_.InvokeVoid( + r, + "methodWithDefaultedArguments", + []interface{}{arg1, arg2, arg3}, + ) +} + +func (r *jsiiProxy_RuntimeTypeChecking) MethodWithOptionalAnyArgument(arg interface{}) { + _jsii_.InvokeVoid( + r, + "methodWithOptionalAnyArgument", + []interface{}{arg}, + ) +} + +func (r *jsiiProxy_RuntimeTypeChecking) MethodWithOptionalArguments(arg1 *float64, arg2 *string, arg3 *time.Time) { + _jsii_.InvokeVoid( + r, + "methodWithOptionalArguments", + []interface{}{arg1, arg2, arg3}, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ImplictBaseOfBase.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/SecondLevelStruct.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc -import ( - "time" - - "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2" -) -type ImplictBaseOfBase struct { - Foo scopejsiicalcbaseofbase.Very \`field:"required" json:"foo" yaml:"foo"\` - Bar *string \`field:"required" json:"bar" yaml:"bar"\` - Goo *time.Time \`field:"required" json:"goo" yaml:"goo"\` +type SecondLevelStruct struct { + // It's long and required. + DeeperRequiredProp *string \`field:"required" json:"deeperRequiredProp" yaml:"deeperRequiredProp"\` + // It's long, but you'll almost never pass it. + DeeperOptionalProp *string \`field:"optional" json:"deeperOptionalProp" yaml:"deeperOptionalProp"\` } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_InbetweenClass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/SingleInstanceTwoTypes.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -14564,26 +15264,28 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type InbetweenClass interface { - PublicClass - IPublicInterface2 - Ciao() *string - Hello() +// Test that a single instance can be returned under two different FQNs. +// +// JSII clients can instantiate 2 different strongly-typed wrappers for the same +// object. Unfortunately, this will break object equality, but if we didn't do +// this it would break runtime type checks in the JVM or CLR. +type SingleInstanceTwoTypes interface { + Interface1() InbetweenClass + Interface2() IPublicInterface } -// The jsii proxy struct for InbetweenClass -type jsiiProxy_InbetweenClass struct { - jsiiProxy_PublicClass - jsiiProxy_IPublicInterface2 +// The jsii proxy struct for SingleInstanceTwoTypes +type jsiiProxy_SingleInstanceTwoTypes struct { + _ byte // padding } -func NewInbetweenClass() InbetweenClass { +func NewSingleInstanceTwoTypes() SingleInstanceTwoTypes { _init_.Initialize() - j := jsiiProxy_InbetweenClass{} + j := jsiiProxy_SingleInstanceTwoTypes{} _jsii_.Create( - "jsii-calc.InbetweenClass", + "jsii-calc.SingleInstanceTwoTypes", nil, // no parameters &j, ) @@ -14591,22 +15293,22 @@ func NewInbetweenClass() InbetweenClass { return &j } -func NewInbetweenClass_Override(i InbetweenClass) { +func NewSingleInstanceTwoTypes_Override(s SingleInstanceTwoTypes) { _init_.Initialize() _jsii_.Create( - "jsii-calc.InbetweenClass", + "jsii-calc.SingleInstanceTwoTypes", nil, // no parameters - i, + s, ) } -func (i *jsiiProxy_InbetweenClass) Ciao() *string { - var returns *string +func (s *jsiiProxy_SingleInstanceTwoTypes) Interface1() InbetweenClass { + var returns InbetweenClass _jsii_.Invoke( - i, - "ciao", + s, + "interface1", nil, // no parameters &returns, ) @@ -14614,129 +15316,101 @@ func (i *jsiiProxy_InbetweenClass) Ciao() *string { return returns } -func (i *jsiiProxy_InbetweenClass) Hello() { - _jsii_.InvokeVoid( - i, - "hello", +func (s *jsiiProxy_SingleInstanceTwoTypes) Interface2() IPublicInterface { + var returns IPublicInterface + + _jsii_.Invoke( + s, + "interface2", nil, // no parameters + &returns, ) + + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_InterfaceCollections.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/SingletonInt.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Verifies that collections of interfaces or structs are correctly handled. +// Verifies that singleton enums are handled correctly. // -// See: https://github.com/aws/jsii/issues/1196 -type InterfaceCollections interface { +// https://github.com/aws/jsii/issues/231 +type SingletonInt interface { + IsSingletonInt(value *float64) *bool } -// The jsii proxy struct for InterfaceCollections -type jsiiProxy_InterfaceCollections struct { +// The jsii proxy struct for SingletonInt +type jsiiProxy_SingletonInt struct { _ byte // padding } -func InterfaceCollections_ListOfInterfaces() *[]IBell { - _init_.Initialize() - - var returns *[]IBell - - _jsii_.StaticInvoke( - "jsii-calc.InterfaceCollections", - "listOfInterfaces", - nil, // no parameters - &returns, - ) - - return returns -} - -func InterfaceCollections_ListOfStructs() *[]*StructA { - _init_.Initialize() - - var returns *[]*StructA +func (s *jsiiProxy_SingletonInt) IsSingletonInt(value *float64) *bool { + var returns *bool - _jsii_.StaticInvoke( - "jsii-calc.InterfaceCollections", - "listOfStructs", - nil, // no parameters + _jsii_.Invoke( + s, + "isSingletonInt", + []interface{}{value}, &returns, ) return returns } -func InterfaceCollections_MapOfInterfaces() *map[string]IBell { - _init_.Initialize() - - var returns *map[string]IBell - - _jsii_.StaticInvoke( - "jsii-calc.InterfaceCollections", - "mapOfInterfaces", - nil, // no parameters - &returns, - ) - return returns -} +`; -func InterfaceCollections_MapOfStructs() *map[string]*StructA { - _init_.Initialize() +exports[`Generated code for "jsii-calc": /go/jsiicalc/SingletonIntEnum.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - var returns *map[string]*StructA - _jsii_.StaticInvoke( - "jsii-calc.InterfaceCollections", - "mapOfStructs", - nil, // no parameters - &returns, - ) +// A singleton integer. +type SingletonIntEnum string - return returns -} +const ( + // Elite! + SingletonIntEnum_SINGLETON_INT SingletonIntEnum = "SINGLETON_INT" +) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_InterfacesMaker.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/SingletonString.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -// We can return arrays of interfaces See aws/aws-cdk#2362. -type InterfacesMaker interface { +// Verifies that singleton enums are handled correctly. +// +// https://github.com/aws/jsii/issues/231 +type SingletonString interface { + IsSingletonString(value *string) *bool } -// The jsii proxy struct for InterfacesMaker -type jsiiProxy_InterfacesMaker struct { +// The jsii proxy struct for SingletonString +type jsiiProxy_SingletonString struct { _ byte // padding } -func InterfacesMaker_MakeInterfaces(count *float64) *[]scopejsiicalclib.IDoublable { - _init_.Initialize() - - var returns *[]scopejsiicalclib.IDoublable +func (s *jsiiProxy_SingletonString) IsSingletonString(value *string) *bool { + var returns *bool - _jsii_.StaticInvoke( - "jsii-calc.InterfacesMaker", - "makeInterfaces", - []interface{}{count}, + _jsii_.Invoke( + s, + "isSingletonString", + []interface{}{value}, &returns, ) @@ -14746,55 +15420,36 @@ func InterfacesMaker_MakeInterfaces(count *float64) *[]scopejsiicalclib.IDoublab `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Isomorphism.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/SingletonStringEnum.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) -// Checks the "same instance" isomorphism is preserved within the constructor. -// -// Create a subclass of this, and assert that \`this.myself()\` actually returns -// \`this\` from within the constructor. -type Isomorphism interface { - Myself() Isomorphism -} +// A singleton string. +type SingletonStringEnum string -// The jsii proxy struct for Isomorphism -type jsiiProxy_Isomorphism struct { - _ byte // padding -} +const ( + // 1337. + SingletonStringEnum_SINGLETON_STRING SingletonStringEnum = "SINGLETON_STRING" +) -func NewIsomorphism_Override(i Isomorphism) { - _init_.Initialize() - _jsii_.Create( - "jsii-calc.Isomorphism", - nil, // no parameters - i, - ) -} +`; -func (i *jsiiProxy_Isomorphism) Myself() Isomorphism { - var returns Isomorphism +exports[`Generated code for "jsii-calc": /go/jsiicalc/SmellyStruct.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - _jsii_.Invoke( - i, - "myself", - nil, // no parameters - &returns, - ) - return returns +type SmellyStruct struct { + Property *string \`field:"required" json:"property" yaml:"property"\` + YetAnoterOne *bool \`field:"required" json:"yetAnoterOne" yaml:"yetAnoterOne"\` } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Issue2638.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/SomeTypeJsii976.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -14803,27 +15458,21 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Docstrings with period. -// See: https://github.com/aws/jsii/issues/2638 -// -type Issue2638 interface { +type SomeTypeJsii976 interface { } -// The jsii proxy struct for Issue2638 -type jsiiProxy_Issue2638 struct { +// The jsii proxy struct for SomeTypeJsii976 +type jsiiProxy_SomeTypeJsii976 struct { _ byte // padding } -// First sentence. -// -// Second sentence. Third sentence. -func NewIssue2638() Issue2638 { +func NewSomeTypeJsii976() SomeTypeJsii976 { _init_.Initialize() - j := jsiiProxy_Issue2638{} + j := jsiiProxy_SomeTypeJsii976{} _jsii_.Create( - "jsii-calc.Issue2638", + "jsii-calc.SomeTypeJsii976", nil, // no parameters &j, ) @@ -14831,67 +15480,50 @@ func NewIssue2638() Issue2638 { return &j } -// First sentence. -// -// Second sentence. Third sentence. -func NewIssue2638_Override(i Issue2638) { +func NewSomeTypeJsii976_Override(s SomeTypeJsii976) { _init_.Initialize() _jsii_.Create( - "jsii-calc.Issue2638", + "jsii-calc.SomeTypeJsii976", nil, // no parameters - i, + s, ) } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Issue2638B.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type Issue2638B interface { -} - -// The jsii proxy struct for Issue2638B -type jsiiProxy_Issue2638B struct { - _ byte // padding -} - -func NewIssue2638B() Issue2638B { +func SomeTypeJsii976_ReturnAnonymous() interface{} { _init_.Initialize() - j := jsiiProxy_Issue2638B{} + var returns interface{} - _jsii_.Create( - "jsii-calc.Issue2638B", + _jsii_.StaticInvoke( + "jsii-calc.SomeTypeJsii976", + "returnAnonymous", nil, // no parameters - &j, + &returns, ) - return &j + return returns } -func NewIssue2638B_Override(i Issue2638B) { +func SomeTypeJsii976_ReturnReturn() IReturnJsii976 { _init_.Initialize() - _jsii_.Create( - "jsii-calc.Issue2638B", + var returns IReturnJsii976 + + _jsii_.StaticInvoke( + "jsii-calc.SomeTypeJsii976", + "returnReturn", nil, // no parameters - i, + &returns, ) + + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JSII417Derived.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/StableClass.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -14900,108 +15532,110 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type JSII417Derived interface { - JSII417PublicBaseOfBase - HasRoot() *bool - Property() *string - Bar() - Baz() - Foo() +type StableClass interface { + MutableProperty() *float64 + SetMutableProperty(val *float64) + ReadonlyProperty() *string + Method() } -// The jsii proxy struct for JSII417Derived -type jsiiProxy_JSII417Derived struct { - jsiiProxy_JSII417PublicBaseOfBase +// The jsii proxy struct for StableClass +type jsiiProxy_StableClass struct { + _ byte // padding } -func (j *jsiiProxy_JSII417Derived) HasRoot() *bool { - var returns *bool +func (j *jsiiProxy_StableClass) MutableProperty() *float64 { + var returns *float64 _jsii_.Get( j, - "hasRoot", + "mutableProperty", &returns, ) return returns } -func (j *jsiiProxy_JSII417Derived) Property() *string { +func (j *jsiiProxy_StableClass) ReadonlyProperty() *string { var returns *string _jsii_.Get( j, - "property", + "readonlyProperty", &returns, ) return returns } -func NewJSII417Derived(property *string) JSII417Derived { +func NewStableClass(readonlyString *string, mutableNumber *float64) StableClass { _init_.Initialize() - j := jsiiProxy_JSII417Derived{} + j := jsiiProxy_StableClass{} _jsii_.Create( - "jsii-calc.JSII417Derived", - []interface{}{property}, + "jsii-calc.StableClass", + []interface{}{readonlyString, mutableNumber}, &j, ) return &j } -func NewJSII417Derived_Override(j JSII417Derived, property *string) { +func NewStableClass_Override(s StableClass, readonlyString *string, mutableNumber *float64) { _init_.Initialize() _jsii_.Create( - "jsii-calc.JSII417Derived", - []interface{}{property}, - j, - ) -} - -func JSII417Derived_MakeInstance() JSII417PublicBaseOfBase { - _init_.Initialize() - - var returns JSII417PublicBaseOfBase - - _jsii_.StaticInvoke( - "jsii-calc.JSII417Derived", - "makeInstance", - nil, // no parameters - &returns, + "jsii-calc.StableClass", + []interface{}{readonlyString, mutableNumber}, + s, ) - - return returns } -func (j *jsiiProxy_JSII417Derived) Bar() { - _jsii_.InvokeVoid( +func (j *jsiiProxy_StableClass)SetMutableProperty(val *float64) { + _jsii_.Set( j, - "bar", - nil, // no parameters + "mutableProperty", + val, ) } -func (j *jsiiProxy_JSII417Derived) Baz() { +func (s *jsiiProxy_StableClass) Method() { _jsii_.InvokeVoid( - j, - "baz", + s, + "method", nil, // no parameters ) } -func (j *jsiiProxy_JSII417Derived) Foo() { - _jsii_.InvokeVoid( - j, - "foo", - nil, // no parameters - ) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/StableEnum.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type StableEnum string + +const ( + StableEnum_OPTION_A StableEnum = "OPTION_A" + StableEnum_OPTION_B StableEnum = "OPTION_B" +) + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/StableStruct.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type StableStruct struct { + ReadonlyProperty *string \`field:"required" json:"readonlyProperty" yaml:"readonlyProperty"\` } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JSII417PublicBaseOfBase.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/StaticContext.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -15010,105 +15644,126 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type JSII417PublicBaseOfBase interface { - HasRoot() *bool - Foo() +// This is used to validate the ability to use \`this\` from within a static context. +// +// https://github.com/awslabs/aws-cdk/issues/2304 +type StaticContext interface { } -// The jsii proxy struct for JSII417PublicBaseOfBase -type jsiiProxy_JSII417PublicBaseOfBase struct { +// The jsii proxy struct for StaticContext +type jsiiProxy_StaticContext struct { _ byte // padding } -func (j *jsiiProxy_JSII417PublicBaseOfBase) HasRoot() *bool { +func StaticContext_CanAccessStaticContext() *bool { + _init_.Initialize() + var returns *bool - _jsii_.Get( - j, - "hasRoot", + + _jsii_.StaticInvoke( + "jsii-calc.StaticContext", + "canAccessStaticContext", + nil, // no parameters &returns, ) + return returns } +func StaticContext_StaticVariable() *bool { + _init_.Initialize() + var returns *bool + _jsii_.StaticGet( + "jsii-calc.StaticContext", + "staticVariable", + &returns, + ) + return returns +} -func NewJSII417PublicBaseOfBase() JSII417PublicBaseOfBase { +func StaticContext_SetStaticVariable(val *bool) { _init_.Initialize() + _jsii_.StaticSet( + "jsii-calc.StaticContext", + "staticVariable", + val, + ) +} - j := jsiiProxy_JSII417PublicBaseOfBase{} - _jsii_.Create( - "jsii-calc.JSII417PublicBaseOfBase", - nil, // no parameters - &j, - ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/StaticHelloChild.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type StaticHelloChild interface { + StaticHelloParent +} - return &j +// The jsii proxy struct for StaticHelloChild +type jsiiProxy_StaticHelloChild struct { + jsiiProxy_StaticHelloParent } -func NewJSII417PublicBaseOfBase_Override(j JSII417PublicBaseOfBase) { +func StaticHelloChild_Method() { _init_.Initialize() - _jsii_.Create( - "jsii-calc.JSII417PublicBaseOfBase", + _jsii_.StaticInvokeVoid( + "jsii-calc.StaticHelloChild", + "method", nil, // no parameters - j, ) } -func JSII417PublicBaseOfBase_MakeInstance() JSII417PublicBaseOfBase { +func StaticHelloChild_Property() *float64 { _init_.Initialize() - - var returns JSII417PublicBaseOfBase - - _jsii_.StaticInvoke( - "jsii-calc.JSII417PublicBaseOfBase", - "makeInstance", - nil, // no parameters + var returns *float64 + _jsii_.StaticGet( + "jsii-calc.StaticHelloChild", + "property", &returns, ) - return returns } -func (j *jsiiProxy_JSII417PublicBaseOfBase) Foo() { - _jsii_.InvokeVoid( - j, - "foo", - nil, // no parameters - ) -} - `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JSObjectLiteralForInterface.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/StaticHelloParent.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -type JSObjectLiteralForInterface interface { - GiveMeFriendly() scopejsiicalclib.IFriendly - GiveMeFriendlyGenerator() IFriendlyRandomGenerator +// Static methods that override parent class are technically overrides (the inheritance of statics is part of the ES6 specification), but certain other languages such as Java do not carry statics in the inheritance chain at all, so they cannot be overridden, only hidden. +// +// The difference is fairly minor (for typical use-cases, the end result is the +// same), however this has implications on what the generated code should look +// like. +type StaticHelloParent interface { } -// The jsii proxy struct for JSObjectLiteralForInterface -type jsiiProxy_JSObjectLiteralForInterface struct { +// The jsii proxy struct for StaticHelloParent +type jsiiProxy_StaticHelloParent struct { _ byte // padding } -func NewJSObjectLiteralForInterface() JSObjectLiteralForInterface { +func NewStaticHelloParent() StaticHelloParent { _init_.Initialize() - j := jsiiProxy_JSObjectLiteralForInterface{} + j := jsiiProxy_StaticHelloParent{} _jsii_.Create( - "jsii-calc.JSObjectLiteralForInterface", + "jsii-calc.StaticHelloParent", nil, // no parameters &j, ) @@ -15116,46 +15771,41 @@ func NewJSObjectLiteralForInterface() JSObjectLiteralForInterface { return &j } -func NewJSObjectLiteralForInterface_Override(j JSObjectLiteralForInterface) { +func NewStaticHelloParent_Override(s StaticHelloParent) { _init_.Initialize() _jsii_.Create( - "jsii-calc.JSObjectLiteralForInterface", + "jsii-calc.StaticHelloParent", nil, // no parameters - j, + s, ) } -func (j *jsiiProxy_JSObjectLiteralForInterface) GiveMeFriendly() scopejsiicalclib.IFriendly { - var returns scopejsiicalclib.IFriendly +func StaticHelloParent_Method() { + _init_.Initialize() - _jsii_.Invoke( - j, - "giveMeFriendly", + _jsii_.StaticInvokeVoid( + "jsii-calc.StaticHelloParent", + "method", nil, // no parameters - &returns, ) - - return returns } -func (j *jsiiProxy_JSObjectLiteralForInterface) GiveMeFriendlyGenerator() IFriendlyRandomGenerator { - var returns IFriendlyRandomGenerator - - _jsii_.Invoke( - j, - "giveMeFriendlyGenerator", - nil, // no parameters +func StaticHelloParent_Property() *float64 { + _init_.Initialize() + var returns *float64 + _jsii_.StaticGet( + "jsii-calc.StaticHelloParent", + "property", &returns, ) - return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JSObjectLiteralToNative.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/Statics.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -15164,141 +15814,184 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type JSObjectLiteralToNative interface { - ReturnLiteral() JSObjectLiteralToNativeClass +type Statics interface { + Value() *string + JustMethod() *string } -// The jsii proxy struct for JSObjectLiteralToNative -type jsiiProxy_JSObjectLiteralToNative struct { +// The jsii proxy struct for Statics +type jsiiProxy_Statics struct { _ byte // padding } -func NewJSObjectLiteralToNative() JSObjectLiteralToNative { +func (j *jsiiProxy_Statics) Value() *string { + var returns *string + _jsii_.Get( + j, + "value", + &returns, + ) + return returns +} + + +func NewStatics(value *string) Statics { _init_.Initialize() - j := jsiiProxy_JSObjectLiteralToNative{} + j := jsiiProxy_Statics{} _jsii_.Create( - "jsii-calc.JSObjectLiteralToNative", - nil, // no parameters + "jsii-calc.Statics", + []interface{}{value}, &j, ) return &j } -func NewJSObjectLiteralToNative_Override(j JSObjectLiteralToNative) { +func NewStatics_Override(s Statics, value *string) { _init_.Initialize() _jsii_.Create( - "jsii-calc.JSObjectLiteralToNative", - nil, // no parameters - j, + "jsii-calc.Statics", + []interface{}{value}, + s, ) } -func (j *jsiiProxy_JSObjectLiteralToNative) ReturnLiteral() JSObjectLiteralToNativeClass { - var returns JSObjectLiteralToNativeClass +// Jsdocs for static method. +func Statics_StaticMethod(name *string) *string { + _init_.Initialize() - _jsii_.Invoke( - j, - "returnLiteral", - nil, // no parameters + var returns *string + + _jsii_.StaticInvoke( + "jsii-calc.Statics", + "staticMethod", + []interface{}{name}, &returns, ) return returns } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JSObjectLiteralToNativeClass.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type JSObjectLiteralToNativeClass interface { - PropA() *string - SetPropA(val *string) - PropB() *float64 - SetPropB(val *float64) +func Statics_BAR() *float64 { + _init_.Initialize() + var returns *float64 + _jsii_.StaticGet( + "jsii-calc.Statics", + "BAR", + &returns, + ) + return returns } -// The jsii proxy struct for JSObjectLiteralToNativeClass -type jsiiProxy_JSObjectLiteralToNativeClass struct { - _ byte // padding +func Statics_ConstObj() DoubleTrouble { + _init_.Initialize() + var returns DoubleTrouble + _jsii_.StaticGet( + "jsii-calc.Statics", + "ConstObj", + &returns, + ) + return returns } -func (j *jsiiProxy_JSObjectLiteralToNativeClass) PropA() *string { +func Statics_Foo() *string { + _init_.Initialize() var returns *string - _jsii_.Get( - j, - "propA", + _jsii_.StaticGet( + "jsii-calc.Statics", + "Foo", &returns, ) return returns } -func (j *jsiiProxy_JSObjectLiteralToNativeClass) PropB() *float64 { - var returns *float64 - _jsii_.Get( - j, - "propB", +func Statics_Instance() Statics { + _init_.Initialize() + var returns Statics + _jsii_.StaticGet( + "jsii-calc.Statics", + "instance", &returns, ) return returns } - -func NewJSObjectLiteralToNativeClass() JSObjectLiteralToNativeClass { +func Statics_SetInstance(val Statics) { _init_.Initialize() - - j := jsiiProxy_JSObjectLiteralToNativeClass{} - - _jsii_.Create( - "jsii-calc.JSObjectLiteralToNativeClass", - nil, // no parameters - &j, + _jsii_.StaticSet( + "jsii-calc.Statics", + "instance", + val, ) - - return &j } -func NewJSObjectLiteralToNativeClass_Override(j JSObjectLiteralToNativeClass) { +func Statics_NonConstStatic() *float64 { _init_.Initialize() - - _jsii_.Create( - "jsii-calc.JSObjectLiteralToNativeClass", - nil, // no parameters - j, + var returns *float64 + _jsii_.StaticGet( + "jsii-calc.Statics", + "nonConstStatic", + &returns, ) + return returns } -func (j *jsiiProxy_JSObjectLiteralToNativeClass)SetPropA(val *string) { - _jsii_.Set( - j, - "propA", +func Statics_SetNonConstStatic(val *float64) { + _init_.Initialize() + _jsii_.StaticSet( + "jsii-calc.Statics", + "nonConstStatic", val, ) } -func (j *jsiiProxy_JSObjectLiteralToNativeClass)SetPropB(val *float64) { - _jsii_.Set( - j, - "propB", - val, +func Statics_ZooBar() *map[string]*string { + _init_.Initialize() + var returns *map[string]*string + _jsii_.StaticGet( + "jsii-calc.Statics", + "zooBar", + &returns, + ) + return returns +} + +func (s *jsiiProxy_Statics) JustMethod() *string { + var returns *string + + _jsii_.Invoke( + s, + "justMethod", + nil, // no parameters + &returns, ) + + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JavaReservedWords.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/StringEnum.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type StringEnum string + +const ( + StringEnum_A StringEnum = "A" + StringEnum_B StringEnum = "B" + StringEnum_C StringEnum = "C" +) + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/StripInternal.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -15307,86 +16000,34 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type JavaReservedWords interface { - While() *string - SetWhile(val *string) - Abstract() - Assert() - Boolean() - Break() - Byte() - Case() - Catch() - Char() - Class() - Const() - Continue() - Default() - Do() - Double() - Else() - Enum() - Extends() - False() - Final() - Finally() - Float() - For() - Goto() - If() - Implements() - Import() - Instanceof() - Int() - Interface() - Long() - Native() - New() - Null() - Package() - Private() - Protected() - Public() - Return() - Short() - Static() - Strictfp() - Super() - Switch() - Synchronized() - This() - Throw() - Throws() - Transient() - True() - Try() - Void() - Volatile() +type StripInternal interface { + YouSeeMe() *string + SetYouSeeMe(val *string) } -// The jsii proxy struct for JavaReservedWords -type jsiiProxy_JavaReservedWords struct { +// The jsii proxy struct for StripInternal +type jsiiProxy_StripInternal struct { _ byte // padding } -func (j *jsiiProxy_JavaReservedWords) While() *string { +func (j *jsiiProxy_StripInternal) YouSeeMe() *string { var returns *string _jsii_.Get( j, - "while", + "youSeeMe", &returns, ) return returns } -func NewJavaReservedWords() JavaReservedWords { +func NewStripInternal() StripInternal { _init_.Initialize() - j := jsiiProxy_JavaReservedWords{} + j := jsiiProxy_StripInternal{} _jsii_.Create( - "jsii-calc.JavaReservedWords", + "jsii-calc.StripInternal", nil, // no parameters &j, ) @@ -15394,444 +16035,452 @@ func NewJavaReservedWords() JavaReservedWords { return &j } -func NewJavaReservedWords_Override(j JavaReservedWords) { +func NewStripInternal_Override(s StripInternal) { _init_.Initialize() _jsii_.Create( - "jsii-calc.JavaReservedWords", + "jsii-calc.StripInternal", nil, // no parameters - j, + s, ) } -func (j *jsiiProxy_JavaReservedWords)SetWhile(val *string) { +func (j *jsiiProxy_StripInternal)SetYouSeeMe(val *string) { _jsii_.Set( j, - "while", + "youSeeMe", val, ) } -func (j *jsiiProxy_JavaReservedWords) Abstract() { - _jsii_.InvokeVoid( - j, - "abstract", - nil, // no parameters - ) -} -func (j *jsiiProxy_JavaReservedWords) Assert() { - _jsii_.InvokeVoid( - j, - "assert", - nil, // no parameters - ) -} +`; -func (j *jsiiProxy_JavaReservedWords) Boolean() { - _jsii_.InvokeVoid( - j, - "boolean", - nil, // no parameters - ) -} +exports[`Generated code for "jsii-calc": /go/jsiicalc/StructA.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -func (j *jsiiProxy_JavaReservedWords) Break() { - _jsii_.InvokeVoid( - j, - "break", - nil, // no parameters - ) -} -func (j *jsiiProxy_JavaReservedWords) Byte() { - _jsii_.InvokeVoid( - j, - "byte", - nil, // no parameters - ) +// We can serialize and deserialize structs without silently ignoring optional fields. +type StructA struct { + RequiredString *string \`field:"required" json:"requiredString" yaml:"requiredString"\` + OptionalNumber *float64 \`field:"optional" json:"optionalNumber" yaml:"optionalNumber"\` + OptionalString *string \`field:"optional" json:"optionalString" yaml:"optionalString"\` } -func (j *jsiiProxy_JavaReservedWords) Case() { - _jsii_.InvokeVoid( - j, - "case", - nil, // no parameters - ) -} -func (j *jsiiProxy_JavaReservedWords) Catch() { - _jsii_.InvokeVoid( - j, - "catch", - nil, // no parameters - ) -} +`; -func (j *jsiiProxy_JavaReservedWords) Char() { - _jsii_.InvokeVoid( - j, - "char", - nil, // no parameters - ) -} +exports[`Generated code for "jsii-calc": /go/jsiicalc/StructB.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -func (j *jsiiProxy_JavaReservedWords) Class() { - _jsii_.InvokeVoid( - j, - "class", - nil, // no parameters - ) -} -func (j *jsiiProxy_JavaReservedWords) Const() { - _jsii_.InvokeVoid( - j, - "const", - nil, // no parameters - ) +// This intentionally overlaps with StructA (where only requiredString is provided) to test htat the kernel properly disambiguates those. +type StructB struct { + RequiredString *string \`field:"required" json:"requiredString" yaml:"requiredString"\` + OptionalBoolean *bool \`field:"optional" json:"optionalBoolean" yaml:"optionalBoolean"\` + OptionalStructA *StructA \`field:"optional" json:"optionalStructA" yaml:"optionalStructA"\` } -func (j *jsiiProxy_JavaReservedWords) Continue() { - _jsii_.InvokeVoid( - j, - "continue", - nil, // no parameters - ) -} -func (j *jsiiProxy_JavaReservedWords) Default() { - _jsii_.InvokeVoid( - j, - "default", - nil, // no parameters - ) -} +`; -func (j *jsiiProxy_JavaReservedWords) Do() { - _jsii_.InvokeVoid( - j, - "do", - nil, // no parameters - ) -} +exports[`Generated code for "jsii-calc": /go/jsiicalc/StructParameterType.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -func (j *jsiiProxy_JavaReservedWords) Double() { - _jsii_.InvokeVoid( - j, - "double", - nil, // no parameters - ) -} -func (j *jsiiProxy_JavaReservedWords) Else() { - _jsii_.InvokeVoid( - j, - "else", - nil, // no parameters - ) +// Verifies that, in languages that do keyword lifting (e.g: Python), having a struct member with the same name as a positional parameter results in the correct code being emitted. +// +// See: https://github.com/aws/aws-cdk/issues/4302 +type StructParameterType struct { + Scope *string \`field:"required" json:"scope" yaml:"scope"\` + Props *bool \`field:"optional" json:"props" yaml:"props"\` } -func (j *jsiiProxy_JavaReservedWords) Enum() { - _jsii_.InvokeVoid( - j, - "enum", - nil, // no parameters - ) -} -func (j *jsiiProxy_JavaReservedWords) Extends() { - _jsii_.InvokeVoid( - j, - "extends", - nil, // no parameters - ) -} +`; -func (j *jsiiProxy_JavaReservedWords) False() { - _jsii_.InvokeVoid( - j, - "false", - nil, // no parameters - ) -} +exports[`Generated code for "jsii-calc": /go/jsiicalc/StructPassing.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) -func (j *jsiiProxy_JavaReservedWords) Final() { - _jsii_.InvokeVoid( - j, - "final", - nil, // no parameters - ) +// Just because we can. +type StructPassing interface { } -func (j *jsiiProxy_JavaReservedWords) Finally() { - _jsii_.InvokeVoid( - j, - "finally", - nil, // no parameters - ) +// The jsii proxy struct for StructPassing +type jsiiProxy_StructPassing struct { + _ byte // padding } -func (j *jsiiProxy_JavaReservedWords) Float() { - _jsii_.InvokeVoid( - j, - "float", - nil, // no parameters - ) -} +func NewStructPassing() StructPassing { + _init_.Initialize() -func (j *jsiiProxy_JavaReservedWords) For() { - _jsii_.InvokeVoid( - j, - "for", - nil, // no parameters - ) -} + j := jsiiProxy_StructPassing{} -func (j *jsiiProxy_JavaReservedWords) Goto() { - _jsii_.InvokeVoid( - j, - "goto", + _jsii_.Create( + "jsii-calc.StructPassing", nil, // no parameters + &j, ) -} -func (j *jsiiProxy_JavaReservedWords) If() { - _jsii_.InvokeVoid( - j, - "if", - nil, // no parameters - ) + return &j } -func (j *jsiiProxy_JavaReservedWords) Implements() { - _jsii_.InvokeVoid( - j, - "implements", - nil, // no parameters - ) -} +func NewStructPassing_Override(s StructPassing) { + _init_.Initialize() -func (j *jsiiProxy_JavaReservedWords) Import() { - _jsii_.InvokeVoid( - j, - "import", + _jsii_.Create( + "jsii-calc.StructPassing", nil, // no parameters + s, ) } -func (j *jsiiProxy_JavaReservedWords) Instanceof() { - _jsii_.InvokeVoid( - j, - "instanceof", - nil, // no parameters +func StructPassing_HowManyVarArgsDidIPass(_positional *float64, inputs ...*TopLevelStruct) *float64 { + _init_.Initialize() + + args := []interface{}{_positional} + for _, a := range inputs { + args = append(args, a) + } + + var returns *float64 + + _jsii_.StaticInvoke( + "jsii-calc.StructPassing", + "howManyVarArgsDidIPass", + args, + &returns, ) + + return returns } -func (j *jsiiProxy_JavaReservedWords) Int() { - _jsii_.InvokeVoid( - j, - "int", - nil, // no parameters +func StructPassing_RoundTrip(_positional *float64, input *TopLevelStruct) *TopLevelStruct { + _init_.Initialize() + + var returns *TopLevelStruct + + _jsii_.StaticInvoke( + "jsii-calc.StructPassing", + "roundTrip", + []interface{}{_positional, input}, + &returns, ) + + return returns } -func (j *jsiiProxy_JavaReservedWords) Interface() { - _jsii_.InvokeVoid( - j, - "interface", - nil, // no parameters - ) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/StructUnionConsumer.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type StructUnionConsumer interface { } -func (j *jsiiProxy_JavaReservedWords) Long() { - _jsii_.InvokeVoid( - j, - "long", - nil, // no parameters - ) +// The jsii proxy struct for StructUnionConsumer +type jsiiProxy_StructUnionConsumer struct { + _ byte // padding } -func (j *jsiiProxy_JavaReservedWords) Native() { - _jsii_.InvokeVoid( - j, - "native", - nil, // no parameters +func StructUnionConsumer_IsStructA(struct_ interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.StructUnionConsumer", + "isStructA", + []interface{}{struct_}, + &returns, ) + + return returns } -func (j *jsiiProxy_JavaReservedWords) New() { - _jsii_.InvokeVoid( - j, - "new", - nil, // no parameters +func StructUnionConsumer_IsStructB(struct_ interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.StructUnionConsumer", + "isStructB", + []interface{}{struct_}, + &returns, ) + + return returns } -func (j *jsiiProxy_JavaReservedWords) Null() { - _jsii_.InvokeVoid( - j, - "null", - nil, // no parameters +func StructUnionConsumer_ProvideStruct(which *string) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "jsii-calc.StructUnionConsumer", + "provideStruct", + []interface{}{which}, + &returns, ) + + return returns } -func (j *jsiiProxy_JavaReservedWords) Package() { - _jsii_.InvokeVoid( - j, - "package", - nil, // no parameters - ) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/StructWithCollectionOfUnionts.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type StructWithCollectionOfUnionts struct { + UnionProperty *[]*map[string]interface{} \`field:"required" json:"unionProperty" yaml:"unionProperty"\` } -func (j *jsiiProxy_JavaReservedWords) Private() { - _jsii_.InvokeVoid( - j, - "private", - nil, // no parameters - ) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/StructWithEnum.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type StructWithEnum struct { + // An enum value. + Foo StringEnum \`field:"required" json:"foo" yaml:"foo"\` + // Optional enum value (of type integer). + Bar AllTypesEnum \`field:"optional" json:"bar" yaml:"bar"\` } -func (j *jsiiProxy_JavaReservedWords) Protected() { - _jsii_.InvokeVoid( - j, - "protected", - nil, // no parameters - ) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/StructWithJavaReservedWords.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type StructWithJavaReservedWords struct { + Default *string \`field:"required" json:"default" yaml:"default"\` + Assert *string \`field:"optional" json:"assert" yaml:"assert"\` + Result *string \`field:"optional" json:"result" yaml:"result"\` + That *string \`field:"optional" json:"that" yaml:"that"\` } -func (j *jsiiProxy_JavaReservedWords) Public() { - _jsii_.InvokeVoid( - j, - "public", - nil, // no parameters - ) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/Sum.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + +// An operation that sums multiple values. +type Sum interface { + composition.CompositeOperation + // A set of postfixes to include in a decorated .toString(). + DecorationPostfixes() *[]*string + SetDecorationPostfixes(val *[]*string) + // A set of prefixes to include in a decorated .toString(). + DecorationPrefixes() *[]*string + SetDecorationPrefixes(val *[]*string) + // The expression that this operation consists of. + // + // Must be implemented by derived classes. + Expression() scopejsiicalclib.NumericValue + // The parts to sum. + Parts() *[]scopejsiicalclib.NumericValue + SetParts(val *[]scopejsiicalclib.NumericValue) + // The .toString() style. + StringStyle() composition.CompositeOperation_CompositionStringStyle + SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) + // The value. + Value() *float64 + // String representation of the value. + ToString() *string + // Returns: the name of the class (to verify native type names are created for derived classes). + TypeName() interface{} } -func (j *jsiiProxy_JavaReservedWords) Return() { - _jsii_.InvokeVoid( - j, - "return", - nil, // no parameters - ) +// The jsii proxy struct for Sum +type jsiiProxy_Sum struct { + internal.Type__compositionCompositeOperation } -func (j *jsiiProxy_JavaReservedWords) Short() { - _jsii_.InvokeVoid( +func (j *jsiiProxy_Sum) DecorationPostfixes() *[]*string { + var returns *[]*string + _jsii_.Get( j, - "short", - nil, // no parameters + "decorationPostfixes", + &returns, ) + return returns } -func (j *jsiiProxy_JavaReservedWords) Static() { - _jsii_.InvokeVoid( +func (j *jsiiProxy_Sum) DecorationPrefixes() *[]*string { + var returns *[]*string + _jsii_.Get( j, - "static", - nil, // no parameters + "decorationPrefixes", + &returns, ) + return returns } -func (j *jsiiProxy_JavaReservedWords) Strictfp() { - _jsii_.InvokeVoid( +func (j *jsiiProxy_Sum) Expression() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue + _jsii_.Get( j, - "strictfp", - nil, // no parameters + "expression", + &returns, ) + return returns } -func (j *jsiiProxy_JavaReservedWords) Super() { - _jsii_.InvokeVoid( +func (j *jsiiProxy_Sum) Parts() *[]scopejsiicalclib.NumericValue { + var returns *[]scopejsiicalclib.NumericValue + _jsii_.Get( j, - "super", - nil, // no parameters + "parts", + &returns, ) + return returns } -func (j *jsiiProxy_JavaReservedWords) Switch() { - _jsii_.InvokeVoid( +func (j *jsiiProxy_Sum) StringStyle() composition.CompositeOperation_CompositionStringStyle { + var returns composition.CompositeOperation_CompositionStringStyle + _jsii_.Get( j, - "switch", - nil, // no parameters + "stringStyle", + &returns, ) + return returns } -func (j *jsiiProxy_JavaReservedWords) Synchronized() { - _jsii_.InvokeVoid( +func (j *jsiiProxy_Sum) Value() *float64 { + var returns *float64 + _jsii_.Get( j, - "synchronized", - nil, // no parameters + "value", + &returns, ) + return returns } -func (j *jsiiProxy_JavaReservedWords) This() { - _jsii_.InvokeVoid( - j, - "this", + +func NewSum() Sum { + _init_.Initialize() + + j := jsiiProxy_Sum{} + + _jsii_.Create( + "jsii-calc.Sum", nil, // no parameters + &j, ) + + return &j } -func (j *jsiiProxy_JavaReservedWords) Throw() { - _jsii_.InvokeVoid( - j, - "throw", +func NewSum_Override(s Sum) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.Sum", nil, // no parameters + s, ) } -func (j *jsiiProxy_JavaReservedWords) Throws() { - _jsii_.InvokeVoid( +func (j *jsiiProxy_Sum)SetDecorationPostfixes(val *[]*string) { + _jsii_.Set( j, - "throws", - nil, // no parameters + "decorationPostfixes", + val, ) } -func (j *jsiiProxy_JavaReservedWords) Transient() { - _jsii_.InvokeVoid( +func (j *jsiiProxy_Sum)SetDecorationPrefixes(val *[]*string) { + _jsii_.Set( j, - "transient", - nil, // no parameters + "decorationPrefixes", + val, ) } -func (j *jsiiProxy_JavaReservedWords) True() { - _jsii_.InvokeVoid( +func (j *jsiiProxy_Sum)SetParts(val *[]scopejsiicalclib.NumericValue) { + _jsii_.Set( j, - "true", - nil, // no parameters + "parts", + val, ) } -func (j *jsiiProxy_JavaReservedWords) Try() { - _jsii_.InvokeVoid( +func (j *jsiiProxy_Sum)SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) { + _jsii_.Set( j, - "try", - nil, // no parameters + "stringStyle", + val, ) } -func (j *jsiiProxy_JavaReservedWords) Void() { - _jsii_.InvokeVoid( - j, - "void", +func (s *jsiiProxy_Sum) ToString() *string { + var returns *string + + _jsii_.Invoke( + s, + "toString", nil, // no parameters + &returns, ) + + return returns } -func (j *jsiiProxy_JavaReservedWords) Volatile() { - _jsii_.InvokeVoid( - j, - "volatile", +func (s *jsiiProxy_Sum) TypeName() interface{} { + var returns interface{} + + _jsii_.Invoke( + s, + "typeName", nil, // no parameters + &returns, ) + + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Jsii487Derived.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/SupportsNiceJavaBuilder.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -15840,90 +16489,116 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type Jsii487Derived interface { - IJsii487External - IJsii487External2 +type SupportsNiceJavaBuilder interface { + SupportsNiceJavaBuilderWithRequiredProps + Bar() *float64 + // some identifier. + Id() *float64 + PropId() *string + Rest() *[]*string } -// The jsii proxy struct for Jsii487Derived -type jsiiProxy_Jsii487Derived struct { - jsiiProxy_IJsii487External - jsiiProxy_IJsii487External2 +// The jsii proxy struct for SupportsNiceJavaBuilder +type jsiiProxy_SupportsNiceJavaBuilder struct { + jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps } -func NewJsii487Derived() Jsii487Derived { - _init_.Initialize() - - j := jsiiProxy_Jsii487Derived{} - - _jsii_.Create( - "jsii-calc.Jsii487Derived", - nil, // no parameters - &j, +func (j *jsiiProxy_SupportsNiceJavaBuilder) Bar() *float64 { + var returns *float64 + _jsii_.Get( + j, + "bar", + &returns, ) - - return &j + return returns } -func NewJsii487Derived_Override(j Jsii487Derived) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.Jsii487Derived", - nil, // no parameters +func (j *jsiiProxy_SupportsNiceJavaBuilder) Id() *float64 { + var returns *float64 + _jsii_.Get( j, + "id", + &returns, ) + return returns } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Jsii496Derived.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type Jsii496Derived interface { - IJsii496 +func (j *jsiiProxy_SupportsNiceJavaBuilder) PropId() *string { + var returns *string + _jsii_.Get( + j, + "propId", + &returns, + ) + return returns } -// The jsii proxy struct for Jsii496Derived -type jsiiProxy_Jsii496Derived struct { - jsiiProxy_IJsii496 +func (j *jsiiProxy_SupportsNiceJavaBuilder) Rest() *[]*string { + var returns *[]*string + _jsii_.Get( + j, + "rest", + &returns, + ) + return returns } -func NewJsii496Derived() Jsii496Derived { + +func NewSupportsNiceJavaBuilder(id *float64, defaultBar *float64, props *SupportsNiceJavaBuilderProps, rest ...*string) SupportsNiceJavaBuilder { _init_.Initialize() - j := jsiiProxy_Jsii496Derived{} + args := []interface{}{id, defaultBar, props} + for _, a := range rest { + args = append(args, a) + } + + j := jsiiProxy_SupportsNiceJavaBuilder{} _jsii_.Create( - "jsii-calc.Jsii496Derived", - nil, // no parameters + "jsii-calc.SupportsNiceJavaBuilder", + args, &j, ) return &j } -func NewJsii496Derived_Override(j Jsii496Derived) { +func NewSupportsNiceJavaBuilder_Override(s SupportsNiceJavaBuilder, id *float64, defaultBar *float64, props *SupportsNiceJavaBuilderProps, rest ...*string) { _init_.Initialize() + args := []interface{}{id, defaultBar, props} + for _, a := range rest { + args = append(args, a) + } + _jsii_.Create( - "jsii-calc.Jsii496Derived", - nil, // no parameters - j, + "jsii-calc.SupportsNiceJavaBuilder", + args, + s, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JsiiAgent.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/SupportsNiceJavaBuilderProps.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type SupportsNiceJavaBuilderProps struct { + // Some number, like 42. + Bar *float64 \`field:"required" json:"bar" yaml:"bar"\` + // An \`id\` field here is terrible API design, because the constructor of \`SupportsNiceJavaBuilder\` already has a parameter named \`id\`. + // + // But here we are, doing it like we didn't care. + Id *string \`field:"optional" json:"id" yaml:"id"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/SupportsNiceJavaBuilderWithRequiredProps.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -15932,54 +16607,78 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Host runtime version should be set via JSII_AGENT. -type JsiiAgent interface { +// We can generate fancy builders in Java for classes which take a mix of positional & struct parameters. +type SupportsNiceJavaBuilderWithRequiredProps interface { + Bar() *float64 + // some identifier of your choice. + Id() *float64 + PropId() *string } -// The jsii proxy struct for JsiiAgent -type jsiiProxy_JsiiAgent struct { +// The jsii proxy struct for SupportsNiceJavaBuilderWithRequiredProps +type jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps struct { _ byte // padding } -func NewJsiiAgent() JsiiAgent { +func (j *jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps) Bar() *float64 { + var returns *float64 + _jsii_.Get( + j, + "bar", + &returns, + ) + return returns +} + +func (j *jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps) Id() *float64 { + var returns *float64 + _jsii_.Get( + j, + "id", + &returns, + ) + return returns +} + +func (j *jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps) PropId() *string { + var returns *string + _jsii_.Get( + j, + "propId", + &returns, + ) + return returns +} + + +func NewSupportsNiceJavaBuilderWithRequiredProps(id *float64, props *SupportsNiceJavaBuilderProps) SupportsNiceJavaBuilderWithRequiredProps { _init_.Initialize() - j := jsiiProxy_JsiiAgent{} + j := jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps{} _jsii_.Create( - "jsii-calc.JsiiAgent", - nil, // no parameters + "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", + []interface{}{id, props}, &j, ) return &j } -func NewJsiiAgent_Override(j JsiiAgent) { +func NewSupportsNiceJavaBuilderWithRequiredProps_Override(s SupportsNiceJavaBuilderWithRequiredProps, id *float64, props *SupportsNiceJavaBuilderProps) { _init_.Initialize() _jsii_.Create( - "jsii-calc.JsiiAgent", - nil, // no parameters - j, - ) -} - -func JsiiAgent_Value() *string { - _init_.Initialize() - var returns *string - _jsii_.StaticGet( - "jsii-calc.JsiiAgent", - "value", - &returns, + "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", + []interface{}{id, props}, + s, ) - return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JsonFormatter.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/SyncVirtualMethods.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -15988,160 +16687,166 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Make sure structs are un-decorated on the way in. -// See: https://github.com/aws/aws-cdk/issues/5066 -// -type JsonFormatter interface { +type SyncVirtualMethods interface { + A() *float64 + SetA(val *float64) + CallerIsProperty() *float64 + SetCallerIsProperty(val *float64) + OtherProperty() *string + SetOtherProperty(val *string) + ReadonlyProperty() *string + TheProperty() *string + SetTheProperty(val *string) + ValueOfOtherProperty() *string + SetValueOfOtherProperty(val *string) + CallerIsAsync() *float64 + CallerIsMethod() *float64 + ModifyOtherProperty(value *string) + ModifyValueOfTheProperty(value *string) + ReadA() *float64 + RetrieveOtherProperty() *string + RetrieveReadOnlyProperty() *string + RetrieveValueOfTheProperty() *string + VirtualMethod(n *float64) *float64 + WriteA(value *float64) } -// The jsii proxy struct for JsonFormatter -type jsiiProxy_JsonFormatter struct { +// The jsii proxy struct for SyncVirtualMethods +type jsiiProxy_SyncVirtualMethods struct { _ byte // padding } -func JsonFormatter_AnyArray() interface{} { - _init_.Initialize() - - var returns interface{} - - _jsii_.StaticInvoke( - "jsii-calc.JsonFormatter", - "anyArray", - nil, // no parameters +func (j *jsiiProxy_SyncVirtualMethods) A() *float64 { + var returns *float64 + _jsii_.Get( + j, + "a", &returns, ) - return returns } -func JsonFormatter_AnyBooleanFalse() interface{} { - _init_.Initialize() - - var returns interface{} - - _jsii_.StaticInvoke( - "jsii-calc.JsonFormatter", - "anyBooleanFalse", - nil, // no parameters +func (j *jsiiProxy_SyncVirtualMethods) CallerIsProperty() *float64 { + var returns *float64 + _jsii_.Get( + j, + "callerIsProperty", &returns, ) - return returns } -func JsonFormatter_AnyBooleanTrue() interface{} { - _init_.Initialize() - - var returns interface{} - - _jsii_.StaticInvoke( - "jsii-calc.JsonFormatter", - "anyBooleanTrue", - nil, // no parameters +func (j *jsiiProxy_SyncVirtualMethods) OtherProperty() *string { + var returns *string + _jsii_.Get( + j, + "otherProperty", &returns, ) - return returns } -func JsonFormatter_AnyDate() interface{} { - _init_.Initialize() - - var returns interface{} - - _jsii_.StaticInvoke( - "jsii-calc.JsonFormatter", - "anyDate", - nil, // no parameters +func (j *jsiiProxy_SyncVirtualMethods) ReadonlyProperty() *string { + var returns *string + _jsii_.Get( + j, + "readonlyProperty", &returns, ) - return returns } -func JsonFormatter_AnyEmptyString() interface{} { - _init_.Initialize() - - var returns interface{} - - _jsii_.StaticInvoke( - "jsii-calc.JsonFormatter", - "anyEmptyString", - nil, // no parameters +func (j *jsiiProxy_SyncVirtualMethods) TheProperty() *string { + var returns *string + _jsii_.Get( + j, + "theProperty", &returns, ) - return returns } -func JsonFormatter_AnyFunction() interface{} { - _init_.Initialize() - - var returns interface{} - - _jsii_.StaticInvoke( - "jsii-calc.JsonFormatter", - "anyFunction", - nil, // no parameters +func (j *jsiiProxy_SyncVirtualMethods) ValueOfOtherProperty() *string { + var returns *string + _jsii_.Get( + j, + "valueOfOtherProperty", &returns, ) - return returns } -func JsonFormatter_AnyHash() interface{} { + +func NewSyncVirtualMethods() SyncVirtualMethods { _init_.Initialize() - var returns interface{} + j := jsiiProxy_SyncVirtualMethods{} - _jsii_.StaticInvoke( - "jsii-calc.JsonFormatter", - "anyHash", + _jsii_.Create( + "jsii-calc.SyncVirtualMethods", nil, // no parameters - &returns, + &j, ) - return returns + return &j } -func JsonFormatter_AnyNull() interface{} { +func NewSyncVirtualMethods_Override(s SyncVirtualMethods) { _init_.Initialize() - var returns interface{} - - _jsii_.StaticInvoke( - "jsii-calc.JsonFormatter", - "anyNull", + _jsii_.Create( + "jsii-calc.SyncVirtualMethods", nil, // no parameters - &returns, + s, ) - - return returns } -func JsonFormatter_AnyNumber() interface{} { - _init_.Initialize() +func (j *jsiiProxy_SyncVirtualMethods)SetA(val *float64) { + _jsii_.Set( + j, + "a", + val, + ) +} - var returns interface{} +func (j *jsiiProxy_SyncVirtualMethods)SetCallerIsProperty(val *float64) { + _jsii_.Set( + j, + "callerIsProperty", + val, + ) +} - _jsii_.StaticInvoke( - "jsii-calc.JsonFormatter", - "anyNumber", - nil, // no parameters - &returns, +func (j *jsiiProxy_SyncVirtualMethods)SetOtherProperty(val *string) { + _jsii_.Set( + j, + "otherProperty", + val, ) +} - return returns +func (j *jsiiProxy_SyncVirtualMethods)SetTheProperty(val *string) { + _jsii_.Set( + j, + "theProperty", + val, + ) } -func JsonFormatter_AnyRef() interface{} { - _init_.Initialize() +func (j *jsiiProxy_SyncVirtualMethods)SetValueOfOtherProperty(val *string) { + _jsii_.Set( + j, + "valueOfOtherProperty", + val, + ) +} - var returns interface{} +func (s *jsiiProxy_SyncVirtualMethods) CallerIsAsync() *float64 { + var returns *float64 - _jsii_.StaticInvoke( - "jsii-calc.JsonFormatter", - "anyRef", + _jsii_.Invoke( + s, + "callerIsAsync", nil, // no parameters &returns, ) @@ -16149,14 +16854,12 @@ func JsonFormatter_AnyRef() interface{} { return returns } -func JsonFormatter_AnyString() interface{} { - _init_.Initialize() - - var returns interface{} +func (s *jsiiProxy_SyncVirtualMethods) CallerIsMethod() *float64 { + var returns *float64 - _jsii_.StaticInvoke( - "jsii-calc.JsonFormatter", - "anyString", + _jsii_.Invoke( + s, + "callerIsMethod", nil, // no parameters &returns, ) @@ -16164,29 +16867,28 @@ func JsonFormatter_AnyString() interface{} { return returns } -func JsonFormatter_AnyUndefined() interface{} { - _init_.Initialize() - - var returns interface{} - - _jsii_.StaticInvoke( - "jsii-calc.JsonFormatter", - "anyUndefined", - nil, // no parameters - &returns, +func (s *jsiiProxy_SyncVirtualMethods) ModifyOtherProperty(value *string) { + _jsii_.InvokeVoid( + s, + "modifyOtherProperty", + []interface{}{value}, ) - - return returns } -func JsonFormatter_AnyZero() interface{} { - _init_.Initialize() +func (s *jsiiProxy_SyncVirtualMethods) ModifyValueOfTheProperty(value *string) { + _jsii_.InvokeVoid( + s, + "modifyValueOfTheProperty", + []interface{}{value}, + ) +} - var returns interface{} +func (s *jsiiProxy_SyncVirtualMethods) ReadA() *float64 { + var returns *float64 - _jsii_.StaticInvoke( - "jsii-calc.JsonFormatter", - "anyZero", + _jsii_.Invoke( + s, + "readA", nil, // no parameters &returns, ) @@ -16194,166 +16896,70 @@ func JsonFormatter_AnyZero() interface{} { return returns } -func JsonFormatter_Stringify(value interface{}) *string { - _init_.Initialize() - +func (s *jsiiProxy_SyncVirtualMethods) RetrieveOtherProperty() *string { var returns *string - _jsii_.StaticInvoke( - "jsii-calc.JsonFormatter", - "stringify", - []interface{}{value}, + _jsii_.Invoke( + s, + "retrieveOtherProperty", + nil, // no parameters &returns, ) return returns } +func (s *jsiiProxy_SyncVirtualMethods) RetrieveReadOnlyProperty() *string { + var returns *string -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_LevelOne.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -// Validates that nested classes get correct code generation for the occasional forward reference. -type LevelOne interface { - Props() *LevelOneProps -} - -// The jsii proxy struct for LevelOne -type jsiiProxy_LevelOne struct { - _ byte // padding -} - -func (j *jsiiProxy_LevelOne) Props() *LevelOneProps { - var returns *LevelOneProps - _jsii_.Get( - j, - "props", + _jsii_.Invoke( + s, + "retrieveReadOnlyProperty", + nil, // no parameters &returns, ) - return returns -} - - -func NewLevelOne(props *LevelOneProps) LevelOne { - _init_.Initialize() - - j := jsiiProxy_LevelOne{} - - _jsii_.Create( - "jsii-calc.LevelOne", - []interface{}{props}, - &j, - ) - return &j + return returns } -func NewLevelOne_Override(l LevelOne, props *LevelOneProps) { - _init_.Initialize() +func (s *jsiiProxy_SyncVirtualMethods) RetrieveValueOfTheProperty() *string { + var returns *string - _jsii_.Create( - "jsii-calc.LevelOne", - []interface{}{props}, - l, + _jsii_.Invoke( + s, + "retrieveValueOfTheProperty", + nil, // no parameters + &returns, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_LevelOne_PropBooleanValue.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type LevelOne_PropBooleanValue struct { - Value *bool \`field:"required" json:"value" yaml:"value"\` -} - - -`; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_LevelOne_PropProperty.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type LevelOne_PropProperty struct { - Prop *LevelOne_PropBooleanValue \`field:"required" json:"prop" yaml:"prop"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_LevelOneProps.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type LevelOneProps struct { - Prop *LevelOne_PropProperty \`field:"required" json:"prop" yaml:"prop"\` + return returns } +func (s *jsiiProxy_SyncVirtualMethods) VirtualMethod(n *float64) *float64 { + var returns *float64 -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_LoadBalancedFargateServiceProps.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -// jsii#298: show default values in sphinx documentation, and respect newlines. -type LoadBalancedFargateServiceProps struct { - // The container port of the application load balancer attached to your Fargate service. - // - // Corresponds to container port mapping. - ContainerPort *float64 \`field:"optional" json:"containerPort" yaml:"containerPort"\` - // The number of cpu units used by the task. - // - // Valid values, which determines your range of valid values for the memory parameter: - // 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB - // 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB - // 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - // 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments - // 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments - // - // This default is set in the underlying FargateTaskDefinition construct. - Cpu *string \`field:"optional" json:"cpu" yaml:"cpu"\` - // The amount (in MiB) of memory used by the task. - // - // This field is required and you must use one of the following values, which determines your range of valid values - // for the cpu parameter: - // - // 0.5GB, 1GB, 2GB - Available cpu values: 256 (.25 vCPU) - // - // 1GB, 2GB, 3GB, 4GB - Available cpu values: 512 (.5 vCPU) - // - // 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - Available cpu values: 1024 (1 vCPU) - // - // Between 4GB and 16GB in 1GB increments - Available cpu values: 2048 (2 vCPU) - // - // Between 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU) - // - // This default is set in the underlying FargateTaskDefinition construct. - MemoryMiB *string \`field:"optional" json:"memoryMiB" yaml:"memoryMiB"\` - // Determines whether the Application Load Balancer will be internet-facing. - PublicLoadBalancer *bool \`field:"optional" json:"publicLoadBalancer" yaml:"publicLoadBalancer"\` - // Determines whether your Fargate Service will be assigned a public IP address. - PublicTasks *bool \`field:"optional" json:"publicTasks" yaml:"publicTasks"\` + _jsii_.Invoke( + s, + "virtualMethod", + []interface{}{n}, + &returns, + ) + + return returns +} + +func (s *jsiiProxy_SyncVirtualMethods) WriteA(value *float64) { + _jsii_.InvokeVoid( + s, + "writeA", + []interface{}{value}, + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_MethodNamedProperty.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/TestStructWithEnum.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -16362,34 +16968,50 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type MethodNamedProperty interface { - Elite() *float64 - Property() *string +type TestStructWithEnum interface { + // Returns \`foo: StringEnum.A\`. + StructWithFoo() *StructWithEnum + // Returns \`foo: StringEnum.C\` and \`bar: AllTypesEnum.MY_ENUM_VALUE\`. + StructWithFooBar() *StructWithEnum + // Returns true if \`foo\` is \`StringEnum.A\`. + IsStringEnumA(input *StructWithEnum) *bool + // Returns true if \`foo\` is \`StringEnum.B\` and \`bar\` is \`AllTypesEnum.THIS_IS_GREAT\`. + IsStringEnumB(input *StructWithEnum) *bool } -// The jsii proxy struct for MethodNamedProperty -type jsiiProxy_MethodNamedProperty struct { +// The jsii proxy struct for TestStructWithEnum +type jsiiProxy_TestStructWithEnum struct { _ byte // padding } -func (j *jsiiProxy_MethodNamedProperty) Elite() *float64 { - var returns *float64 +func (j *jsiiProxy_TestStructWithEnum) StructWithFoo() *StructWithEnum { + var returns *StructWithEnum _jsii_.Get( j, - "elite", + "structWithFoo", &returns, ) return returns } +func (j *jsiiProxy_TestStructWithEnum) StructWithFooBar() *StructWithEnum { + var returns *StructWithEnum + _jsii_.Get( + j, + "structWithFooBar", + &returns, + ) + return returns +} -func NewMethodNamedProperty() MethodNamedProperty { + +func NewTestStructWithEnum() TestStructWithEnum { _init_.Initialize() - j := jsiiProxy_MethodNamedProperty{} + j := jsiiProxy_TestStructWithEnum{} _jsii_.Create( - "jsii-calc.MethodNamedProperty", + "jsii-calc.TestStructWithEnum", nil, // no parameters &j, ) @@ -16397,23 +17019,36 @@ func NewMethodNamedProperty() MethodNamedProperty { return &j } -func NewMethodNamedProperty_Override(m MethodNamedProperty) { +func NewTestStructWithEnum_Override(t TestStructWithEnum) { _init_.Initialize() _jsii_.Create( - "jsii-calc.MethodNamedProperty", + "jsii-calc.TestStructWithEnum", nil, // no parameters - m, + t, ) } -func (m *jsiiProxy_MethodNamedProperty) Property() *string { - var returns *string +func (t *jsiiProxy_TestStructWithEnum) IsStringEnumA(input *StructWithEnum) *bool { + var returns *bool _jsii_.Invoke( - m, - "property", - nil, // no parameters + t, + "isStringEnumA", + []interface{}{input}, + &returns, + ) + + return returns +} + +func (t *jsiiProxy_TestStructWithEnum) IsStringEnumB(input *StructWithEnum) *bool { + var returns *bool + + _jsii_.Invoke( + t, + "isStringEnumB", + []interface{}{input}, &returns, ) @@ -16423,112 +17058,155 @@ func (m *jsiiProxy_MethodNamedProperty) Property() *string { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Multiply.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/Thrower.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -// The "*" binary operation. -type Multiply interface { - BinaryOperation - IFriendlier - IRandomNumberGenerator - // Left-hand side operand. - Lhs() scopejsiicalclib.NumericValue - // Right-hand side operand. - Rhs() scopejsiicalclib.NumericValue - // The value. - Value() *float64 - // Say farewell. - Farewell() *string - // Say goodbye. - Goodbye() *string - // Say hello! - Hello() *string - // Returns another random number. - Next() *float64 - // String representation of the value. - ToString() *string - // Returns: the name of the class (to verify native type names are created for derived classes). - TypeName() interface{} +type Thrower interface { + ThrowError() } -// The jsii proxy struct for Multiply -type jsiiProxy_Multiply struct { - jsiiProxy_BinaryOperation - jsiiProxy_IFriendlier - jsiiProxy_IRandomNumberGenerator +// The jsii proxy struct for Thrower +type jsiiProxy_Thrower struct { + _ byte // padding } -func (j *jsiiProxy_Multiply) Lhs() scopejsiicalclib.NumericValue { - var returns scopejsiicalclib.NumericValue - _jsii_.Get( - j, - "lhs", - &returns, +func NewThrower() Thrower { + _init_.Initialize() + + j := jsiiProxy_Thrower{} + + _jsii_.Create( + "jsii-calc.Thrower", + nil, // no parameters + &j, ) - return returns + + return &j } -func (j *jsiiProxy_Multiply) Rhs() scopejsiicalclib.NumericValue { - var returns scopejsiicalclib.NumericValue +func NewThrower_Override(t Thrower) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.Thrower", + nil, // no parameters + t, + ) +} + +func (t *jsiiProxy_Thrower) ThrowError() { + _jsii_.InvokeVoid( + t, + "throwError", + nil, // no parameters + ) +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/TopLevelStruct.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + + +type TopLevelStruct struct { + // This is a required field. + Required *string \`field:"required" json:"required" yaml:"required"\` + // A union to really stress test our serialization. + SecondLevel interface{} \`field:"required" json:"secondLevel" yaml:"secondLevel"\` + // You don't have to pass this. + Optional *string \`field:"optional" json:"optional" yaml:"optional"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/TwoMethodsWithSimilarCapitalization.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +// In TypeScript it is possible to have two methods with the same name but different capitalization. +// See: https://github.com/aws/jsii/issues/2508 +// +type TwoMethodsWithSimilarCapitalization interface { + FooBar() *float64 + // Deprecated: YES. + FooBAR() *float64 + ToIsoString() *string + // Deprecated: python requires that all alternatives are deprecated. + ToIsOString() *string + // Deprecated: python requires that all alternatives are deprecated. + ToISOString() *string +} + +// The jsii proxy struct for TwoMethodsWithSimilarCapitalization +type jsiiProxy_TwoMethodsWithSimilarCapitalization struct { + _ byte // padding +} + +func (j *jsiiProxy_TwoMethodsWithSimilarCapitalization) FooBar() *float64 { + var returns *float64 _jsii_.Get( j, - "rhs", + "fooBar", &returns, ) return returns } -func (j *jsiiProxy_Multiply) Value() *float64 { +func (j *jsiiProxy_TwoMethodsWithSimilarCapitalization) FooBAR() *float64 { var returns *float64 _jsii_.Get( j, - "value", + "fooBAR", &returns, ) return returns } -// Creates a BinaryOperation. -func NewMultiply(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) Multiply { +func NewTwoMethodsWithSimilarCapitalization() TwoMethodsWithSimilarCapitalization { _init_.Initialize() - j := jsiiProxy_Multiply{} + j := jsiiProxy_TwoMethodsWithSimilarCapitalization{} _jsii_.Create( - "jsii-calc.Multiply", - []interface{}{lhs, rhs}, + "jsii-calc.TwoMethodsWithSimilarCapitalization", + nil, // no parameters &j, ) return &j } -// Creates a BinaryOperation. -func NewMultiply_Override(m Multiply, lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) { +func NewTwoMethodsWithSimilarCapitalization_Override(t TwoMethodsWithSimilarCapitalization) { _init_.Initialize() _jsii_.Create( - "jsii-calc.Multiply", - []interface{}{lhs, rhs}, - m, + "jsii-calc.TwoMethodsWithSimilarCapitalization", + nil, // no parameters + t, ) } -func (m *jsiiProxy_Multiply) Farewell() *string { +func (t *jsiiProxy_TwoMethodsWithSimilarCapitalization) ToIsoString() *string { var returns *string _jsii_.Invoke( - m, - "farewell", + t, + "toIsoString", nil, // no parameters &returns, ) @@ -16536,12 +17214,12 @@ func (m *jsiiProxy_Multiply) Farewell() *string { return returns } -func (m *jsiiProxy_Multiply) Goodbye() *string { +func (t *jsiiProxy_TwoMethodsWithSimilarCapitalization) ToIsOString() *string { var returns *string _jsii_.Invoke( - m, - "goodbye", + t, + "toIsOString", nil, // no parameters &returns, ) @@ -16549,12 +17227,12 @@ func (m *jsiiProxy_Multiply) Goodbye() *string { return returns } -func (m *jsiiProxy_Multiply) Hello() *string { +func (t *jsiiProxy_TwoMethodsWithSimilarCapitalization) ToISOString() *string { var returns *string _jsii_.Invoke( - m, - "hello", + t, + "toISOString", nil, // no parameters &returns, ) @@ -16562,38 +17240,38 @@ func (m *jsiiProxy_Multiply) Hello() *string { return returns } -func (m *jsiiProxy_Multiply) Next() *float64 { - var returns *float64 - _jsii_.Invoke( - m, - "next", - nil, // no parameters - &returns, - ) +`; - return returns -} +exports[`Generated code for "jsii-calc": /go/jsiicalc/UmaskCheck.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -func (m *jsiiProxy_Multiply) ToString() *string { - var returns *string +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) - _jsii_.Invoke( - m, - "toString", - nil, // no parameters - &returns, - ) +// Checks the current file permissions are cool (no funky UMASK down-scoping happened). +// See: https://github.com/aws/jsii/issues/1765 +// +type UmaskCheck interface { +} - return returns +// The jsii proxy struct for UmaskCheck +type jsiiProxy_UmaskCheck struct { + _ byte // padding } -func (m *jsiiProxy_Multiply) TypeName() interface{} { - var returns interface{} +// This should return 0o644 (-rw-r--r--). +func UmaskCheck_Mode() *float64 { + _init_.Initialize() - _jsii_.Invoke( - m, - "typeName", + var returns *float64 + + _jsii_.StaticInvoke( + "jsii-calc.UmaskCheck", + "mode", nil, // no parameters &returns, ) @@ -16604,7 +17282,7 @@ func (m *jsiiProxy_Multiply) TypeName() interface{} { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Negate.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/UnaryOperation.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -16612,35 +17290,30 @@ import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -// The negation operation ("-value"). -type Negate interface { - UnaryOperation - IFriendlier +// An operation on a single operand. +type UnaryOperation interface { + scopejsiicalclib.Operation Operand() scopejsiicalclib.NumericValue // The value. + // Deprecated. Value() *float64 - // Say farewell. - Farewell() *string - // Say goodbye. - Goodbye() *string - // Say hello! - Hello() *string // String representation of the value. + // Deprecated. ToString() *string // Returns: the name of the class (to verify native type names are created for derived classes). TypeName() interface{} } -// The jsii proxy struct for Negate -type jsiiProxy_Negate struct { - jsiiProxy_UnaryOperation - jsiiProxy_IFriendlier +// The jsii proxy struct for UnaryOperation +type jsiiProxy_UnaryOperation struct { + internal.Type__scopejsiicalclibOperation } -func (j *jsiiProxy_Negate) Operand() scopejsiicalclib.NumericValue { +func (j *jsiiProxy_UnaryOperation) Operand() scopejsiicalclib.NumericValue { var returns scopejsiicalclib.NumericValue _jsii_.Get( j, @@ -16650,7 +17323,7 @@ func (j *jsiiProxy_Negate) Operand() scopejsiicalclib.NumericValue { return returns } -func (j *jsiiProxy_Negate) Value() *float64 { +func (j *jsiiProxy_UnaryOperation) Value() *float64 { var returns *float64 _jsii_.Get( j, @@ -16661,74 +17334,21 @@ func (j *jsiiProxy_Negate) Value() *float64 { } -func NewNegate(operand scopejsiicalclib.NumericValue) Negate { - _init_.Initialize() - - j := jsiiProxy_Negate{} - - _jsii_.Create( - "jsii-calc.Negate", - []interface{}{operand}, - &j, - ) - - return &j -} - -func NewNegate_Override(n Negate, operand scopejsiicalclib.NumericValue) { +func NewUnaryOperation_Override(u UnaryOperation, operand scopejsiicalclib.NumericValue) { _init_.Initialize() _jsii_.Create( - "jsii-calc.Negate", + "jsii-calc.UnaryOperation", []interface{}{operand}, - n, - ) -} - -func (n *jsiiProxy_Negate) Farewell() *string { - var returns *string - - _jsii_.Invoke( - n, - "farewell", - nil, // no parameters - &returns, - ) - - return returns -} - -func (n *jsiiProxy_Negate) Goodbye() *string { - var returns *string - - _jsii_.Invoke( - n, - "goodbye", - nil, // no parameters - &returns, - ) - - return returns -} - -func (n *jsiiProxy_Negate) Hello() *string { - var returns *string - - _jsii_.Invoke( - n, - "hello", - nil, // no parameters - &returns, + u, ) - - return returns } -func (n *jsiiProxy_Negate) ToString() *string { +func (u *jsiiProxy_UnaryOperation) ToString() *string { var returns *string _jsii_.Invoke( - n, + u, "toString", nil, // no parameters &returns, @@ -16737,11 +17357,11 @@ func (n *jsiiProxy_Negate) ToString() *string { return returns } -func (n *jsiiProxy_Negate) TypeName() interface{} { +func (u *jsiiProxy_UnaryOperation) TypeName() interface{} { var returns interface{} _jsii_.Invoke( - n, + u, "typeName", nil, // no parameters &returns, @@ -16753,155 +17373,139 @@ func (n *jsiiProxy_Negate) TypeName() interface{} { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_NestedClassInstance.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/customsubmodulename" -) - -type NestedClassInstance interface { -} - -// The jsii proxy struct for NestedClassInstance -type jsiiProxy_NestedClassInstance struct { - _ byte // padding -} - -func NestedClassInstance_MakeInstance() customsubmodulename.NestingClass_NestedClass { - _init_.Initialize() - - var returns customsubmodulename.NestingClass_NestedClass - - _jsii_.StaticInvoke( - "jsii-calc.NestedClassInstance", - "makeInstance", - nil, // no parameters - &returns, - ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_NestedStruct.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/UnionProperties.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc -type NestedStruct struct { - // When provided, must be > 0. - NumberProp *float64 \`field:"required" json:"numberProp" yaml:"numberProp"\` +type UnionProperties struct { + Bar interface{} \`field:"required" json:"bar" yaml:"bar"\` + Foo interface{} \`field:"optional" json:"foo" yaml:"foo"\` } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_NodeStandardLibrary.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/UpcasingReflectable.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/customsubmodulename" ) -// Test fixture to verify that jsii modules can use the node standard library. -type NodeStandardLibrary interface { - // Returns the current os.platform() from the "os" node module. - OsPlatform() *string - // Uses node.js "crypto" module to calculate sha256 of a string. - // - // Returns: "6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50". - CryptoSha256() *string - // Reads a local resource file (resource.txt) asynchronously. - // - // Returns: "Hello, resource!" - FsReadFile() *string - // Sync version of fsReadFile. - // - // Returns: "Hello, resource! SYNC!" - FsReadFileSync() *string +// Ensures submodule-imported types from dependencies can be used correctly. +type UpcasingReflectable interface { + customsubmodulename.IReflectable + Entries() *[]*customsubmodulename.ReflectableEntry } -// The jsii proxy struct for NodeStandardLibrary -type jsiiProxy_NodeStandardLibrary struct { - _ byte // padding +// The jsii proxy struct for UpcasingReflectable +type jsiiProxy_UpcasingReflectable struct { + internal.Type__customsubmodulenameIReflectable } -func (j *jsiiProxy_NodeStandardLibrary) OsPlatform() *string { - var returns *string +func (j *jsiiProxy_UpcasingReflectable) Entries() *[]*customsubmodulename.ReflectableEntry { + var returns *[]*customsubmodulename.ReflectableEntry _jsii_.Get( j, - "osPlatform", + "entries", &returns, ) return returns } -func NewNodeStandardLibrary() NodeStandardLibrary { +func NewUpcasingReflectable(delegate *map[string]interface{}) UpcasingReflectable { _init_.Initialize() - j := jsiiProxy_NodeStandardLibrary{} + j := jsiiProxy_UpcasingReflectable{} _jsii_.Create( - "jsii-calc.NodeStandardLibrary", - nil, // no parameters + "jsii-calc.UpcasingReflectable", + []interface{}{delegate}, &j, ) return &j } -func NewNodeStandardLibrary_Override(n NodeStandardLibrary) { +func NewUpcasingReflectable_Override(u UpcasingReflectable, delegate *map[string]interface{}) { _init_.Initialize() _jsii_.Create( - "jsii-calc.NodeStandardLibrary", - nil, // no parameters - n, + "jsii-calc.UpcasingReflectable", + []interface{}{delegate}, + u, ) } -func (n *jsiiProxy_NodeStandardLibrary) CryptoSha256() *string { - var returns *string +func UpcasingReflectable_Reflector() customsubmodulename.Reflector { + _init_.Initialize() + var returns customsubmodulename.Reflector + _jsii_.StaticGet( + "jsii-calc.UpcasingReflectable", + "reflector", + &returns, + ) + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/UseBundledDependency.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type UseBundledDependency interface { + Value() interface{} +} + +// The jsii proxy struct for UseBundledDependency +type jsiiProxy_UseBundledDependency struct { + _ byte // padding +} + +func NewUseBundledDependency() UseBundledDependency { + _init_.Initialize() + + j := jsiiProxy_UseBundledDependency{} - _jsii_.Invoke( - n, - "cryptoSha256", + _jsii_.Create( + "jsii-calc.UseBundledDependency", nil, // no parameters - &returns, + &j, ) - return returns + return &j } -func (n *jsiiProxy_NodeStandardLibrary) FsReadFile() *string { - var returns *string +func NewUseBundledDependency_Override(u UseBundledDependency) { + _init_.Initialize() - _jsii_.Invoke( - n, - "fsReadFile", + _jsii_.Create( + "jsii-calc.UseBundledDependency", nil, // no parameters - &returns, + u, ) - - return returns } -func (n *jsiiProxy_NodeStandardLibrary) FsReadFileSync() *string { - var returns *string +func (u *jsiiProxy_UseBundledDependency) Value() interface{} { + var returns interface{} _jsii_.Invoke( - n, - "fsReadFileSync", + u, + "value", nil, // no parameters &returns, ) @@ -16912,113 +17516,68 @@ func (n *jsiiProxy_NodeStandardLibrary) FsReadFileSync() *string { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_NullShouldBeTreatedAsUndefined.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/UseCalcBase.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/jcb" ) -// jsii#282, aws-cdk#157: null should be treated as "undefined". -type NullShouldBeTreatedAsUndefined interface { - ChangeMeToUndefined() *string - SetChangeMeToUndefined(val *string) - GiveMeUndefined(value interface{}) - GiveMeUndefinedInsideAnObject(input *NullShouldBeTreatedAsUndefinedData) - VerifyPropertyIsUndefined() +// Depend on a type from jsii-calc-base as a test for awslabs/jsii#128. +type UseCalcBase interface { + Hello() jcb.Base } -// The jsii proxy struct for NullShouldBeTreatedAsUndefined -type jsiiProxy_NullShouldBeTreatedAsUndefined struct { +// The jsii proxy struct for UseCalcBase +type jsiiProxy_UseCalcBase struct { _ byte // padding } -func (j *jsiiProxy_NullShouldBeTreatedAsUndefined) ChangeMeToUndefined() *string { - var returns *string - _jsii_.Get( - j, - "changeMeToUndefined", - &returns, - ) - return returns -} - - -func NewNullShouldBeTreatedAsUndefined(_param1 *string, optional interface{}) NullShouldBeTreatedAsUndefined { +func NewUseCalcBase() UseCalcBase { _init_.Initialize() - j := jsiiProxy_NullShouldBeTreatedAsUndefined{} + j := jsiiProxy_UseCalcBase{} _jsii_.Create( - "jsii-calc.NullShouldBeTreatedAsUndefined", - []interface{}{_param1, optional}, + "jsii-calc.UseCalcBase", + nil, // no parameters &j, ) return &j } -func NewNullShouldBeTreatedAsUndefined_Override(n NullShouldBeTreatedAsUndefined, _param1 *string, optional interface{}) { +func NewUseCalcBase_Override(u UseCalcBase) { _init_.Initialize() _jsii_.Create( - "jsii-calc.NullShouldBeTreatedAsUndefined", - []interface{}{_param1, optional}, - n, - ) -} - -func (j *jsiiProxy_NullShouldBeTreatedAsUndefined)SetChangeMeToUndefined(val *string) { - _jsii_.Set( - j, - "changeMeToUndefined", - val, - ) -} - -func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) GiveMeUndefined(value interface{}) { - _jsii_.InvokeVoid( - n, - "giveMeUndefined", - []interface{}{value}, + "jsii-calc.UseCalcBase", + nil, // no parameters + u, ) } -func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) GiveMeUndefinedInsideAnObject(input *NullShouldBeTreatedAsUndefinedData) { - _jsii_.InvokeVoid( - n, - "giveMeUndefinedInsideAnObject", - []interface{}{input}, - ) -} +func (u *jsiiProxy_UseCalcBase) Hello() jcb.Base { + var returns jcb.Base -func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) VerifyPropertyIsUndefined() { - _jsii_.InvokeVoid( - n, - "verifyPropertyIsUndefined", + _jsii_.Invoke( + u, + "hello", nil, // no parameters + &returns, ) -} - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_NullShouldBeTreatedAsUndefinedData.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type NullShouldBeTreatedAsUndefinedData struct { - ArrayWithThreeElementsAndUndefinedAsSecondArgument *[]interface{} \`field:"required" json:"arrayWithThreeElementsAndUndefinedAsSecondArgument" yaml:"arrayWithThreeElementsAndUndefinedAsSecondArgument"\` - ThisShouldBeUndefined interface{} \`field:"optional" json:"thisShouldBeUndefined" yaml:"thisShouldBeUndefined"\` + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_NumberGenerator.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/UsesInterfaceWithProperties.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -17027,82 +17586,86 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// This allows us to test that a reference can be stored for objects that implement interfaces. -type NumberGenerator interface { - Generator() IRandomNumberGenerator - SetGenerator(val IRandomNumberGenerator) - IsSameGenerator(gen IRandomNumberGenerator) *bool - NextTimes100() *float64 +type UsesInterfaceWithProperties interface { + Obj() IInterfaceWithProperties + JustRead() *string + ReadStringAndNumber(ext IInterfaceWithPropertiesExtension) *string + WriteAndRead(value *string) *string } -// The jsii proxy struct for NumberGenerator -type jsiiProxy_NumberGenerator struct { +// The jsii proxy struct for UsesInterfaceWithProperties +type jsiiProxy_UsesInterfaceWithProperties struct { _ byte // padding } -func (j *jsiiProxy_NumberGenerator) Generator() IRandomNumberGenerator { - var returns IRandomNumberGenerator +func (j *jsiiProxy_UsesInterfaceWithProperties) Obj() IInterfaceWithProperties { + var returns IInterfaceWithProperties _jsii_.Get( j, - "generator", + "obj", &returns, ) return returns } -func NewNumberGenerator(generator IRandomNumberGenerator) NumberGenerator { +func NewUsesInterfaceWithProperties(obj IInterfaceWithProperties) UsesInterfaceWithProperties { _init_.Initialize() - j := jsiiProxy_NumberGenerator{} + j := jsiiProxy_UsesInterfaceWithProperties{} _jsii_.Create( - "jsii-calc.NumberGenerator", - []interface{}{generator}, + "jsii-calc.UsesInterfaceWithProperties", + []interface{}{obj}, &j, ) return &j } -func NewNumberGenerator_Override(n NumberGenerator, generator IRandomNumberGenerator) { +func NewUsesInterfaceWithProperties_Override(u UsesInterfaceWithProperties, obj IInterfaceWithProperties) { _init_.Initialize() _jsii_.Create( - "jsii-calc.NumberGenerator", - []interface{}{generator}, - n, + "jsii-calc.UsesInterfaceWithProperties", + []interface{}{obj}, + u, ) } -func (j *jsiiProxy_NumberGenerator)SetGenerator(val IRandomNumberGenerator) { - _jsii_.Set( - j, - "generator", - val, +func (u *jsiiProxy_UsesInterfaceWithProperties) JustRead() *string { + var returns *string + + _jsii_.Invoke( + u, + "justRead", + nil, // no parameters + &returns, ) + + return returns } -func (n *jsiiProxy_NumberGenerator) IsSameGenerator(gen IRandomNumberGenerator) *bool { - var returns *bool +func (u *jsiiProxy_UsesInterfaceWithProperties) ReadStringAndNumber(ext IInterfaceWithPropertiesExtension) *string { + var returns *string _jsii_.Invoke( - n, - "isSameGenerator", - []interface{}{gen}, + u, + "readStringAndNumber", + []interface{}{ext}, &returns, ) return returns } -func (n *jsiiProxy_NumberGenerator) NextTimes100() *float64 { - var returns *float64 +func (u *jsiiProxy_UsesInterfaceWithProperties) WriteAndRead(value *string) *string { + var returns *string _jsii_.Invoke( - n, - "nextTimes100", - nil, // no parameters + u, + "writeAndRead", + []interface{}{value}, &returns, ) @@ -17112,74 +17675,60 @@ func (n *jsiiProxy_NumberGenerator) NextTimes100() *float64 { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ObjectRefsInCollections.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/VariadicInvoker.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -// Verify that object references can be passed inside collections. -type ObjectRefsInCollections interface { - // Returns the sum of all values. - SumFromArray(values *[]scopejsiicalclib.NumericValue) *float64 - // Returns the sum of all values in a map. - SumFromMap(values *map[string]scopejsiicalclib.NumericValue) *float64 +type VariadicInvoker interface { + AsArray(values ...*float64) *[]*float64 } -// The jsii proxy struct for ObjectRefsInCollections -type jsiiProxy_ObjectRefsInCollections struct { +// The jsii proxy struct for VariadicInvoker +type jsiiProxy_VariadicInvoker struct { _ byte // padding } -func NewObjectRefsInCollections() ObjectRefsInCollections { +func NewVariadicInvoker(method VariadicMethod) VariadicInvoker { _init_.Initialize() - j := jsiiProxy_ObjectRefsInCollections{} + j := jsiiProxy_VariadicInvoker{} _jsii_.Create( - "jsii-calc.ObjectRefsInCollections", - nil, // no parameters + "jsii-calc.VariadicInvoker", + []interface{}{method}, &j, ) return &j } -func NewObjectRefsInCollections_Override(o ObjectRefsInCollections) { +func NewVariadicInvoker_Override(v VariadicInvoker, method VariadicMethod) { _init_.Initialize() _jsii_.Create( - "jsii-calc.ObjectRefsInCollections", - nil, // no parameters - o, + "jsii-calc.VariadicInvoker", + []interface{}{method}, + v, ) } -func (o *jsiiProxy_ObjectRefsInCollections) SumFromArray(values *[]scopejsiicalclib.NumericValue) *float64 { - var returns *float64 - - _jsii_.Invoke( - o, - "sumFromArray", - []interface{}{values}, - &returns, - ) - - return returns -} +func (v *jsiiProxy_VariadicInvoker) AsArray(values ...*float64) *[]*float64 { + args := []interface{}{} + for _, a := range values { + args = append(args, a) + } -func (o *jsiiProxy_ObjectRefsInCollections) SumFromMap(values *map[string]scopejsiicalclib.NumericValue) *float64 { - var returns *float64 + var returns *[]*float64 _jsii_.Invoke( - o, - "sumFromMap", - []interface{}{values}, + v, + "asArray", + args, &returns, ) @@ -17189,7 +17738,7 @@ func (o *jsiiProxy_ObjectRefsInCollections) SumFromMap(values *map[string]scopej `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ObjectWithPropertyProvider.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/VariadicMethod.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -17198,23 +17747,61 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type ObjectWithPropertyProvider interface { +type VariadicMethod interface { + AsArray(first *float64, others ...*float64) *[]*float64 } -// The jsii proxy struct for ObjectWithPropertyProvider -type jsiiProxy_ObjectWithPropertyProvider struct { +// The jsii proxy struct for VariadicMethod +type jsiiProxy_VariadicMethod struct { _ byte // padding } -func ObjectWithPropertyProvider_Provide() IObjectWithProperty { +func NewVariadicMethod(prefix ...*float64) VariadicMethod { _init_.Initialize() - var returns IObjectWithProperty + args := []interface{}{} + for _, a := range prefix { + args = append(args, a) + } - _jsii_.StaticInvoke( - "jsii-calc.ObjectWithPropertyProvider", - "provide", - nil, // no parameters + j := jsiiProxy_VariadicMethod{} + + _jsii_.Create( + "jsii-calc.VariadicMethod", + args, + &j, + ) + + return &j +} + +func NewVariadicMethod_Override(v VariadicMethod, prefix ...*float64) { + _init_.Initialize() + + args := []interface{}{} + for _, a := range prefix { + args = append(args, a) + } + + _jsii_.Create( + "jsii-calc.VariadicMethod", + args, + v, + ) +} + +func (v *jsiiProxy_VariadicMethod) AsArray(first *float64, others ...*float64) *[]*float64 { + args := []interface{}{first} + for _, a := range others { + args = append(args, a) + } + + var returns *[]*float64 + + _jsii_.Invoke( + v, + "asArray", + args, &returns, ) @@ -17224,7 +17811,7 @@ func ObjectWithPropertyProvider_Provide() IObjectWithProperty { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Old.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/VariadicTypeUnion.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -17233,61 +17820,73 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Old class. -// Deprecated: Use the new class or the old class whatever you want because -// whatever you like is always the best. -type Old interface { - // Doo wop that thing. - // Deprecated: Use the new class or the old class whatever you want because - // whatever you like is always the best. - DoAThing() +type VariadicTypeUnion interface { + Union() *[]interface{} + SetUnion(val *[]interface{}) } -// The jsii proxy struct for Old -type jsiiProxy_Old struct { +// The jsii proxy struct for VariadicTypeUnion +type jsiiProxy_VariadicTypeUnion struct { _ byte // padding } -// Deprecated: Use the new class or the old class whatever you want because -// whatever you like is always the best. -func NewOld() Old { +func (j *jsiiProxy_VariadicTypeUnion) Union() *[]interface{} { + var returns *[]interface{} + _jsii_.Get( + j, + "union", + &returns, + ) + return returns +} + + +func NewVariadicTypeUnion(union ...interface{}) VariadicTypeUnion { _init_.Initialize() - j := jsiiProxy_Old{} + args := []interface{}{} + for _, a := range union { + args = append(args, a) + } + + j := jsiiProxy_VariadicTypeUnion{} _jsii_.Create( - "jsii-calc.Old", - nil, // no parameters + "jsii-calc.VariadicTypeUnion", + args, &j, ) return &j } -// Deprecated: Use the new class or the old class whatever you want because -// whatever you like is always the best. -func NewOld_Override(o Old) { +func NewVariadicTypeUnion_Override(v VariadicTypeUnion, union ...interface{}) { _init_.Initialize() + args := []interface{}{} + for _, a := range union { + args = append(args, a) + } + _jsii_.Create( - "jsii-calc.Old", - nil, // no parameters - o, + "jsii-calc.VariadicTypeUnion", + args, + v, ) } -func (o *jsiiProxy_Old) DoAThing() { - _jsii_.InvokeVoid( - o, - "doAThing", - nil, // no parameters +func (j *jsiiProxy_VariadicTypeUnion)SetUnion(val *[]interface{}) { + _jsii_.Set( + j, + "union", + val, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OptionalArgumentInvoker.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/VirtualMethodPlayground.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -17296,152 +17895,112 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type OptionalArgumentInvoker interface { - InvokeWithOptional() - InvokeWithoutOptional() +type VirtualMethodPlayground interface { + OverrideMeAsync(index *float64) *float64 + OverrideMeSync(index *float64) *float64 + ParallelSumAsync(count *float64) *float64 + SerialSumAsync(count *float64) *float64 + SumSync(count *float64) *float64 } -// The jsii proxy struct for OptionalArgumentInvoker -type jsiiProxy_OptionalArgumentInvoker struct { +// The jsii proxy struct for VirtualMethodPlayground +type jsiiProxy_VirtualMethodPlayground struct { _ byte // padding } -func NewOptionalArgumentInvoker(delegate IInterfaceWithOptionalMethodArguments) OptionalArgumentInvoker { +func NewVirtualMethodPlayground() VirtualMethodPlayground { _init_.Initialize() - j := jsiiProxy_OptionalArgumentInvoker{} + j := jsiiProxy_VirtualMethodPlayground{} _jsii_.Create( - "jsii-calc.OptionalArgumentInvoker", - []interface{}{delegate}, + "jsii-calc.VirtualMethodPlayground", + nil, // no parameters &j, ) return &j } -func NewOptionalArgumentInvoker_Override(o OptionalArgumentInvoker, delegate IInterfaceWithOptionalMethodArguments) { +func NewVirtualMethodPlayground_Override(v VirtualMethodPlayground) { _init_.Initialize() _jsii_.Create( - "jsii-calc.OptionalArgumentInvoker", - []interface{}{delegate}, - o, - ) -} - -func (o *jsiiProxy_OptionalArgumentInvoker) InvokeWithOptional() { - _jsii_.InvokeVoid( - o, - "invokeWithOptional", - nil, // no parameters - ) -} - -func (o *jsiiProxy_OptionalArgumentInvoker) InvokeWithoutOptional() { - _jsii_.InvokeVoid( - o, - "invokeWithoutOptional", + "jsii-calc.VirtualMethodPlayground", nil, // no parameters + v, ) } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OptionalConstructorArgument.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - "time" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type OptionalConstructorArgument interface { - Arg1() *float64 - Arg2() *string - Arg3() *time.Time -} - -// The jsii proxy struct for OptionalConstructorArgument -type jsiiProxy_OptionalConstructorArgument struct { - _ byte // padding -} - -func (j *jsiiProxy_OptionalConstructorArgument) Arg1() *float64 { +func (v *jsiiProxy_VirtualMethodPlayground) OverrideMeAsync(index *float64) *float64 { var returns *float64 - _jsii_.Get( - j, - "arg1", - &returns, - ) - return returns -} -func (j *jsiiProxy_OptionalConstructorArgument) Arg2() *string { - var returns *string - _jsii_.Get( - j, - "arg2", + _jsii_.Invoke( + v, + "overrideMeAsync", + []interface{}{index}, &returns, ) + return returns } -func (j *jsiiProxy_OptionalConstructorArgument) Arg3() *time.Time { - var returns *time.Time - _jsii_.Get( - j, - "arg3", +func (v *jsiiProxy_VirtualMethodPlayground) OverrideMeSync(index *float64) *float64 { + var returns *float64 + + _jsii_.Invoke( + v, + "overrideMeSync", + []interface{}{index}, &returns, ) + return returns } +func (v *jsiiProxy_VirtualMethodPlayground) ParallelSumAsync(count *float64) *float64 { + var returns *float64 -func NewOptionalConstructorArgument(arg1 *float64, arg2 *string, arg3 *time.Time) OptionalConstructorArgument { - _init_.Initialize() - - j := jsiiProxy_OptionalConstructorArgument{} - - _jsii_.Create( - "jsii-calc.OptionalConstructorArgument", - []interface{}{arg1, arg2, arg3}, - &j, + _jsii_.Invoke( + v, + "parallelSumAsync", + []interface{}{count}, + &returns, ) - return &j + return returns } -func NewOptionalConstructorArgument_Override(o OptionalConstructorArgument, arg1 *float64, arg2 *string, arg3 *time.Time) { - _init_.Initialize() +func (v *jsiiProxy_VirtualMethodPlayground) SerialSumAsync(count *float64) *float64 { + var returns *float64 - _jsii_.Create( - "jsii-calc.OptionalConstructorArgument", - []interface{}{arg1, arg2, arg3}, - o, + _jsii_.Invoke( + v, + "serialSumAsync", + []interface{}{count}, + &returns, ) -} + return returns +} -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OptionalStruct.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +func (v *jsiiProxy_VirtualMethodPlayground) SumSync(count *float64) *float64 { + var returns *float64 + _jsii_.Invoke( + v, + "sumSync", + []interface{}{count}, + &returns, + ) -type OptionalStruct struct { - Field *string \`field:"optional" json:"field" yaml:"field"\` + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OptionalStructConsumer.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/VoidCallback.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -17450,65 +18009,63 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type OptionalStructConsumer interface { - FieldValue() *string - ParameterWasUndefined() *bool +// This test is used to validate the runtimes can return correctly from a void callback. +// +// - Implement \`overrideMe\` (method does not have to do anything). +// - Invoke \`callMe\` +// - Verify that \`methodWasCalled\` is \`true\`. +type VoidCallback interface { + MethodWasCalled() *bool + CallMe() + OverrideMe() } -// The jsii proxy struct for OptionalStructConsumer -type jsiiProxy_OptionalStructConsumer struct { +// The jsii proxy struct for VoidCallback +type jsiiProxy_VoidCallback struct { _ byte // padding } -func (j *jsiiProxy_OptionalStructConsumer) FieldValue() *string { - var returns *string - _jsii_.Get( - j, - "fieldValue", - &returns, - ) - return returns -} - -func (j *jsiiProxy_OptionalStructConsumer) ParameterWasUndefined() *bool { +func (j *jsiiProxy_VoidCallback) MethodWasCalled() *bool { var returns *bool _jsii_.Get( j, - "parameterWasUndefined", + "methodWasCalled", &returns, ) return returns } -func NewOptionalStructConsumer(optionalStruct *OptionalStruct) OptionalStructConsumer { +func NewVoidCallback_Override(v VoidCallback) { _init_.Initialize() - j := jsiiProxy_OptionalStructConsumer{} - _jsii_.Create( - "jsii-calc.OptionalStructConsumer", - []interface{}{optionalStruct}, - &j, + "jsii-calc.VoidCallback", + nil, // no parameters + v, ) - - return &j } -func NewOptionalStructConsumer_Override(o OptionalStructConsumer, optionalStruct *OptionalStruct) { - _init_.Initialize() +func (v *jsiiProxy_VoidCallback) CallMe() { + _jsii_.InvokeVoid( + v, + "callMe", + nil, // no parameters + ) +} - _jsii_.Create( - "jsii-calc.OptionalStructConsumer", - []interface{}{optionalStruct}, - o, +func (v *jsiiProxy_VoidCallback) OverrideMe() { + _jsii_.InvokeVoid( + v, + "overrideMe", + nil, // no parameters ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OverridableProtectedMember.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/WithPrivatePropertyInConstructor.go 1`] = ` // A simple calcuator built on JSII. package jsiicalc @@ -17517,81 +18074,76 @@ import ( _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// See: https://github.com/aws/jsii/issues/903 -// -type OverridableProtectedMember interface { - OverrideReadOnly() *string - OverrideReadWrite() *string - SetOverrideReadWrite(val *string) - OverrideMe() *string - SwitchModes() - ValueFromProtected() *string +// Verifies that private property declarations in constructor arguments are hidden. +type WithPrivatePropertyInConstructor interface { + Success() *bool } -// The jsii proxy struct for OverridableProtectedMember -type jsiiProxy_OverridableProtectedMember struct { +// The jsii proxy struct for WithPrivatePropertyInConstructor +type jsiiProxy_WithPrivatePropertyInConstructor struct { _ byte // padding } -func (j *jsiiProxy_OverridableProtectedMember) OverrideReadOnly() *string { - var returns *string - _jsii_.Get( - j, - "overrideReadOnly", - &returns, - ) - return returns -} - -func (j *jsiiProxy_OverridableProtectedMember) OverrideReadWrite() *string { - var returns *string +func (j *jsiiProxy_WithPrivatePropertyInConstructor) Success() *bool { + var returns *bool _jsii_.Get( j, - "overrideReadWrite", + "success", &returns, ) return returns } -func NewOverridableProtectedMember() OverridableProtectedMember { +func NewWithPrivatePropertyInConstructor(privateField *string) WithPrivatePropertyInConstructor { _init_.Initialize() - j := jsiiProxy_OverridableProtectedMember{} + j := jsiiProxy_WithPrivatePropertyInConstructor{} _jsii_.Create( - "jsii-calc.OverridableProtectedMember", - nil, // no parameters + "jsii-calc.WithPrivatePropertyInConstructor", + []interface{}{privateField}, &j, ) return &j } -func NewOverridableProtectedMember_Override(o OverridableProtectedMember) { +func NewWithPrivatePropertyInConstructor_Override(w WithPrivatePropertyInConstructor, privateField *string) { _init_.Initialize() _jsii_.Create( - "jsii-calc.OverridableProtectedMember", - nil, // no parameters - o, + "jsii-calc.WithPrivatePropertyInConstructor", + []interface{}{privateField}, + w, ) } -func (j *jsiiProxy_OverridableProtectedMember)SetOverrideReadWrite(val *string) { - _jsii_.Set( - j, - "overrideReadWrite", - val, - ) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/IOptionA.go 1`] = ` +package anonymous + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +type IOptionA interface { + DoSomething() *string } -func (o *jsiiProxy_OverridableProtectedMember) OverrideMe() *string { +// The jsii proxy for IOptionA +type jsiiProxy_IOptionA struct { + _ byte // padding +} + +func (i *jsiiProxy_IOptionA) DoSomething() *string { var returns *string _jsii_.Invoke( - o, - "overrideMe", + i, + "doSomething", nil, // no parameters &returns, ) @@ -17599,20 +18151,31 @@ func (o *jsiiProxy_OverridableProtectedMember) OverrideMe() *string { return returns } -func (o *jsiiProxy_OverridableProtectedMember) SwitchModes() { - _jsii_.InvokeVoid( - o, - "switchModes", - nil, // no parameters - ) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/IOptionB.go 1`] = ` +package anonymous + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +type IOptionB interface { + DoSomethingElse() *string } -func (o *jsiiProxy_OverridableProtectedMember) ValueFromProtected() *string { +// The jsii proxy for IOptionB +type jsiiProxy_IOptionB struct { + _ byte // padding +} + +func (i *jsiiProxy_IOptionB) DoSomethingElse() *string { var returns *string _jsii_.Invoke( - o, - "valueFromProtected", + i, + "doSomethingElse", nil, // no parameters &returns, ) @@ -17623,55 +18186,61 @@ func (o *jsiiProxy_OverridableProtectedMember) ValueFromProtected() *string { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OverrideReturnsObject.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/UseOptions.go 1`] = ` +package anonymous import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type OverrideReturnsObject interface { - Test(obj IReturnsNumber) *float64 +type UseOptions interface { } -// The jsii proxy struct for OverrideReturnsObject -type jsiiProxy_OverrideReturnsObject struct { +// The jsii proxy struct for UseOptions +type jsiiProxy_UseOptions struct { _ byte // padding } -func NewOverrideReturnsObject() OverrideReturnsObject { +func UseOptions_Consume(option interface{}) *string { _init_.Initialize() - j := jsiiProxy_OverrideReturnsObject{} + var returns *string - _jsii_.Create( - "jsii-calc.OverrideReturnsObject", - nil, // no parameters - &j, + _jsii_.StaticInvoke( + "jsii-calc.anonymous.UseOptions", + "consume", + []interface{}{option}, + &returns, ) - return &j + return returns } -func NewOverrideReturnsObject_Override(o OverrideReturnsObject) { +func UseOptions_PrivideAsAny(which *string) interface{} { _init_.Initialize() - _jsii_.Create( - "jsii-calc.OverrideReturnsObject", - nil, // no parameters - o, + var returns interface{} + + _jsii_.StaticInvoke( + "jsii-calc.anonymous.UseOptions", + "privideAsAny", + []interface{}{which}, + &returns, ) + + return returns } -func (o *jsiiProxy_OverrideReturnsObject) Test(obj IReturnsNumber) *float64 { - var returns *float64 +func UseOptions_Provide(which *string) interface{} { + _init_.Initialize() - _jsii_.Invoke( - o, - "test", - []interface{}{obj}, + var returns interface{} + + _jsii_.StaticInvoke( + "jsii-calc.anonymous.UseOptions", + "provide", + []interface{}{which}, &returns, ) @@ -17681,119 +18250,166 @@ func (o *jsiiProxy_OverrideReturnsObject) Test(obj IReturnsNumber) *float64 { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ParamShadowsBuiltins.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/main.go 1`] = ` +package anonymous import ( + "reflect" + _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Validate that parameters named "str" or "builtins" do not shadow the actual type names in Python. -type ParamShadowsBuiltins interface { +func init() { + _jsii_.RegisterInterface( + "jsii-calc.anonymous.IOptionA", + reflect.TypeOf((*IOptionA)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "doSomething", GoMethod: "DoSomething"}, + }, + func() interface{} { + return &jsiiProxy_IOptionA{} + }, + ) + _jsii_.RegisterInterface( + "jsii-calc.anonymous.IOptionB", + reflect.TypeOf((*IOptionB)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "doSomethingElse", GoMethod: "DoSomethingElse"}, + }, + func() interface{} { + return &jsiiProxy_IOptionB{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.anonymous.UseOptions", + reflect.TypeOf((*UseOptions)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_UseOptions{} + }, + ) } -// The jsii proxy struct for ParamShadowsBuiltins -type jsiiProxy_ParamShadowsBuiltins struct { - _ byte // padding -} +`; -func NewParamShadowsBuiltins(builtins *string, str *string, props *ParamShadowsBuiltinsProps) ParamShadowsBuiltins { - _init_.Initialize() +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/Cdk16625.go 1`] = ` +package cdk16625 - j := jsiiProxy_ParamShadowsBuiltins{} +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - _jsii_.Create( - "jsii-calc.ParamShadowsBuiltins", - []interface{}{builtins, str, props}, - &j, - ) + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3" +) - return &j +type Cdk16625 interface { + // Run this function to verify that everything is working as it should. + Test() + // Implement this functin to return \`gen.next()\`. It is extremely important that the \`donotimport\` submodule is NEVER explicitly loaded in the testing application (otherwise this test is void). + Unwrap(gen jsiicalc.IRandomNumberGenerator) *float64 } -func NewParamShadowsBuiltins_Override(p ParamShadowsBuiltins, builtins *string, str *string, props *ParamShadowsBuiltinsProps) { +// The jsii proxy struct for Cdk16625 +type jsiiProxy_Cdk16625 struct { + _ byte // padding +} + +func NewCdk16625_Override(c Cdk16625) { _init_.Initialize() _jsii_.Create( - "jsii-calc.ParamShadowsBuiltins", - []interface{}{builtins, str, props}, - p, + "jsii-calc.cdk16625.Cdk16625", + nil, // no parameters + c, ) } +func (c *jsiiProxy_Cdk16625) Test() { + _jsii_.InvokeVoid( + c, + "test", + nil, // no parameters + ) +} -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ParamShadowsBuiltinsProps.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +func (c *jsiiProxy_Cdk16625) Unwrap(gen jsiicalc.IRandomNumberGenerator) *float64 { + var returns *float64 + _jsii_.Invoke( + c, + "unwrap", + []interface{}{gen}, + &returns, + ) -type ParamShadowsBuiltinsProps struct { - BooleanProperty *bool \`field:"required" json:"booleanProperty" yaml:"booleanProperty"\` - StringProperty *string \`field:"required" json:"stringProperty" yaml:"stringProperty"\` - StructProperty *StructA \`field:"required" json:"structProperty" yaml:"structProperty"\` + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ParamShadowsScope.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/UnimportedSubmoduleType.go 1`] = ` +package donotimport import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/cdk16625/donotimport/internal" ) -// Validate that namespaces being shadowed by local variables does not cause type checking issues. -// See: https://github.com/aws/aws-cdk/issues/22975 +// This type demonstrates the ability to receive a callback argument that has a type from a submodule not explicitly imported in the user's code. // -type ParamShadowsScope interface { - UseScope(scope scopejsiicalclib.Number) scopejsiicalclib.Number +// This checks +// that all types available in the assembly can be resolved by the runtime +// library, regardless of whether they were explicitly referenced or not. +// See: https://github.com/aws/aws-cdk/issues/16625 +// +type UnimportedSubmoduleType interface { + jsiicalc.IRandomNumberGenerator + // Not quite random, but it'll do. + // + // Returns: 1337. + Next() *float64 } -// The jsii proxy struct for ParamShadowsScope -type jsiiProxy_ParamShadowsScope struct { - _ byte // padding +// The jsii proxy struct for UnimportedSubmoduleType +type jsiiProxy_UnimportedSubmoduleType struct { + internal.Type__jsiicalcIRandomNumberGenerator } -func NewParamShadowsScope() ParamShadowsScope { +func NewUnimportedSubmoduleType(value *float64) UnimportedSubmoduleType { _init_.Initialize() - j := jsiiProxy_ParamShadowsScope{} + j := jsiiProxy_UnimportedSubmoduleType{} _jsii_.Create( - "jsii-calc.ParamShadowsScope", - nil, // no parameters + "jsii-calc.cdk16625.donotimport.UnimportedSubmoduleType", + []interface{}{value}, &j, ) return &j } -func NewParamShadowsScope_Override(p ParamShadowsScope) { +func NewUnimportedSubmoduleType_Override(u UnimportedSubmoduleType, value *float64) { _init_.Initialize() _jsii_.Create( - "jsii-calc.ParamShadowsScope", - nil, // no parameters - p, + "jsii-calc.cdk16625.donotimport.UnimportedSubmoduleType", + []interface{}{value}, + u, ) } -func (p *jsiiProxy_ParamShadowsScope) UseScope(scope scopejsiicalclib.Number) scopejsiicalclib.Number { - var returns scopejsiicalclib.Number +func (u *jsiiProxy_UnimportedSubmoduleType) Next() *float64 { + var returns *float64 _jsii_.Invoke( - p, - "useScope", - []interface{}{scope}, + u, + "next", + nil, // no parameters &returns, ) @@ -17803,143 +18419,161 @@ func (p *jsiiProxy_ParamShadowsScope) UseScope(scope scopejsiicalclib.Number) sc `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ParentStruct982.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -// https://github.com/aws/jsii/issues/982. -type ParentStruct982 struct { - Foo *string \`field:"required" json:"foo" yaml:"foo"\` -} - +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/internal/types.go 1`] = ` +package internal +import ( + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3" +) +type Type__jsiicalcIRandomNumberGenerator = jsiicalc.IRandomNumberGenerator `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_PartiallyInitializedThisConsumer.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/main.go 1`] = ` +package donotimport import ( - "time" + "reflect" _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type PartiallyInitializedThisConsumer interface { - ConsumePartiallyInitializedThis(obj ConstructorPassesThisOut, dt *time.Time, ev AllTypesEnum) *string +func init() { + _jsii_.RegisterClass( + "jsii-calc.cdk16625.donotimport.UnimportedSubmoduleType", + reflect.TypeOf((*UnimportedSubmoduleType)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"}, + }, + func() interface{} { + j := jsiiProxy_UnimportedSubmoduleType{} + _jsii_.InitJsiiProxy(&j.Type__jsiicalcIRandomNumberGenerator) + return &j + }, + ) } -// The jsii proxy struct for PartiallyInitializedThisConsumer -type jsiiProxy_PartiallyInitializedThisConsumer struct { - _ byte // padding -} +`; -func NewPartiallyInitializedThisConsumer_Override(p PartiallyInitializedThisConsumer) { - _init_.Initialize() +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/main.go 1`] = ` +package cdk16625 - _jsii_.Create( - "jsii-calc.PartiallyInitializedThisConsumer", - nil, // no parameters - p, - ) -} +import ( + "reflect" -func (p *jsiiProxy_PartiallyInitializedThisConsumer) ConsumePartiallyInitializedThis(obj ConstructorPassesThisOut, dt *time.Time, ev AllTypesEnum) *string { - var returns *string + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) - _jsii_.Invoke( - p, - "consumePartiallyInitializedThis", - []interface{}{obj, dt, ev}, - &returns, +func init() { + _jsii_.RegisterClass( + "jsii-calc.cdk16625.Cdk16625", + reflect.TypeOf((*Cdk16625)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "test", GoMethod: "Test"}, + _jsii_.MemberMethod{JsiiMethod: "unwrap", GoMethod: "Unwrap"}, + }, + func() interface{} { + return &jsiiProxy_Cdk16625{} + }, ) - - return returns } - `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Polymorphism.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/AcceptsPath.go 1`] = ` +package cdk22369 import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -type Polymorphism interface { - SayHello(friendly scopejsiicalclib.IFriendly) *string +type AcceptsPath interface { } -// The jsii proxy struct for Polymorphism -type jsiiProxy_Polymorphism struct { +// The jsii proxy struct for AcceptsPath +type jsiiProxy_AcceptsPath struct { _ byte // padding } -func NewPolymorphism() Polymorphism { +func NewAcceptsPath(props *AcceptsPathProps) AcceptsPath { _init_.Initialize() - j := jsiiProxy_Polymorphism{} + j := jsiiProxy_AcceptsPath{} _jsii_.Create( - "jsii-calc.Polymorphism", - nil, // no parameters + "jsii-calc.cdk22369.AcceptsPath", + []interface{}{props}, &j, ) return &j } -func NewPolymorphism_Override(p Polymorphism) { +func NewAcceptsPath_Override(a AcceptsPath, props *AcceptsPathProps) { _init_.Initialize() _jsii_.Create( - "jsii-calc.Polymorphism", - nil, // no parameters - p, + "jsii-calc.cdk22369.AcceptsPath", + []interface{}{props}, + a, ) } -func (p *jsiiProxy_Polymorphism) SayHello(friendly scopejsiicalclib.IFriendly) *string { - var returns *string - _jsii_.Invoke( - p, - "sayHello", - []interface{}{friendly}, - &returns, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/AcceptsPathProps.go 1`] = ` +package cdk22369 + + +type AcceptsPathProps struct { + // A path that doesn't exist. + SourcePath *string \`field:"required" json:"sourcePath" yaml:"sourcePath"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/main.go 1`] = ` +package cdk22369 + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "jsii-calc.cdk22369.AcceptsPath", + reflect.TypeOf((*AcceptsPath)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_AcceptsPath{} + }, + ) + _jsii_.RegisterStruct( + "jsii-calc.cdk22369.AcceptsPathProps", + reflect.TypeOf((*AcceptsPathProps)(nil)).Elem(), ) - - return returns } - `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Power.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/CompositeOperation.go 1`] = ` +package composition import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition" - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition/internal" "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -// The power operation. -type Power interface { - composition.CompositeOperation - // The base of the power. - Base() scopejsiicalclib.NumericValue +// Abstract operation composed from an expression of other operations. +type CompositeOperation interface { + scopejsiicalclib.Operation // A set of postfixes to include in a decorated .toString(). DecorationPostfixes() *[]*string SetDecorationPostfixes(val *[]*string) @@ -17950,11 +18584,9 @@ type Power interface { // // Must be implemented by derived classes. Expression() scopejsiicalclib.NumericValue - // The number of times to multiply. - Pow() scopejsiicalclib.NumericValue // The .toString() style. - StringStyle() composition.CompositeOperation_CompositionStringStyle - SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) + StringStyle() CompositeOperation_CompositionStringStyle + SetStringStyle(val CompositeOperation_CompositionStringStyle) // The value. Value() *float64 // String representation of the value. @@ -17963,22 +18595,12 @@ type Power interface { TypeName() interface{} } -// The jsii proxy struct for Power -type jsiiProxy_Power struct { - internal.Type__compositionCompositeOperation -} - -func (j *jsiiProxy_Power) Base() scopejsiicalclib.NumericValue { - var returns scopejsiicalclib.NumericValue - _jsii_.Get( - j, - "base", - &returns, - ) - return returns +// The jsii proxy struct for CompositeOperation +type jsiiProxy_CompositeOperation struct { + internal.Type__scopejsiicalclibOperation } -func (j *jsiiProxy_Power) DecorationPostfixes() *[]*string { +func (j *jsiiProxy_CompositeOperation) DecorationPostfixes() *[]*string { var returns *[]*string _jsii_.Get( j, @@ -17988,7 +18610,7 @@ func (j *jsiiProxy_Power) DecorationPostfixes() *[]*string { return returns } -func (j *jsiiProxy_Power) DecorationPrefixes() *[]*string { +func (j *jsiiProxy_CompositeOperation) DecorationPrefixes() *[]*string { var returns *[]*string _jsii_.Get( j, @@ -17998,7 +18620,7 @@ func (j *jsiiProxy_Power) DecorationPrefixes() *[]*string { return returns } -func (j *jsiiProxy_Power) Expression() scopejsiicalclib.NumericValue { +func (j *jsiiProxy_CompositeOperation) Expression() scopejsiicalclib.NumericValue { var returns scopejsiicalclib.NumericValue _jsii_.Get( j, @@ -18008,18 +18630,8 @@ func (j *jsiiProxy_Power) Expression() scopejsiicalclib.NumericValue { return returns } -func (j *jsiiProxy_Power) Pow() scopejsiicalclib.NumericValue { - var returns scopejsiicalclib.NumericValue - _jsii_.Get( - j, - "pow", - &returns, - ) - return returns -} - -func (j *jsiiProxy_Power) StringStyle() composition.CompositeOperation_CompositionStringStyle { - var returns composition.CompositeOperation_CompositionStringStyle +func (j *jsiiProxy_CompositeOperation) StringStyle() CompositeOperation_CompositionStringStyle { + var returns CompositeOperation_CompositionStringStyle _jsii_.Get( j, "stringStyle", @@ -18028,7 +18640,7 @@ func (j *jsiiProxy_Power) StringStyle() composition.CompositeOperation_Compositi return returns } -func (j *jsiiProxy_Power) Value() *float64 { +func (j *jsiiProxy_CompositeOperation) Value() *float64 { var returns *float64 _jsii_.Get( j, @@ -18039,33 +18651,17 @@ func (j *jsiiProxy_Power) Value() *float64 { } -// Creates a Power operation. -func NewPower(base scopejsiicalclib.NumericValue, pow scopejsiicalclib.NumericValue) Power { - _init_.Initialize() - - j := jsiiProxy_Power{} - - _jsii_.Create( - "jsii-calc.Power", - []interface{}{base, pow}, - &j, - ) - - return &j -} - -// Creates a Power operation. -func NewPower_Override(p Power, base scopejsiicalclib.NumericValue, pow scopejsiicalclib.NumericValue) { +func NewCompositeOperation_Override(c CompositeOperation) { _init_.Initialize() _jsii_.Create( - "jsii-calc.Power", - []interface{}{base, pow}, - p, + "jsii-calc.composition.CompositeOperation", + nil, // no parameters + c, ) } -func (j *jsiiProxy_Power)SetDecorationPostfixes(val *[]*string) { +func (j *jsiiProxy_CompositeOperation)SetDecorationPostfixes(val *[]*string) { _jsii_.Set( j, "decorationPostfixes", @@ -18073,7 +18669,7 @@ func (j *jsiiProxy_Power)SetDecorationPostfixes(val *[]*string) { ) } -func (j *jsiiProxy_Power)SetDecorationPrefixes(val *[]*string) { +func (j *jsiiProxy_CompositeOperation)SetDecorationPrefixes(val *[]*string) { _jsii_.Set( j, "decorationPrefixes", @@ -18081,7 +18677,7 @@ func (j *jsiiProxy_Power)SetDecorationPrefixes(val *[]*string) { ) } -func (j *jsiiProxy_Power)SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) { +func (j *jsiiProxy_CompositeOperation)SetStringStyle(val CompositeOperation_CompositionStringStyle) { _jsii_.Set( j, "stringStyle", @@ -18089,11 +18685,11 @@ func (j *jsiiProxy_Power)SetStringStyle(val composition.CompositeOperation_Compo ) } -func (p *jsiiProxy_Power) ToString() *string { +func (c *jsiiProxy_CompositeOperation) ToString() *string { var returns *string _jsii_.Invoke( - p, + c, "toString", nil, // no parameters &returns, @@ -18102,11 +18698,11 @@ func (p *jsiiProxy_Power) ToString() *string { return returns } -func (p *jsiiProxy_Power) TypeName() interface{} { +func (c *jsiiProxy_CompositeOperation) TypeName() interface{} { var returns interface{} _jsii_.Invoke( - p, + c, "typeName", nil, // no parameters &returns, @@ -18118,31 +18714,108 @@ func (p *jsiiProxy_Power) TypeName() interface{} { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_PromiseNothing.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/CompositeOperation_CompositionStringStyle.go 1`] = ` +package composition + + +// Style of .toString() output for CompositeOperation. +type CompositeOperation_CompositionStringStyle string + +const ( + // Normal string expression. + CompositeOperation_CompositionStringStyle_NORMAL CompositeOperation_CompositionStringStyle = "NORMAL" + // Decorated string expression. + CompositeOperation_CompositionStringStyle_DECORATED CompositeOperation_CompositionStringStyle = "DECORATED" +) + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/internal/types.go 1`] = ` +package internal +import ( + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) +type Type__scopejsiicalclibOperation = scopejsiicalclib.Operation + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/main.go 1`] = ` +package composition + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "jsii-calc.composition.CompositeOperation", + reflect.TypeOf((*CompositeOperation)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "decorationPostfixes", GoGetter: "DecorationPostfixes"}, + _jsii_.MemberProperty{JsiiProperty: "decorationPrefixes", GoGetter: "DecorationPrefixes"}, + _jsii_.MemberProperty{JsiiProperty: "expression", GoGetter: "Expression"}, + _jsii_.MemberProperty{JsiiProperty: "stringStyle", GoGetter: "StringStyle"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + j := jsiiProxy_CompositeOperation{} + _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibOperation) + return &j + }, + ) + _jsii_.RegisterEnum( + "jsii-calc.composition.CompositeOperation.CompositionStringStyle", + reflect.TypeOf((*CompositeOperation_CompositionStringStyle)(nil)).Elem(), + map[string]interface{}{ + "NORMAL": CompositeOperation_CompositionStringStyle_NORMAL, + "DECORATED": CompositeOperation_CompositionStringStyle_DECORATED, + }, + ) +} + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/Base.go 1`] = ` +package derivedclasshasnoproperties import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type PromiseNothing interface { - InstancePromiseIt() +type Base interface { + Prop() *string + SetProp(val *string) } -// The jsii proxy struct for PromiseNothing -type jsiiProxy_PromiseNothing struct { +// The jsii proxy struct for Base +type jsiiProxy_Base struct { _ byte // padding } -func NewPromiseNothing() PromiseNothing { +func (j *jsiiProxy_Base) Prop() *string { + var returns *string + _jsii_.Get( + j, + "prop", + &returns, + ) + return returns +} + + +func NewBase() Base { _init_.Initialize() - j := jsiiProxy_PromiseNothing{} + j := jsiiProxy_Base{} _jsii_.Create( - "jsii-calc.PromiseNothing", + "jsii-calc.DerivedClassHasNoProperties.Base", nil, // no parameters &j, ) @@ -18150,85 +18823,358 @@ func NewPromiseNothing() PromiseNothing { return &j } -func NewPromiseNothing_Override(p PromiseNothing) { +func NewBase_Override(b Base) { _init_.Initialize() _jsii_.Create( - "jsii-calc.PromiseNothing", + "jsii-calc.DerivedClassHasNoProperties.Base", nil, // no parameters - p, + b, ) } -func PromiseNothing_PromiseIt() { +func (j *jsiiProxy_Base)SetProp(val *string) { + _jsii_.Set( + j, + "prop", + val, + ) +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/Derived.go 1`] = ` +package derivedclasshasnoproperties + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type Derived interface { + Base + Prop() *string + SetProp(val *string) +} + +// The jsii proxy struct for Derived +type jsiiProxy_Derived struct { + jsiiProxy_Base +} + +func (j *jsiiProxy_Derived) Prop() *string { + var returns *string + _jsii_.Get( + j, + "prop", + &returns, + ) + return returns +} + + +func NewDerived() Derived { _init_.Initialize() - _jsii_.StaticInvokeVoid( - "jsii-calc.PromiseNothing", - "promiseIt", + j := jsiiProxy_Derived{} + + _jsii_.Create( + "jsii-calc.DerivedClassHasNoProperties.Derived", nil, // no parameters + &j, ) + + return &j } -func (p *jsiiProxy_PromiseNothing) InstancePromiseIt() { - _jsii_.InvokeVoid( - p, - "instancePromiseIt", +func NewDerived_Override(d Derived) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.DerivedClassHasNoProperties.Derived", nil, // no parameters + d, + ) +} + +func (j *jsiiProxy_Derived)SetProp(val *string) { + _jsii_.Set( + j, + "prop", + val, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_PropertyNamedProperty.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/main.go 1`] = ` +package derivedclasshasnoproperties + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "jsii-calc.DerivedClassHasNoProperties.Base", + reflect.TypeOf((*Base)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "prop", GoGetter: "Prop"}, + }, + func() interface{} { + return &jsiiProxy_Base{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.DerivedClassHasNoProperties.Derived", + reflect.TypeOf((*Derived)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "prop", GoGetter: "Prop"}, + }, + func() interface{} { + j := jsiiProxy_Derived{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_Base) + return &j + }, + ) +} + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/go.mod 1`] = ` +module github.com/aws/jsii/jsii-calc/go/jsiicalc/v3 + +go 1.18 + +require ( + github.com/aws/jsii-runtime-go v0.0.0 + github.com/aws/jsii/jsii-calc/go/jcb v0.0.0 + github.com/aws/jsii/jsii-calc/go/scopejsiicalclib v0.0.0-devpreview + github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 v2.1.1 // indirect +) + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/README.md 1`] = ` +Verifies homonymous forward references don't trip the Python type checker + +This has been an issue when stub functions were introduced to create a reliable source for type checking +information, which was reported in https://github.com/aws/jsii/issues/3818. + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/Consumer.go 1`] = ` +package bar import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -// Reproduction for https://github.com/aws/jsii/issues/1113 Where a method or property named "property" would result in impossible to load Python code. -type PropertyNamedProperty interface { - Property() *string - YetAnoterOne() *bool +type Consumer interface { } -// The jsii proxy struct for PropertyNamedProperty -type jsiiProxy_PropertyNamedProperty struct { +// The jsii proxy struct for Consumer +type jsiiProxy_Consumer struct { + _ byte // padding +} + +func Consumer_Consume(props *ConsumerProps) *Homonymous { + _init_.Initialize() + + var returns *Homonymous + + _jsii_.StaticInvoke( + "jsii-calc.homonymousForwardReferences.bar.Consumer", + "consume", + []interface{}{props}, + &returns, + ) + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/ConsumerProps.go 1`] = ` +package bar + + +type ConsumerProps struct { + Homonymous *Homonymous \`field:"required" json:"homonymous" yaml:"homonymous"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/Homonymous.go 1`] = ` +package bar + + +type Homonymous struct { + NumericProperty *float64 \`field:"required" json:"numericProperty" yaml:"numericProperty"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/main.go 1`] = ` +package bar + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "jsii-calc.homonymousForwardReferences.bar.Consumer", + reflect.TypeOf((*Consumer)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_Consumer{} + }, + ) + _jsii_.RegisterStruct( + "jsii-calc.homonymousForwardReferences.bar.ConsumerProps", + reflect.TypeOf((*ConsumerProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "jsii-calc.homonymousForwardReferences.bar.Homonymous", + reflect.TypeOf((*Homonymous)(nil)).Elem(), + ) +} + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/Consumer.go 1`] = ` +package foo + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type Consumer interface { +} + +// The jsii proxy struct for Consumer +type jsiiProxy_Consumer struct { + _ byte // padding +} + +func Consumer_Consume(props *ConsumerProps) *Homonymous { + _init_.Initialize() + + var returns *Homonymous + + _jsii_.StaticInvoke( + "jsii-calc.homonymousForwardReferences.foo.Consumer", + "consume", + []interface{}{props}, + &returns, + ) + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/ConsumerProps.go 1`] = ` +package foo + + +type ConsumerProps struct { + Homonymous *Homonymous \`field:"required" json:"homonymous" yaml:"homonymous"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/Homonymous.go 1`] = ` +package foo + + +type Homonymous struct { + StringProperty *string \`field:"required" json:"stringProperty" yaml:"stringProperty"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/main.go 1`] = ` +package foo + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "jsii-calc.homonymousForwardReferences.foo.Consumer", + reflect.TypeOf((*Consumer)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_Consumer{} + }, + ) + _jsii_.RegisterStruct( + "jsii-calc.homonymousForwardReferences.foo.ConsumerProps", + reflect.TypeOf((*ConsumerProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "jsii-calc.homonymousForwardReferences.foo.Homonymous", + reflect.TypeOf((*Homonymous)(nil)).Elem(), + ) +} + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceincludesclasses/Foo.go 1`] = ` +package interfaceinnamespaceincludesclasses + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" +) + +type Foo interface { + Bar() *string + SetBar(val *string) +} + +// The jsii proxy struct for Foo +type jsiiProxy_Foo struct { _ byte // padding } -func (j *jsiiProxy_PropertyNamedProperty) Property() *string { +func (j *jsiiProxy_Foo) Bar() *string { var returns *string _jsii_.Get( j, - "property", - &returns, - ) - return returns -} - -func (j *jsiiProxy_PropertyNamedProperty) YetAnoterOne() *bool { - var returns *bool - _jsii_.Get( - j, - "yetAnoterOne", + "bar", &returns, ) return returns } -func NewPropertyNamedProperty() PropertyNamedProperty { +func NewFoo() Foo { _init_.Initialize() - j := jsiiProxy_PropertyNamedProperty{} + j := jsiiProxy_Foo{} _jsii_.Create( - "jsii-calc.PropertyNamedProperty", + "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo", nil, // no parameters &j, ) @@ -18236,3585 +19182,2613 @@ func NewPropertyNamedProperty() PropertyNamedProperty { return &j } -func NewPropertyNamedProperty_Override(p PropertyNamedProperty) { +func NewFoo_Override(f Foo) { _init_.Initialize() _jsii_.Create( - "jsii-calc.PropertyNamedProperty", + "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo", nil, // no parameters - p, + f, + ) +} + +func (j *jsiiProxy_Foo)SetBar(val *string) { + _jsii_.Set( + j, + "bar", + val, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_PublicClass.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceincludesclasses/Hello.go 1`] = ` +package interfaceinnamespaceincludesclasses + + +type Hello struct { + Foo *float64 \`field:"required" json:"foo" yaml:"foo"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceincludesclasses/main.go 1`] = ` +package interfaceinnamespaceincludesclasses import ( + "reflect" + _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type PublicClass interface { - Hello() +func init() { + _jsii_.RegisterClass( + "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo", + reflect.TypeOf((*Foo)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "bar", GoGetter: "Bar"}, + }, + func() interface{} { + return &jsiiProxy_Foo{} + }, + ) + _jsii_.RegisterStruct( + "jsii-calc.InterfaceInNamespaceIncludesClasses.Hello", + reflect.TypeOf((*Hello)(nil)).Elem(), + ) } -// The jsii proxy struct for PublicClass -type jsiiProxy_PublicClass struct { - _ byte // padding +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceonlyinterface/Hello.go 1`] = ` +package interfaceinnamespaceonlyinterface + + +type Hello struct { + Foo *float64 \`field:"required" json:"foo" yaml:"foo"\` } -func NewPublicClass() PublicClass { - _init_.Initialize() - j := jsiiProxy_PublicClass{} +`; - _jsii_.Create( - "jsii-calc.PublicClass", - nil, // no parameters - &j, - ) +exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceonlyinterface/main.go 1`] = ` +package interfaceinnamespaceonlyinterface - return &j -} +import ( + "reflect" -func NewPublicClass_Override(p PublicClass) { - _init_.Initialize() + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) - _jsii_.Create( - "jsii-calc.PublicClass", - nil, // no parameters - p, +func init() { + _jsii_.RegisterStruct( + "jsii-calc.InterfaceInNamespaceOnlyInterface.Hello", + reflect.TypeOf((*Hello)(nil)).Elem(), ) } -func (p *jsiiProxy_PublicClass) Hello() { - _jsii_.InvokeVoid( - p, - "hello", - nil, // no parameters - ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/internal/types.go 1`] = ` +package internal +import ( + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/customsubmodulename" +) +type Type__scopejsiicalclibOperation = scopejsiicalclib.Operation +type Type__scopejsiicalclibIFriendly = scopejsiicalclib.IFriendly +type Type__compositionCompositeOperation = composition.CompositeOperation +type Type__customsubmodulenameIReflectable = customsubmodulename.IReflectable + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii/jsii.go 1`] = ` +// 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" + + jcb "github.com/aws/jsii/jsii-calc/go/jcb/jsii" + scopejsiicalclib "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii" +) + +//go:embed jsii-calc-3.20.120.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() { + // Ensure all dependencies are initialized + jcb.Initialize() + scopejsiicalclib.Initialize() + + // Load this library into the kernel + _jsii_.Load("jsii-calc", "3.20.120", tarball) +} + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii/jsii-calc-3.20.120.tgz 1`] = `go/jsiicalc/jsii/jsii-calc-3.20.120.tgz is a tarball`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/ImplementMeOpts.go 1`] = ` +package jsii3656 + + +type ImplementMeOpts struct { + Name *string \`field:"required" json:"name" yaml:"name"\` + Count *float64 \`field:"optional" json:"count" yaml:"count"\` } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_PythonReservedWords.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/OverrideMe.go 1`] = ` +package jsii3656 import ( _jsii_ "github.com/aws/jsii-runtime-go/runtime" _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" ) -type PythonReservedWords interface { - And() - As() - Assert() - Async() - Await() - Break() - Class() - Continue() - Def() - Del() - Elif() - Else() - Except() - Finally() - For() - From() - Global() - If() - Import() - In() - Is() - Lambda() - Nonlocal() - Not() - Or() - Pass() - Raise() - Return() - Try() - While() - With() - Yield() +type OverrideMe interface { + ImplementMe(opts *ImplementMeOpts) *bool } -// The jsii proxy struct for PythonReservedWords -type jsiiProxy_PythonReservedWords struct { +// The jsii proxy struct for OverrideMe +type jsiiProxy_OverrideMe struct { _ byte // padding } -func NewPythonReservedWords() PythonReservedWords { +func NewOverrideMe_Override(o OverrideMe) { _init_.Initialize() - j := jsiiProxy_PythonReservedWords{} - _jsii_.Create( - "jsii-calc.PythonReservedWords", + "jsii-calc.jsii3656.OverrideMe", nil, // no parameters - &j, + o, ) - - return &j } -func NewPythonReservedWords_Override(p PythonReservedWords) { +func OverrideMe_CallAbstract(receiver OverrideMe) *bool { _init_.Initialize() - _jsii_.Create( - "jsii-calc.PythonReservedWords", - nil, // no parameters - p, - ) -} + var returns *bool -func (p *jsiiProxy_PythonReservedWords) And() { - _jsii_.InvokeVoid( - p, - "and", - nil, // no parameters + _jsii_.StaticInvoke( + "jsii-calc.jsii3656.OverrideMe", + "callAbstract", + []interface{}{receiver}, + &returns, ) -} -func (p *jsiiProxy_PythonReservedWords) As() { - _jsii_.InvokeVoid( - p, - "as", - nil, // no parameters - ) + return returns } -func (p *jsiiProxy_PythonReservedWords) Assert() { - _jsii_.InvokeVoid( - p, - "assert", - nil, // no parameters - ) -} +func (o *jsiiProxy_OverrideMe) ImplementMe(opts *ImplementMeOpts) *bool { + var returns *bool -func (p *jsiiProxy_PythonReservedWords) Async() { - _jsii_.InvokeVoid( - p, - "async", - nil, // no parameters + _jsii_.Invoke( + o, + "implementMe", + []interface{}{opts}, + &returns, ) -} -func (p *jsiiProxy_PythonReservedWords) Await() { - _jsii_.InvokeVoid( - p, - "await", - nil, // no parameters - ) + return returns } -func (p *jsiiProxy_PythonReservedWords) Break() { - _jsii_.InvokeVoid( - p, - "break", - nil, // no parameters - ) -} -func (p *jsiiProxy_PythonReservedWords) Class() { - _jsii_.InvokeVoid( - p, - "class", - nil, // no parameters - ) -} +`; -func (p *jsiiProxy_PythonReservedWords) Continue() { - _jsii_.InvokeVoid( - p, - "continue", - nil, // no parameters +exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/main.go 1`] = ` +package jsii3656 + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterStruct( + "jsii-calc.jsii3656.ImplementMeOpts", + reflect.TypeOf((*ImplementMeOpts)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "jsii-calc.jsii3656.OverrideMe", + reflect.TypeOf((*OverrideMe)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "implementMe", GoMethod: "ImplementMe"}, + }, + func() interface{} { + return &jsiiProxy_OverrideMe{} + }, ) } -func (p *jsiiProxy_PythonReservedWords) Def() { - _jsii_.InvokeVoid( - p, - "def", - nil, // no parameters +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/main.go 1`] = ` +package jsiicalc + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "jsii-calc.AbstractClass", + reflect.TypeOf((*AbstractClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "abstractMethod", GoMethod: "AbstractMethod"}, + _jsii_.MemberProperty{JsiiProperty: "abstractProperty", GoGetter: "AbstractProperty"}, + _jsii_.MemberMethod{JsiiMethod: "nonAbstractMethod", GoMethod: "NonAbstractMethod"}, + _jsii_.MemberProperty{JsiiProperty: "propFromInterface", GoGetter: "PropFromInterface"}, + }, + func() interface{} { + j := jsiiProxy_AbstractClass{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_AbstractClassBase) + _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceImplementedByAbstractClass) + return &j + }, + ) + _jsii_.RegisterClass( + "jsii-calc.AbstractClassBase", + reflect.TypeOf((*AbstractClassBase)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "abstractProperty", GoGetter: "AbstractProperty"}, + }, + func() interface{} { + return &jsiiProxy_AbstractClassBase{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.AbstractClassReturner", + reflect.TypeOf((*AbstractClassReturner)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "giveMeAbstract", GoMethod: "GiveMeAbstract"}, + _jsii_.MemberMethod{JsiiMethod: "giveMeInterface", GoMethod: "GiveMeInterface"}, + _jsii_.MemberProperty{JsiiProperty: "returnAbstractFromProperty", GoGetter: "ReturnAbstractFromProperty"}, + }, + func() interface{} { + return &jsiiProxy_AbstractClassReturner{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.AbstractSuite", + reflect.TypeOf((*AbstractSuite)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, + _jsii_.MemberMethod{JsiiMethod: "someMethod", GoMethod: "SomeMethod"}, + _jsii_.MemberMethod{JsiiMethod: "workItAll", GoMethod: "WorkItAll"}, + }, + func() interface{} { + return &jsiiProxy_AbstractSuite{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.Add", + reflect.TypeOf((*Add)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, + _jsii_.MemberProperty{JsiiProperty: "lhs", GoGetter: "Lhs"}, + _jsii_.MemberProperty{JsiiProperty: "rhs", GoGetter: "Rhs"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + j := jsiiProxy_Add{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_BinaryOperation) + return &j + }, + ) + _jsii_.RegisterClass( + "jsii-calc.AllTypes", + reflect.TypeOf((*AllTypes)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "anyArrayProperty", GoGetter: "AnyArrayProperty"}, + _jsii_.MemberMethod{JsiiMethod: "anyIn", GoMethod: "AnyIn"}, + _jsii_.MemberProperty{JsiiProperty: "anyMapProperty", GoGetter: "AnyMapProperty"}, + _jsii_.MemberMethod{JsiiMethod: "anyOut", GoMethod: "AnyOut"}, + _jsii_.MemberProperty{JsiiProperty: "anyProperty", GoGetter: "AnyProperty"}, + _jsii_.MemberProperty{JsiiProperty: "arrayProperty", GoGetter: "ArrayProperty"}, + _jsii_.MemberProperty{JsiiProperty: "booleanProperty", GoGetter: "BooleanProperty"}, + _jsii_.MemberProperty{JsiiProperty: "dateProperty", GoGetter: "DateProperty"}, + _jsii_.MemberMethod{JsiiMethod: "enumMethod", GoMethod: "EnumMethod"}, + _jsii_.MemberProperty{JsiiProperty: "enumProperty", GoGetter: "EnumProperty"}, + _jsii_.MemberProperty{JsiiProperty: "enumPropertyValue", GoGetter: "EnumPropertyValue"}, + _jsii_.MemberProperty{JsiiProperty: "jsonProperty", GoGetter: "JsonProperty"}, + _jsii_.MemberProperty{JsiiProperty: "mapProperty", GoGetter: "MapProperty"}, + _jsii_.MemberProperty{JsiiProperty: "numberProperty", GoGetter: "NumberProperty"}, + _jsii_.MemberProperty{JsiiProperty: "optionalEnumValue", GoGetter: "OptionalEnumValue"}, + _jsii_.MemberProperty{JsiiProperty: "stringProperty", GoGetter: "StringProperty"}, + _jsii_.MemberProperty{JsiiProperty: "unionArrayProperty", GoGetter: "UnionArrayProperty"}, + _jsii_.MemberProperty{JsiiProperty: "unionMapProperty", GoGetter: "UnionMapProperty"}, + _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"}, + _jsii_.MemberProperty{JsiiProperty: "unknownArrayProperty", GoGetter: "UnknownArrayProperty"}, + _jsii_.MemberProperty{JsiiProperty: "unknownMapProperty", GoGetter: "UnknownMapProperty"}, + _jsii_.MemberProperty{JsiiProperty: "unknownProperty", GoGetter: "UnknownProperty"}, + }, + func() interface{} { + return &jsiiProxy_AllTypes{} + }, + ) + _jsii_.RegisterEnum( + "jsii-calc.AllTypesEnum", + reflect.TypeOf((*AllTypesEnum)(nil)).Elem(), + map[string]interface{}{ + "MY_ENUM_VALUE": AllTypesEnum_MY_ENUM_VALUE, + "YOUR_ENUM_VALUE": AllTypesEnum_YOUR_ENUM_VALUE, + "THIS_IS_GREAT": AllTypesEnum_THIS_IS_GREAT, + }, + ) + _jsii_.RegisterClass( + "jsii-calc.AllowedMethodNames", + reflect.TypeOf((*AllowedMethodNames)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "getBar", GoMethod: "GetBar"}, + _jsii_.MemberMethod{JsiiMethod: "getFoo", GoMethod: "GetFoo"}, + _jsii_.MemberMethod{JsiiMethod: "setBar", GoMethod: "SetBar"}, + _jsii_.MemberMethod{JsiiMethod: "setFoo", GoMethod: "SetFoo"}, + }, + func() interface{} { + return &jsiiProxy_AllowedMethodNames{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.AmbiguousParameters", + reflect.TypeOf((*AmbiguousParameters)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "props", GoGetter: "Props"}, + _jsii_.MemberProperty{JsiiProperty: "scope", GoGetter: "Scope"}, + }, + func() interface{} { + return &jsiiProxy_AmbiguousParameters{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.AnonymousImplementationProvider", + reflect.TypeOf((*AnonymousImplementationProvider)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "provideAsClass", GoMethod: "ProvideAsClass"}, + _jsii_.MemberMethod{JsiiMethod: "provideAsInterface", GoMethod: "ProvideAsInterface"}, + }, + func() interface{} { + j := jsiiProxy_AnonymousImplementationProvider{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IAnonymousImplementationProvider) + return &j + }, + ) + _jsii_.RegisterClass( + "jsii-calc.AsyncVirtualMethods", + reflect.TypeOf((*AsyncVirtualMethods)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "callMe", GoMethod: "CallMe"}, + _jsii_.MemberMethod{JsiiMethod: "callMe2", GoMethod: "CallMe2"}, + _jsii_.MemberMethod{JsiiMethod: "callMeDoublePromise", GoMethod: "CallMeDoublePromise"}, + _jsii_.MemberMethod{JsiiMethod: "dontOverrideMe", GoMethod: "DontOverrideMe"}, + _jsii_.MemberMethod{JsiiMethod: "overrideMe", GoMethod: "OverrideMe"}, + _jsii_.MemberMethod{JsiiMethod: "overrideMeToo", GoMethod: "OverrideMeToo"}, + }, + func() interface{} { + return &jsiiProxy_AsyncVirtualMethods{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.AugmentableClass", + reflect.TypeOf((*AugmentableClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "methodOne", GoMethod: "MethodOne"}, + _jsii_.MemberMethod{JsiiMethod: "methodTwo", GoMethod: "MethodTwo"}, + }, + func() interface{} { + return &jsiiProxy_AugmentableClass{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.BaseClass", + reflect.TypeOf((*BaseClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, + }, + func() interface{} { + return &jsiiProxy_BaseClass{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.BaseJsii976", + reflect.TypeOf((*BaseJsii976)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_BaseJsii976{} + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Del() { - _jsii_.InvokeVoid( - p, - "del", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.Bell", + reflect.TypeOf((*Bell)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "ring", GoMethod: "Ring"}, + _jsii_.MemberProperty{JsiiProperty: "rung", GoGetter: "Rung"}, + }, + func() interface{} { + j := jsiiProxy_Bell{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IBell) + return &j + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Elif() { - _jsii_.InvokeVoid( - p, - "elif", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.BinaryOperation", + reflect.TypeOf((*BinaryOperation)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, + _jsii_.MemberProperty{JsiiProperty: "lhs", GoGetter: "Lhs"}, + _jsii_.MemberProperty{JsiiProperty: "rhs", GoGetter: "Rhs"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + j := jsiiProxy_BinaryOperation{} + _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibOperation) + _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibIFriendly) + return &j + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Else() { - _jsii_.InvokeVoid( - p, - "else", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.BurriedAnonymousObject", + reflect.TypeOf((*BurriedAnonymousObject)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "check", GoMethod: "Check"}, + _jsii_.MemberMethod{JsiiMethod: "giveItBack", GoMethod: "GiveItBack"}, + }, + func() interface{} { + return &jsiiProxy_BurriedAnonymousObject{} + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Except() { - _jsii_.InvokeVoid( - p, - "except", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.Calculator", + reflect.TypeOf((*Calculator)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "add", GoMethod: "Add"}, + _jsii_.MemberProperty{JsiiProperty: "curr", GoGetter: "Curr"}, + _jsii_.MemberProperty{JsiiProperty: "decorationPostfixes", GoGetter: "DecorationPostfixes"}, + _jsii_.MemberProperty{JsiiProperty: "decorationPrefixes", GoGetter: "DecorationPrefixes"}, + _jsii_.MemberProperty{JsiiProperty: "expression", GoGetter: "Expression"}, + _jsii_.MemberProperty{JsiiProperty: "maxValue", GoGetter: "MaxValue"}, + _jsii_.MemberMethod{JsiiMethod: "mul", GoMethod: "Mul"}, + _jsii_.MemberMethod{JsiiMethod: "neg", GoMethod: "Neg"}, + _jsii_.MemberProperty{JsiiProperty: "operationsLog", GoGetter: "OperationsLog"}, + _jsii_.MemberProperty{JsiiProperty: "operationsMap", GoGetter: "OperationsMap"}, + _jsii_.MemberMethod{JsiiMethod: "pow", GoMethod: "Pow"}, + _jsii_.MemberMethod{JsiiMethod: "readUnionValue", GoMethod: "ReadUnionValue"}, + _jsii_.MemberProperty{JsiiProperty: "stringStyle", GoGetter: "StringStyle"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, + _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"}, + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + j := jsiiProxy_Calculator{} + _jsii_.InitJsiiProxy(&j.Type__compositionCompositeOperation) + return &j + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Finally() { - _jsii_.InvokeVoid( - p, - "finally", - nil, // no parameters + _jsii_.RegisterStruct( + "jsii-calc.CalculatorProps", + reflect.TypeOf((*CalculatorProps)(nil)).Elem(), ) -} - -func (p *jsiiProxy_PythonReservedWords) For() { - _jsii_.InvokeVoid( - p, - "for", - nil, // no parameters + _jsii_.RegisterStruct( + "jsii-calc.ChildStruct982", + reflect.TypeOf((*ChildStruct982)(nil)).Elem(), ) -} - -func (p *jsiiProxy_PythonReservedWords) From() { - _jsii_.InvokeVoid( - p, - "from", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ClassThatImplementsTheInternalInterface", + reflect.TypeOf((*ClassThatImplementsTheInternalInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"}, + _jsii_.MemberProperty{JsiiProperty: "b", GoGetter: "B"}, + _jsii_.MemberProperty{JsiiProperty: "c", GoGetter: "C"}, + _jsii_.MemberProperty{JsiiProperty: "d", GoGetter: "D"}, + }, + func() interface{} { + j := jsiiProxy_ClassThatImplementsTheInternalInterface{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_INonInternalInterface) + return &j + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Global() { - _jsii_.InvokeVoid( - p, - "global", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ClassThatImplementsThePrivateInterface", + reflect.TypeOf((*ClassThatImplementsThePrivateInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"}, + _jsii_.MemberProperty{JsiiProperty: "b", GoGetter: "B"}, + _jsii_.MemberProperty{JsiiProperty: "c", GoGetter: "C"}, + _jsii_.MemberProperty{JsiiProperty: "e", GoGetter: "E"}, + }, + func() interface{} { + j := jsiiProxy_ClassThatImplementsThePrivateInterface{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_INonInternalInterface) + return &j + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) If() { - _jsii_.InvokeVoid( - p, - "if", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ClassWithCollectionOfUnions", + reflect.TypeOf((*ClassWithCollectionOfUnions)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"}, + }, + func() interface{} { + return &jsiiProxy_ClassWithCollectionOfUnions{} + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Import() { - _jsii_.InvokeVoid( - p, - "import", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ClassWithCollections", + reflect.TypeOf((*ClassWithCollections)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "array", GoGetter: "Array"}, + _jsii_.MemberProperty{JsiiProperty: "map", GoGetter: "Map"}, + }, + func() interface{} { + return &jsiiProxy_ClassWithCollections{} + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) In() { - _jsii_.InvokeVoid( - p, - "in", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ClassWithContainerTypes", + reflect.TypeOf((*ClassWithContainerTypes)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "array", GoGetter: "Array"}, + _jsii_.MemberProperty{JsiiProperty: "obj", GoGetter: "Obj"}, + _jsii_.MemberProperty{JsiiProperty: "props", GoGetter: "Props"}, + _jsii_.MemberProperty{JsiiProperty: "record", GoGetter: "Record"}, + }, + func() interface{} { + return &jsiiProxy_ClassWithContainerTypes{} + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Is() { - _jsii_.InvokeVoid( - p, - "is", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ClassWithDocs", + reflect.TypeOf((*ClassWithDocs)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_ClassWithDocs{} + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Lambda() { - _jsii_.InvokeVoid( - p, - "lambda", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ClassWithJavaReservedWords", + reflect.TypeOf((*ClassWithJavaReservedWords)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "import", GoMethod: "Import"}, + _jsii_.MemberProperty{JsiiProperty: "int", GoGetter: "Int"}, + }, + func() interface{} { + return &jsiiProxy_ClassWithJavaReservedWords{} + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Nonlocal() { - _jsii_.InvokeVoid( - p, - "nonlocal", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ClassWithMutableObjectLiteralProperty", + reflect.TypeOf((*ClassWithMutableObjectLiteralProperty)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "mutableObject", GoGetter: "MutableObject"}, + }, + func() interface{} { + return &jsiiProxy_ClassWithMutableObjectLiteralProperty{} + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Not() { - _jsii_.InvokeVoid( - p, - "not", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ClassWithNestedUnion", + reflect.TypeOf((*ClassWithNestedUnion)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"}, + }, + func() interface{} { + return &jsiiProxy_ClassWithNestedUnion{} + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Or() { - _jsii_.InvokeVoid( - p, - "or", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties", + reflect.TypeOf((*ClassWithPrivateConstructorAndAutomaticProperties)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "readOnlyString", GoGetter: "ReadOnlyString"}, + _jsii_.MemberProperty{JsiiProperty: "readWriteString", GoGetter: "ReadWriteString"}, + }, + func() interface{} { + j := jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceWithProperties) + return &j + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Pass() { - _jsii_.InvokeVoid( - p, - "pass", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ConfusingToJackson", + reflect.TypeOf((*ConfusingToJackson)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"}, + }, + func() interface{} { + return &jsiiProxy_ConfusingToJackson{} + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Raise() { - _jsii_.InvokeVoid( - p, - "raise", - nil, // no parameters + _jsii_.RegisterStruct( + "jsii-calc.ConfusingToJacksonStruct", + reflect.TypeOf((*ConfusingToJacksonStruct)(nil)).Elem(), ) -} - -func (p *jsiiProxy_PythonReservedWords) Return() { - _jsii_.InvokeVoid( - p, - "return", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ConstructorPassesThisOut", + reflect.TypeOf((*ConstructorPassesThisOut)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_ConstructorPassesThisOut{} + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Try() { - _jsii_.InvokeVoid( - p, - "try", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.Constructors", + reflect.TypeOf((*Constructors)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_Constructors{} + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) While() { - _jsii_.InvokeVoid( - p, - "while", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ConsumePureInterface", + reflect.TypeOf((*ConsumePureInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "workItBaby", GoMethod: "WorkItBaby"}, + }, + func() interface{} { + return &jsiiProxy_ConsumePureInterface{} + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) With() { - _jsii_.InvokeVoid( - p, - "with", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ConsumerCanRingBell", + reflect.TypeOf((*ConsumerCanRingBell)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "implementedByObjectLiteral", GoMethod: "ImplementedByObjectLiteral"}, + _jsii_.MemberMethod{JsiiMethod: "implementedByPrivateClass", GoMethod: "ImplementedByPrivateClass"}, + _jsii_.MemberMethod{JsiiMethod: "implementedByPublicClass", GoMethod: "ImplementedByPublicClass"}, + _jsii_.MemberMethod{JsiiMethod: "whenTypedAsClass", GoMethod: "WhenTypedAsClass"}, + }, + func() interface{} { + return &jsiiProxy_ConsumerCanRingBell{} + }, ) -} - -func (p *jsiiProxy_PythonReservedWords) Yield() { - _jsii_.InvokeVoid( - p, - "yield", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ConsumersOfThisCrazyTypeSystem", + reflect.TypeOf((*ConsumersOfThisCrazyTypeSystem)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "consumeAnotherPublicInterface", GoMethod: "ConsumeAnotherPublicInterface"}, + _jsii_.MemberMethod{JsiiMethod: "consumeNonInternalInterface", GoMethod: "ConsumeNonInternalInterface"}, + }, + func() interface{} { + return &jsiiProxy_ConsumersOfThisCrazyTypeSystem{} + }, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ReferenceEnumFromScopedPackage.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" -) - -// See awslabs/jsii#138. -type ReferenceEnumFromScopedPackage interface { - Foo() scopejsiicalclib.EnumFromScopedModule - SetFoo(val scopejsiicalclib.EnumFromScopedModule) - LoadFoo() scopejsiicalclib.EnumFromScopedModule - SaveFoo(value scopejsiicalclib.EnumFromScopedModule) -} - -// The jsii proxy struct for ReferenceEnumFromScopedPackage -type jsiiProxy_ReferenceEnumFromScopedPackage struct { - _ byte // padding -} - -func (j *jsiiProxy_ReferenceEnumFromScopedPackage) Foo() scopejsiicalclib.EnumFromScopedModule { - var returns scopejsiicalclib.EnumFromScopedModule - _jsii_.Get( - j, - "foo", - &returns, + _jsii_.RegisterStruct( + "jsii-calc.ContainerProps", + reflect.TypeOf((*ContainerProps)(nil)).Elem(), ) - return returns -} - - -func NewReferenceEnumFromScopedPackage() ReferenceEnumFromScopedPackage { - _init_.Initialize() - - j := jsiiProxy_ReferenceEnumFromScopedPackage{} - - _jsii_.Create( - "jsii-calc.ReferenceEnumFromScopedPackage", - nil, // no parameters - &j, + _jsii_.RegisterClass( + "jsii-calc.DataRenderer", + reflect.TypeOf((*DataRenderer)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "render", GoMethod: "Render"}, + _jsii_.MemberMethod{JsiiMethod: "renderArbitrary", GoMethod: "RenderArbitrary"}, + _jsii_.MemberMethod{JsiiMethod: "renderMap", GoMethod: "RenderMap"}, + }, + func() interface{} { + return &jsiiProxy_DataRenderer{} + }, ) - - return &j -} - -func NewReferenceEnumFromScopedPackage_Override(r ReferenceEnumFromScopedPackage) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.ReferenceEnumFromScopedPackage", - nil, // no parameters - r, + _jsii_.RegisterClass( + "jsii-calc.Default", + reflect.TypeOf((*Default)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "pleaseCompile", GoMethod: "PleaseCompile"}, + }, + func() interface{} { + return &jsiiProxy_Default{} + }, ) -} - -func (j *jsiiProxy_ReferenceEnumFromScopedPackage)SetFoo(val scopejsiicalclib.EnumFromScopedModule) { - _jsii_.Set( - j, - "foo", - val, + _jsii_.RegisterClass( + "jsii-calc.DefaultedConstructorArgument", + reflect.TypeOf((*DefaultedConstructorArgument)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "arg1", GoGetter: "Arg1"}, + _jsii_.MemberProperty{JsiiProperty: "arg2", GoGetter: "Arg2"}, + _jsii_.MemberProperty{JsiiProperty: "arg3", GoGetter: "Arg3"}, + }, + func() interface{} { + return &jsiiProxy_DefaultedConstructorArgument{} + }, ) -} - -func (r *jsiiProxy_ReferenceEnumFromScopedPackage) LoadFoo() scopejsiicalclib.EnumFromScopedModule { - var returns scopejsiicalclib.EnumFromScopedModule - - _jsii_.Invoke( - r, - "loadFoo", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.Demonstrate982", + reflect.TypeOf((*Demonstrate982)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_Demonstrate982{} + }, ) - - return returns -} - -func (r *jsiiProxy_ReferenceEnumFromScopedPackage) SaveFoo(value scopejsiicalclib.EnumFromScopedModule) { - _jsii_.InvokeVoid( - r, - "saveFoo", - []interface{}{value}, + _jsii_.RegisterClass( + "jsii-calc.DeprecatedClass", + reflect.TypeOf((*DeprecatedClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, + _jsii_.MemberProperty{JsiiProperty: "readonlyProperty", GoGetter: "ReadonlyProperty"}, + }, + func() interface{} { + return &jsiiProxy_DeprecatedClass{} + }, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ReturnsPrivateImplementationOfInterface.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -// Helps ensure the JSII kernel & runtime cooperate correctly when an un-exported instance of a class is returned with a declared type that is an exported interface, and the instance inherits from an exported class. -// -// Returns: an instance of an un-exported class that extends \`ExportedBaseClass\`, declared as \`IPrivatelyImplemented\`. -// See: https://github.com/aws/jsii/issues/320 -// -type ReturnsPrivateImplementationOfInterface interface { - PrivateImplementation() IPrivatelyImplemented -} - -// The jsii proxy struct for ReturnsPrivateImplementationOfInterface -type jsiiProxy_ReturnsPrivateImplementationOfInterface struct { - _ byte // padding -} - -func (j *jsiiProxy_ReturnsPrivateImplementationOfInterface) PrivateImplementation() IPrivatelyImplemented { - var returns IPrivatelyImplemented - _jsii_.Get( - j, - "privateImplementation", - &returns, + _jsii_.RegisterEnum( + "jsii-calc.DeprecatedEnum", + reflect.TypeOf((*DeprecatedEnum)(nil)).Elem(), + map[string]interface{}{ + "OPTION_A": DeprecatedEnum_OPTION_A, + "OPTION_B": DeprecatedEnum_OPTION_B, + }, ) - return returns -} - - -func NewReturnsPrivateImplementationOfInterface() ReturnsPrivateImplementationOfInterface { - _init_.Initialize() - - j := jsiiProxy_ReturnsPrivateImplementationOfInterface{} - - _jsii_.Create( - "jsii-calc.ReturnsPrivateImplementationOfInterface", - nil, // no parameters - &j, + _jsii_.RegisterStruct( + "jsii-calc.DeprecatedStruct", + reflect.TypeOf((*DeprecatedStruct)(nil)).Elem(), ) - - return &j -} - -func NewReturnsPrivateImplementationOfInterface_Override(r ReturnsPrivateImplementationOfInterface) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.ReturnsPrivateImplementationOfInterface", - nil, // no parameters - r, + _jsii_.RegisterStruct( + "jsii-calc.DerivedStruct", + reflect.TypeOf((*DerivedStruct)(nil)).Elem(), ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_RootStruct.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -// This is here to check that we can pass a nested struct into a kwargs by specifying it as an in-line dictionary. -// -// This is cheating with the (current) declared types, but this is the "more -// idiomatic" way for Pythonists. -type RootStruct struct { - // May not be empty. - StringProp *string \`field:"required" json:"stringProp" yaml:"stringProp"\` - NestedStruct *NestedStruct \`field:"optional" json:"nestedStruct" yaml:"nestedStruct"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_RootStructValidator.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type RootStructValidator interface { -} - -// The jsii proxy struct for RootStructValidator -type jsiiProxy_RootStructValidator struct { - _ byte // padding -} - -func RootStructValidator_Validate(struct_ *RootStruct) { - _init_.Initialize() - - _jsii_.StaticInvokeVoid( - "jsii-calc.RootStructValidator", - "validate", - []interface{}{struct_}, + _jsii_.RegisterStruct( + "jsii-calc.DiamondBottom", + reflect.TypeOf((*DiamondBottom)(nil)).Elem(), ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_RuntimeTypeChecking.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - "time" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type RuntimeTypeChecking interface { - MethodWithDefaultedArguments(arg1 *float64, arg2 *string, arg3 *time.Time) - MethodWithOptionalAnyArgument(arg interface{}) - // Used to verify verification of number of method arguments. - MethodWithOptionalArguments(arg1 *float64, arg2 *string, arg3 *time.Time) -} - -// The jsii proxy struct for RuntimeTypeChecking -type jsiiProxy_RuntimeTypeChecking struct { - _ byte // padding -} - -func NewRuntimeTypeChecking() RuntimeTypeChecking { - _init_.Initialize() - - j := jsiiProxy_RuntimeTypeChecking{} - - _jsii_.Create( - "jsii-calc.RuntimeTypeChecking", - nil, // no parameters - &j, + _jsii_.RegisterStruct( + "jsii-calc.DiamondInheritanceBaseLevelStruct", + reflect.TypeOf((*DiamondInheritanceBaseLevelStruct)(nil)).Elem(), ) - - return &j -} - -func NewRuntimeTypeChecking_Override(r RuntimeTypeChecking) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.RuntimeTypeChecking", - nil, // no parameters - r, + _jsii_.RegisterStruct( + "jsii-calc.DiamondInheritanceFirstMidLevelStruct", + reflect.TypeOf((*DiamondInheritanceFirstMidLevelStruct)(nil)).Elem(), ) -} - -func (r *jsiiProxy_RuntimeTypeChecking) MethodWithDefaultedArguments(arg1 *float64, arg2 *string, arg3 *time.Time) { - _jsii_.InvokeVoid( - r, - "methodWithDefaultedArguments", - []interface{}{arg1, arg2, arg3}, + _jsii_.RegisterStruct( + "jsii-calc.DiamondInheritanceSecondMidLevelStruct", + reflect.TypeOf((*DiamondInheritanceSecondMidLevelStruct)(nil)).Elem(), ) -} - -func (r *jsiiProxy_RuntimeTypeChecking) MethodWithOptionalAnyArgument(arg interface{}) { - _jsii_.InvokeVoid( - r, - "methodWithOptionalAnyArgument", - []interface{}{arg}, + _jsii_.RegisterStruct( + "jsii-calc.DiamondInheritanceTopLevelStruct", + reflect.TypeOf((*DiamondInheritanceTopLevelStruct)(nil)).Elem(), ) -} - -func (r *jsiiProxy_RuntimeTypeChecking) MethodWithOptionalArguments(arg1 *float64, arg2 *string, arg3 *time.Time) { - _jsii_.InvokeVoid( - r, - "methodWithOptionalArguments", - []interface{}{arg1, arg2, arg3}, + _jsii_.RegisterClass( + "jsii-calc.DisappointingCollectionSource", + reflect.TypeOf((*DisappointingCollectionSource)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_DisappointingCollectionSource{} + }, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SecondLevelStruct.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type SecondLevelStruct struct { - // It's long and required. - DeeperRequiredProp *string \`field:"required" json:"deeperRequiredProp" yaml:"deeperRequiredProp"\` - // It's long, but you'll almost never pass it. - DeeperOptionalProp *string \`field:"optional" json:"deeperOptionalProp" yaml:"deeperOptionalProp"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SingleInstanceTwoTypes.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -// Test that a single instance can be returned under two different FQNs. -// -// JSII clients can instantiate 2 different strongly-typed wrappers for the same -// object. Unfortunately, this will break object equality, but if we didn't do -// this it would break runtime type checks in the JVM or CLR. -type SingleInstanceTwoTypes interface { - Interface1() InbetweenClass - Interface2() IPublicInterface -} - -// The jsii proxy struct for SingleInstanceTwoTypes -type jsiiProxy_SingleInstanceTwoTypes struct { - _ byte // padding -} - -func NewSingleInstanceTwoTypes() SingleInstanceTwoTypes { - _init_.Initialize() - - j := jsiiProxy_SingleInstanceTwoTypes{} - - _jsii_.Create( - "jsii-calc.SingleInstanceTwoTypes", - nil, // no parameters - &j, + _jsii_.RegisterClass( + "jsii-calc.DoNotOverridePrivates", + reflect.TypeOf((*DoNotOverridePrivates)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "changePrivatePropertyValue", GoMethod: "ChangePrivatePropertyValue"}, + _jsii_.MemberMethod{JsiiMethod: "privateMethodValue", GoMethod: "PrivateMethodValue"}, + _jsii_.MemberMethod{JsiiMethod: "privatePropertyValue", GoMethod: "PrivatePropertyValue"}, + }, + func() interface{} { + return &jsiiProxy_DoNotOverridePrivates{} + }, ) - - return &j -} - -func NewSingleInstanceTwoTypes_Override(s SingleInstanceTwoTypes) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.SingleInstanceTwoTypes", - nil, // no parameters - s, + _jsii_.RegisterClass( + "jsii-calc.DoNotRecognizeAnyAsOptional", + reflect.TypeOf((*DoNotRecognizeAnyAsOptional)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + }, + func() interface{} { + return &jsiiProxy_DoNotRecognizeAnyAsOptional{} + }, ) -} - -func (s *jsiiProxy_SingleInstanceTwoTypes) Interface1() InbetweenClass { - var returns InbetweenClass - - _jsii_.Invoke( - s, - "interface1", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.DocumentedClass", + reflect.TypeOf((*DocumentedClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "greet", GoMethod: "Greet"}, + _jsii_.MemberMethod{JsiiMethod: "hola", GoMethod: "Hola"}, + }, + func() interface{} { + return &jsiiProxy_DocumentedClass{} + }, ) - - return returns -} - -func (s *jsiiProxy_SingleInstanceTwoTypes) Interface2() IPublicInterface { - var returns IPublicInterface - - _jsii_.Invoke( - s, - "interface2", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.DontComplainAboutVariadicAfterOptional", + reflect.TypeOf((*DontComplainAboutVariadicAfterOptional)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "optionalAndVariadic", GoMethod: "OptionalAndVariadic"}, + }, + func() interface{} { + return &jsiiProxy_DontComplainAboutVariadicAfterOptional{} + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SingletonInt.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -// Verifies that singleton enums are handled correctly. -// -// https://github.com/aws/jsii/issues/231 -type SingletonInt interface { - IsSingletonInt(value *float64) *bool -} - -// The jsii proxy struct for SingletonInt -type jsiiProxy_SingletonInt struct { - _ byte // padding -} - -func (s *jsiiProxy_SingletonInt) IsSingletonInt(value *float64) *bool { - var returns *bool - - _jsii_.Invoke( - s, - "isSingletonInt", - []interface{}{value}, - &returns, + _jsii_.RegisterClass( + "jsii-calc.DoubleTrouble", + reflect.TypeOf((*DoubleTrouble)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, + _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"}, + }, + func() interface{} { + j := jsiiProxy_DoubleTrouble{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IFriendlyRandomGenerator) + return &j + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SingletonIntEnum.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -// A singleton integer. -type SingletonIntEnum string - -const ( - // Elite! - SingletonIntEnum_SINGLETON_INT SingletonIntEnum = "SINGLETON_INT" -) - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SingletonString.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -// Verifies that singleton enums are handled correctly. -// -// https://github.com/aws/jsii/issues/231 -type SingletonString interface { - IsSingletonString(value *string) *bool -} - -// The jsii proxy struct for SingletonString -type jsiiProxy_SingletonString struct { - _ byte // padding -} - -func (s *jsiiProxy_SingletonString) IsSingletonString(value *string) *bool { - var returns *bool - - _jsii_.Invoke( - s, - "isSingletonString", - []interface{}{value}, - &returns, + _jsii_.RegisterStruct( + "jsii-calc.DummyObj", + reflect.TypeOf((*DummyObj)(nil)).Elem(), ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SingletonStringEnum.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -// A singleton string. -type SingletonStringEnum string - -const ( - // 1337. - SingletonStringEnum_SINGLETON_STRING SingletonStringEnum = "SINGLETON_STRING" -) - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SmellyStruct.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type SmellyStruct struct { - Property *string \`field:"required" json:"property" yaml:"property"\` - YetAnoterOne *bool \`field:"required" json:"yetAnoterOne" yaml:"yetAnoterOne"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SomeTypeJsii976.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type SomeTypeJsii976 interface { -} - -// The jsii proxy struct for SomeTypeJsii976 -type jsiiProxy_SomeTypeJsii976 struct { - _ byte // padding -} - -func NewSomeTypeJsii976() SomeTypeJsii976 { - _init_.Initialize() - - j := jsiiProxy_SomeTypeJsii976{} - - _jsii_.Create( - "jsii-calc.SomeTypeJsii976", - nil, // no parameters - &j, + _jsii_.RegisterClass( + "jsii-calc.DynamicPropertyBearer", + reflect.TypeOf((*DynamicPropertyBearer)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "dynamicProperty", GoGetter: "DynamicProperty"}, + _jsii_.MemberProperty{JsiiProperty: "valueStore", GoGetter: "ValueStore"}, + }, + func() interface{} { + return &jsiiProxy_DynamicPropertyBearer{} + }, ) - - return &j -} - -func NewSomeTypeJsii976_Override(s SomeTypeJsii976) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.SomeTypeJsii976", - nil, // no parameters - s, + _jsii_.RegisterClass( + "jsii-calc.DynamicPropertyBearerChild", + reflect.TypeOf((*DynamicPropertyBearerChild)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "dynamicProperty", GoGetter: "DynamicProperty"}, + _jsii_.MemberProperty{JsiiProperty: "originalValue", GoGetter: "OriginalValue"}, + _jsii_.MemberMethod{JsiiMethod: "overrideValue", GoMethod: "OverrideValue"}, + _jsii_.MemberProperty{JsiiProperty: "valueStore", GoGetter: "ValueStore"}, + }, + func() interface{} { + j := jsiiProxy_DynamicPropertyBearerChild{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_DynamicPropertyBearer) + return &j + }, ) -} - -func SomeTypeJsii976_ReturnAnonymous() interface{} { - _init_.Initialize() - - var returns interface{} - - _jsii_.StaticInvoke( - "jsii-calc.SomeTypeJsii976", - "returnAnonymous", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.Entropy", + reflect.TypeOf((*Entropy)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "increase", GoMethod: "Increase"}, + _jsii_.MemberMethod{JsiiMethod: "repeat", GoMethod: "Repeat"}, + }, + func() interface{} { + return &jsiiProxy_Entropy{} + }, ) - - return returns -} - -func SomeTypeJsii976_ReturnReturn() IReturnJsii976 { - _init_.Initialize() - - var returns IReturnJsii976 - - _jsii_.StaticInvoke( - "jsii-calc.SomeTypeJsii976", - "returnReturn", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.EnumDispenser", + reflect.TypeOf((*EnumDispenser)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_EnumDispenser{} + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StableClass.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type StableClass interface { - MutableProperty() *float64 - SetMutableProperty(val *float64) - ReadonlyProperty() *string - Method() -} - -// The jsii proxy struct for StableClass -type jsiiProxy_StableClass struct { - _ byte // padding -} - -func (j *jsiiProxy_StableClass) MutableProperty() *float64 { - var returns *float64 - _jsii_.Get( - j, - "mutableProperty", - &returns, + _jsii_.RegisterClass( + "jsii-calc.EraseUndefinedHashValues", + reflect.TypeOf((*EraseUndefinedHashValues)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_EraseUndefinedHashValues{} + }, ) - return returns -} - -func (j *jsiiProxy_StableClass) ReadonlyProperty() *string { - var returns *string - _jsii_.Get( - j, - "readonlyProperty", - &returns, + _jsii_.RegisterStruct( + "jsii-calc.EraseUndefinedHashValuesOptions", + reflect.TypeOf((*EraseUndefinedHashValuesOptions)(nil)).Elem(), ) - return returns -} - - -func NewStableClass(readonlyString *string, mutableNumber *float64) StableClass { - _init_.Initialize() - - j := jsiiProxy_StableClass{} - - _jsii_.Create( - "jsii-calc.StableClass", - []interface{}{readonlyString, mutableNumber}, - &j, + _jsii_.RegisterClass( + "jsii-calc.ExperimentalClass", + reflect.TypeOf((*ExperimentalClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, + _jsii_.MemberProperty{JsiiProperty: "readonlyProperty", GoGetter: "ReadonlyProperty"}, + }, + func() interface{} { + return &jsiiProxy_ExperimentalClass{} + }, ) - - return &j -} - -func NewStableClass_Override(s StableClass, readonlyString *string, mutableNumber *float64) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.StableClass", - []interface{}{readonlyString, mutableNumber}, - s, + _jsii_.RegisterEnum( + "jsii-calc.ExperimentalEnum", + reflect.TypeOf((*ExperimentalEnum)(nil)).Elem(), + map[string]interface{}{ + "OPTION_A": ExperimentalEnum_OPTION_A, + "OPTION_B": ExperimentalEnum_OPTION_B, + }, ) -} - -func (j *jsiiProxy_StableClass)SetMutableProperty(val *float64) { - _jsii_.Set( - j, - "mutableProperty", - val, + _jsii_.RegisterStruct( + "jsii-calc.ExperimentalStruct", + reflect.TypeOf((*ExperimentalStruct)(nil)).Elem(), ) -} - -func (s *jsiiProxy_StableClass) Method() { - _jsii_.InvokeVoid( - s, - "method", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.ExportedBaseClass", + reflect.TypeOf((*ExportedBaseClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "success", GoGetter: "Success"}, + }, + func() interface{} { + return &jsiiProxy_ExportedBaseClass{} + }, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StableEnum.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type StableEnum string - -const ( - StableEnum_OPTION_A StableEnum = "OPTION_A" - StableEnum_OPTION_B StableEnum = "OPTION_B" -) - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StableStruct.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type StableStruct struct { - ReadonlyProperty *string \`field:"required" json:"readonlyProperty" yaml:"readonlyProperty"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StaticContext.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -// This is used to validate the ability to use \`this\` from within a static context. -// -// https://github.com/awslabs/aws-cdk/issues/2304 -type StaticContext interface { -} - -// The jsii proxy struct for StaticContext -type jsiiProxy_StaticContext struct { - _ byte // padding -} - -func StaticContext_CanAccessStaticContext() *bool { - _init_.Initialize() - - var returns *bool - - _jsii_.StaticInvoke( - "jsii-calc.StaticContext", - "canAccessStaticContext", - nil, // no parameters - &returns, + _jsii_.RegisterStruct( + "jsii-calc.ExtendsInternalInterface", + reflect.TypeOf((*ExtendsInternalInterface)(nil)).Elem(), ) - - return returns -} - -func StaticContext_StaticVariable() *bool { - _init_.Initialize() - var returns *bool - _jsii_.StaticGet( - "jsii-calc.StaticContext", - "staticVariable", - &returns, + _jsii_.RegisterClass( + "jsii-calc.ExternalClass", + reflect.TypeOf((*ExternalClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, + _jsii_.MemberProperty{JsiiProperty: "readonlyProperty", GoGetter: "ReadonlyProperty"}, + }, + func() interface{} { + return &jsiiProxy_ExternalClass{} + }, ) - return returns -} - -func StaticContext_SetStaticVariable(val *bool) { - _init_.Initialize() - _jsii_.StaticSet( - "jsii-calc.StaticContext", - "staticVariable", - val, + _jsii_.RegisterEnum( + "jsii-calc.ExternalEnum", + reflect.TypeOf((*ExternalEnum)(nil)).Elem(), + map[string]interface{}{ + "OPTION_A": ExternalEnum_OPTION_A, + "OPTION_B": ExternalEnum_OPTION_B, + }, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StaticHelloChild.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type StaticHelloChild interface { - StaticHelloParent -} - -// The jsii proxy struct for StaticHelloChild -type jsiiProxy_StaticHelloChild struct { - jsiiProxy_StaticHelloParent -} - -func StaticHelloChild_Method() { - _init_.Initialize() - - _jsii_.StaticInvokeVoid( - "jsii-calc.StaticHelloChild", - "method", - nil, // no parameters + _jsii_.RegisterStruct( + "jsii-calc.ExternalStruct", + reflect.TypeOf((*ExternalStruct)(nil)).Elem(), ) -} - -func StaticHelloChild_Property() *float64 { - _init_.Initialize() - var returns *float64 - _jsii_.StaticGet( - "jsii-calc.StaticHelloChild", - "property", - &returns, + _jsii_.RegisterClass( + "jsii-calc.FullCombo", + reflect.TypeOf((*FullCombo)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, + }, + func() interface{} { + j := jsiiProxy_FullCombo{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_BaseClass) + _jsii_.InitJsiiProxy(&j.jsiiProxy_IIndirectlyImplemented) + return &j + }, ) - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StaticHelloParent.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -// Static methods that override parent class are technically overrides (the inheritance of statics is part of the ES6 specification), but certain other languages such as Java do not carry statics in the inheritance chain at all, so they cannot be overridden, only hidden. -// -// The difference is fairly minor (for typical use-cases, the end result is the -// same), however this has implications on what the generated code should look -// like. -type StaticHelloParent interface { -} - -// The jsii proxy struct for StaticHelloParent -type jsiiProxy_StaticHelloParent struct { - _ byte // padding -} - -func NewStaticHelloParent() StaticHelloParent { - _init_.Initialize() - - j := jsiiProxy_StaticHelloParent{} - - _jsii_.Create( - "jsii-calc.StaticHelloParent", - nil, // no parameters - &j, + _jsii_.RegisterClass( + "jsii-calc.GiveMeStructs", + reflect.TypeOf((*GiveMeStructs)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "derivedToFirst", GoMethod: "DerivedToFirst"}, + _jsii_.MemberMethod{JsiiMethod: "readDerivedNonPrimitive", GoMethod: "ReadDerivedNonPrimitive"}, + _jsii_.MemberMethod{JsiiMethod: "readFirstNumber", GoMethod: "ReadFirstNumber"}, + _jsii_.MemberProperty{JsiiProperty: "structLiteral", GoGetter: "StructLiteral"}, + }, + func() interface{} { + return &jsiiProxy_GiveMeStructs{} + }, ) - - return &j -} - -func NewStaticHelloParent_Override(s StaticHelloParent) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.StaticHelloParent", - nil, // no parameters - s, + _jsii_.RegisterStruct( + "jsii-calc.Greetee", + reflect.TypeOf((*Greetee)(nil)).Elem(), ) -} - -func StaticHelloParent_Method() { - _init_.Initialize() - - _jsii_.StaticInvokeVoid( - "jsii-calc.StaticHelloParent", - "method", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.GreetingAugmenter", + reflect.TypeOf((*GreetingAugmenter)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "betterGreeting", GoMethod: "BetterGreeting"}, + }, + func() interface{} { + return &jsiiProxy_GreetingAugmenter{} + }, ) -} - -func StaticHelloParent_Property() *float64 { - _init_.Initialize() - var returns *float64 - _jsii_.StaticGet( - "jsii-calc.StaticHelloParent", - "property", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IAnonymousImplementationProvider", + reflect.TypeOf((*IAnonymousImplementationProvider)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "provideAsClass", GoMethod: "ProvideAsClass"}, + _jsii_.MemberMethod{JsiiMethod: "provideAsInterface", GoMethod: "ProvideAsInterface"}, + }, + func() interface{} { + return &jsiiProxy_IAnonymousImplementationProvider{} + }, ) - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Statics.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type Statics interface { - Value() *string - JustMethod() *string -} - -// The jsii proxy struct for Statics -type jsiiProxy_Statics struct { - _ byte // padding -} - -func (j *jsiiProxy_Statics) Value() *string { - var returns *string - _jsii_.Get( - j, - "value", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IAnonymouslyImplementMe", + reflect.TypeOf((*IAnonymouslyImplementMe)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + _jsii_.MemberMethod{JsiiMethod: "verb", GoMethod: "Verb"}, + }, + func() interface{} { + return &jsiiProxy_IAnonymouslyImplementMe{} + }, + ) + _jsii_.RegisterInterface( + "jsii-calc.IAnotherPublicInterface", + reflect.TypeOf((*IAnotherPublicInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"}, + }, + func() interface{} { + return &jsiiProxy_IAnotherPublicInterface{} + }, + ) + _jsii_.RegisterInterface( + "jsii-calc.IBell", + reflect.TypeOf((*IBell)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "ring", GoMethod: "Ring"}, + }, + func() interface{} { + return &jsiiProxy_IBell{} + }, + ) + _jsii_.RegisterInterface( + "jsii-calc.IBellRinger", + reflect.TypeOf((*IBellRinger)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "yourTurn", GoMethod: "YourTurn"}, + }, + func() interface{} { + return &jsiiProxy_IBellRinger{} + }, ) - return returns -} - - -func NewStatics(value *string) Statics { - _init_.Initialize() - - j := jsiiProxy_Statics{} - - _jsii_.Create( - "jsii-calc.Statics", - []interface{}{value}, - &j, + _jsii_.RegisterInterface( + "jsii-calc.IConcreteBellRinger", + reflect.TypeOf((*IConcreteBellRinger)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "yourTurn", GoMethod: "YourTurn"}, + }, + func() interface{} { + return &jsiiProxy_IConcreteBellRinger{} + }, ) - - return &j -} - -func NewStatics_Override(s Statics, value *string) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.Statics", - []interface{}{value}, - s, + _jsii_.RegisterInterface( + "jsii-calc.IDeprecatedInterface", + reflect.TypeOf((*IDeprecatedInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, + }, + func() interface{} { + return &jsiiProxy_IDeprecatedInterface{} + }, ) -} - -// Jsdocs for static method. -func Statics_StaticMethod(name *string) *string { - _init_.Initialize() - - var returns *string - - _jsii_.StaticInvoke( - "jsii-calc.Statics", - "staticMethod", - []interface{}{name}, - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IExperimentalInterface", + reflect.TypeOf((*IExperimentalInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, + }, + func() interface{} { + return &jsiiProxy_IExperimentalInterface{} + }, ) - - return returns -} - -func Statics_BAR() *float64 { - _init_.Initialize() - var returns *float64 - _jsii_.StaticGet( - "jsii-calc.Statics", - "BAR", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IExtendsPrivateInterface", + reflect.TypeOf((*IExtendsPrivateInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "moreThings", GoGetter: "MoreThings"}, + _jsii_.MemberProperty{JsiiProperty: "private", GoGetter: "Private"}, + }, + func() interface{} { + return &jsiiProxy_IExtendsPrivateInterface{} + }, ) - return returns -} - -func Statics_ConstObj() DoubleTrouble { - _init_.Initialize() - var returns DoubleTrouble - _jsii_.StaticGet( - "jsii-calc.Statics", - "ConstObj", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IExternalInterface", + reflect.TypeOf((*IExternalInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, + }, + func() interface{} { + return &jsiiProxy_IExternalInterface{} + }, ) - return returns -} - -func Statics_Foo() *string { - _init_.Initialize() - var returns *string - _jsii_.StaticGet( - "jsii-calc.Statics", - "Foo", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IFriendlier", + reflect.TypeOf((*IFriendlier)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "farewell", GoMethod: "Farewell"}, + _jsii_.MemberMethod{JsiiMethod: "goodbye", GoMethod: "Goodbye"}, + _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, + }, + func() interface{} { + j := jsiiProxy_IFriendlier{} + _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibIFriendly) + return &j + }, ) - return returns -} - -func Statics_Instance() Statics { - _init_.Initialize() - var returns Statics - _jsii_.StaticGet( - "jsii-calc.Statics", - "instance", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IFriendlyRandomGenerator", + reflect.TypeOf((*IFriendlyRandomGenerator)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, + _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"}, + }, + func() interface{} { + j := jsiiProxy_IFriendlyRandomGenerator{} + _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibIFriendly) + _jsii_.InitJsiiProxy(&j.jsiiProxy_IRandomNumberGenerator) + return &j + }, ) - return returns -} - -func Statics_SetInstance(val Statics) { - _init_.Initialize() - _jsii_.StaticSet( - "jsii-calc.Statics", - "instance", - val, + _jsii_.RegisterInterface( + "jsii-calc.IIndirectlyImplemented", + reflect.TypeOf((*IIndirectlyImplemented)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, + }, + func() interface{} { + return &jsiiProxy_IIndirectlyImplemented{} + }, ) -} - -func Statics_NonConstStatic() *float64 { - _init_.Initialize() - var returns *float64 - _jsii_.StaticGet( - "jsii-calc.Statics", - "nonConstStatic", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IInterfaceImplementedByAbstractClass", + reflect.TypeOf((*IInterfaceImplementedByAbstractClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "propFromInterface", GoGetter: "PropFromInterface"}, + }, + func() interface{} { + return &jsiiProxy_IInterfaceImplementedByAbstractClass{} + }, ) - return returns -} - -func Statics_SetNonConstStatic(val *float64) { - _init_.Initialize() - _jsii_.StaticSet( - "jsii-calc.Statics", - "nonConstStatic", - val, + _jsii_.RegisterInterface( + "jsii-calc.IInterfaceThatShouldNotBeADataType", + reflect.TypeOf((*IInterfaceThatShouldNotBeADataType)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "doThings", GoMethod: "DoThings"}, + _jsii_.MemberProperty{JsiiProperty: "otherValue", GoGetter: "OtherValue"}, + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + j := jsiiProxy_IInterfaceThatShouldNotBeADataType{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceWithMethods) + return &j + }, ) -} - -func Statics_ZooBar() *map[string]*string { - _init_.Initialize() - var returns *map[string]*string - _jsii_.StaticGet( - "jsii-calc.Statics", - "zooBar", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IInterfaceWithInternal", + reflect.TypeOf((*IInterfaceWithInternal)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "visible", GoMethod: "Visible"}, + }, + func() interface{} { + return &jsiiProxy_IInterfaceWithInternal{} + }, ) - return returns -} - -func (s *jsiiProxy_Statics) JustMethod() *string { - var returns *string - - _jsii_.Invoke( - s, - "justMethod", - nil, // no parameters - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IInterfaceWithMethods", + reflect.TypeOf((*IInterfaceWithMethods)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "doThings", GoMethod: "DoThings"}, + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + return &jsiiProxy_IInterfaceWithMethods{} + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StringEnum.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type StringEnum string - -const ( - StringEnum_A StringEnum = "A" - StringEnum_B StringEnum = "B" - StringEnum_C StringEnum = "C" -) - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StripInternal.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type StripInternal interface { - YouSeeMe() *string - SetYouSeeMe(val *string) -} - -// The jsii proxy struct for StripInternal -type jsiiProxy_StripInternal struct { - _ byte // padding -} - -func (j *jsiiProxy_StripInternal) YouSeeMe() *string { - var returns *string - _jsii_.Get( - j, - "youSeeMe", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IInterfaceWithOptionalMethodArguments", + reflect.TypeOf((*IInterfaceWithOptionalMethodArguments)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, + }, + func() interface{} { + return &jsiiProxy_IInterfaceWithOptionalMethodArguments{} + }, ) - return returns -} - - -func NewStripInternal() StripInternal { - _init_.Initialize() - - j := jsiiProxy_StripInternal{} - - _jsii_.Create( - "jsii-calc.StripInternal", - nil, // no parameters - &j, + _jsii_.RegisterInterface( + "jsii-calc.IInterfaceWithProperties", + reflect.TypeOf((*IInterfaceWithProperties)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "readOnlyString", GoGetter: "ReadOnlyString"}, + _jsii_.MemberProperty{JsiiProperty: "readWriteString", GoGetter: "ReadWriteString"}, + }, + func() interface{} { + return &jsiiProxy_IInterfaceWithProperties{} + }, ) - - return &j -} - -func NewStripInternal_Override(s StripInternal) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.StripInternal", - nil, // no parameters - s, + _jsii_.RegisterInterface( + "jsii-calc.IInterfaceWithPropertiesExtension", + reflect.TypeOf((*IInterfaceWithPropertiesExtension)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "foo", GoGetter: "Foo"}, + _jsii_.MemberProperty{JsiiProperty: "readOnlyString", GoGetter: "ReadOnlyString"}, + _jsii_.MemberProperty{JsiiProperty: "readWriteString", GoGetter: "ReadWriteString"}, + }, + func() interface{} { + j := jsiiProxy_IInterfaceWithPropertiesExtension{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceWithProperties) + return &j + }, ) -} - -func (j *jsiiProxy_StripInternal)SetYouSeeMe(val *string) { - _jsii_.Set( - j, - "youSeeMe", - val, + _jsii_.RegisterInterface( + "jsii-calc.IJSII417Derived", + reflect.TypeOf((*IJSII417Derived)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, + _jsii_.MemberMethod{JsiiMethod: "baz", GoMethod: "Baz"}, + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + _jsii_.MemberProperty{JsiiProperty: "hasRoot", GoGetter: "HasRoot"}, + _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, + }, + func() interface{} { + j := jsiiProxy_IJSII417Derived{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IJSII417PublicBaseOfBase) + return &j + }, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StructA.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -// We can serialize and deserialize structs without silently ignoring optional fields. -type StructA struct { - RequiredString *string \`field:"required" json:"requiredString" yaml:"requiredString"\` - OptionalNumber *float64 \`field:"optional" json:"optionalNumber" yaml:"optionalNumber"\` - OptionalString *string \`field:"optional" json:"optionalString" yaml:"optionalString"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StructB.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -// This intentionally overlaps with StructA (where only requiredString is provided) to test htat the kernel properly disambiguates those. -type StructB struct { - RequiredString *string \`field:"required" json:"requiredString" yaml:"requiredString"\` - OptionalBoolean *bool \`field:"optional" json:"optionalBoolean" yaml:"optionalBoolean"\` - OptionalStructA *StructA \`field:"optional" json:"optionalStructA" yaml:"optionalStructA"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StructParameterType.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -// Verifies that, in languages that do keyword lifting (e.g: Python), having a struct member with the same name as a positional parameter results in the correct code being emitted. -// -// See: https://github.com/aws/aws-cdk/issues/4302 -type StructParameterType struct { - Scope *string \`field:"required" json:"scope" yaml:"scope"\` - Props *bool \`field:"optional" json:"props" yaml:"props"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StructPassing.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -// Just because we can. -type StructPassing interface { -} - -// The jsii proxy struct for StructPassing -type jsiiProxy_StructPassing struct { - _ byte // padding -} - -func NewStructPassing() StructPassing { - _init_.Initialize() - - j := jsiiProxy_StructPassing{} - - _jsii_.Create( - "jsii-calc.StructPassing", - nil, // no parameters - &j, + _jsii_.RegisterInterface( + "jsii-calc.IJSII417PublicBaseOfBase", + reflect.TypeOf((*IJSII417PublicBaseOfBase)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + _jsii_.MemberProperty{JsiiProperty: "hasRoot", GoGetter: "HasRoot"}, + }, + func() interface{} { + return &jsiiProxy_IJSII417PublicBaseOfBase{} + }, + ) + _jsii_.RegisterInterface( + "jsii-calc.IJavaReservedWordsInAnInterface", + reflect.TypeOf((*IJavaReservedWordsInAnInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "abstract", GoMethod: "Abstract"}, + _jsii_.MemberMethod{JsiiMethod: "assert", GoMethod: "Assert"}, + _jsii_.MemberMethod{JsiiMethod: "boolean", GoMethod: "Boolean"}, + _jsii_.MemberMethod{JsiiMethod: "break", GoMethod: "Break"}, + _jsii_.MemberMethod{JsiiMethod: "byte", GoMethod: "Byte"}, + _jsii_.MemberMethod{JsiiMethod: "case", GoMethod: "Case"}, + _jsii_.MemberMethod{JsiiMethod: "catch", GoMethod: "Catch"}, + _jsii_.MemberMethod{JsiiMethod: "char", GoMethod: "Char"}, + _jsii_.MemberMethod{JsiiMethod: "class", GoMethod: "Class"}, + _jsii_.MemberMethod{JsiiMethod: "const", GoMethod: "Const"}, + _jsii_.MemberMethod{JsiiMethod: "continue", GoMethod: "Continue"}, + _jsii_.MemberMethod{JsiiMethod: "default", GoMethod: "Default"}, + _jsii_.MemberMethod{JsiiMethod: "do", GoMethod: "Do"}, + _jsii_.MemberMethod{JsiiMethod: "double", GoMethod: "Double"}, + _jsii_.MemberMethod{JsiiMethod: "else", GoMethod: "Else"}, + _jsii_.MemberMethod{JsiiMethod: "enum", GoMethod: "Enum"}, + _jsii_.MemberMethod{JsiiMethod: "extends", GoMethod: "Extends"}, + _jsii_.MemberMethod{JsiiMethod: "false", GoMethod: "False"}, + _jsii_.MemberMethod{JsiiMethod: "final", GoMethod: "Final"}, + _jsii_.MemberMethod{JsiiMethod: "finally", GoMethod: "Finally"}, + _jsii_.MemberMethod{JsiiMethod: "float", GoMethod: "Float"}, + _jsii_.MemberMethod{JsiiMethod: "for", GoMethod: "For"}, + _jsii_.MemberMethod{JsiiMethod: "goto", GoMethod: "Goto"}, + _jsii_.MemberMethod{JsiiMethod: "if", GoMethod: "If"}, + _jsii_.MemberMethod{JsiiMethod: "implements", GoMethod: "Implements"}, + _jsii_.MemberMethod{JsiiMethod: "import", GoMethod: "Import"}, + _jsii_.MemberMethod{JsiiMethod: "instanceof", GoMethod: "Instanceof"}, + _jsii_.MemberMethod{JsiiMethod: "int", GoMethod: "Int"}, + _jsii_.MemberMethod{JsiiMethod: "interface", GoMethod: "Interface"}, + _jsii_.MemberMethod{JsiiMethod: "long", GoMethod: "Long"}, + _jsii_.MemberMethod{JsiiMethod: "native", GoMethod: "Native"}, + _jsii_.MemberMethod{JsiiMethod: "null", GoMethod: "Null"}, + _jsii_.MemberMethod{JsiiMethod: "package", GoMethod: "Package"}, + _jsii_.MemberMethod{JsiiMethod: "private", GoMethod: "Private"}, + _jsii_.MemberMethod{JsiiMethod: "protected", GoMethod: "Protected"}, + _jsii_.MemberMethod{JsiiMethod: "public", GoMethod: "Public"}, + _jsii_.MemberMethod{JsiiMethod: "return", GoMethod: "Return"}, + _jsii_.MemberMethod{JsiiMethod: "short", GoMethod: "Short"}, + _jsii_.MemberMethod{JsiiMethod: "static", GoMethod: "Static"}, + _jsii_.MemberMethod{JsiiMethod: "strictfp", GoMethod: "Strictfp"}, + _jsii_.MemberMethod{JsiiMethod: "super", GoMethod: "Super"}, + _jsii_.MemberMethod{JsiiMethod: "switch", GoMethod: "Switch"}, + _jsii_.MemberMethod{JsiiMethod: "synchronized", GoMethod: "Synchronized"}, + _jsii_.MemberMethod{JsiiMethod: "this", GoMethod: "This"}, + _jsii_.MemberMethod{JsiiMethod: "throw", GoMethod: "Throw"}, + _jsii_.MemberMethod{JsiiMethod: "throws", GoMethod: "Throws"}, + _jsii_.MemberMethod{JsiiMethod: "transient", GoMethod: "Transient"}, + _jsii_.MemberMethod{JsiiMethod: "true", GoMethod: "True"}, + _jsii_.MemberMethod{JsiiMethod: "try", GoMethod: "Try"}, + _jsii_.MemberMethod{JsiiMethod: "void", GoMethod: "Void"}, + _jsii_.MemberMethod{JsiiMethod: "volatile", GoMethod: "Volatile"}, + _jsii_.MemberProperty{JsiiProperty: "while", GoGetter: "While"}, + }, + func() interface{} { + return &jsiiProxy_IJavaReservedWordsInAnInterface{} + }, ) - - return &j -} - -func NewStructPassing_Override(s StructPassing) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.StructPassing", - nil, // no parameters - s, + _jsii_.RegisterInterface( + "jsii-calc.IJsii487External", + reflect.TypeOf((*IJsii487External)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_IJsii487External{} + }, ) -} - -func StructPassing_HowManyVarArgsDidIPass(_positional *float64, inputs ...*TopLevelStruct) *float64 { - _init_.Initialize() - - args := []interface{}{_positional} - for _, a := range inputs { - args = append(args, a) - } - - var returns *float64 - - _jsii_.StaticInvoke( - "jsii-calc.StructPassing", - "howManyVarArgsDidIPass", - args, - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IJsii487External2", + reflect.TypeOf((*IJsii487External2)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_IJsii487External2{} + }, ) - - return returns -} - -func StructPassing_RoundTrip(_positional *float64, input *TopLevelStruct) *TopLevelStruct { - _init_.Initialize() - - var returns *TopLevelStruct - - _jsii_.StaticInvoke( - "jsii-calc.StructPassing", - "roundTrip", - []interface{}{_positional, input}, - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IJsii496", + reflect.TypeOf((*IJsii496)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_IJsii496{} + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StructUnionConsumer.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type StructUnionConsumer interface { -} - -// The jsii proxy struct for StructUnionConsumer -type jsiiProxy_StructUnionConsumer struct { - _ byte // padding -} - -func StructUnionConsumer_IsStructA(struct_ interface{}) *bool { - _init_.Initialize() - - var returns *bool - - _jsii_.StaticInvoke( - "jsii-calc.StructUnionConsumer", - "isStructA", - []interface{}{struct_}, - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IMutableObjectLiteral", + reflect.TypeOf((*IMutableObjectLiteral)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + return &jsiiProxy_IMutableObjectLiteral{} + }, ) - - return returns -} - -func StructUnionConsumer_IsStructB(struct_ interface{}) *bool { - _init_.Initialize() - - var returns *bool - - _jsii_.StaticInvoke( - "jsii-calc.StructUnionConsumer", - "isStructB", - []interface{}{struct_}, - &returns, + _jsii_.RegisterInterface( + "jsii-calc.INonInternalInterface", + reflect.TypeOf((*INonInternalInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"}, + _jsii_.MemberProperty{JsiiProperty: "b", GoGetter: "B"}, + _jsii_.MemberProperty{JsiiProperty: "c", GoGetter: "C"}, + }, + func() interface{} { + j := jsiiProxy_INonInternalInterface{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IAnotherPublicInterface) + return &j + }, ) - - return returns -} - -func StructUnionConsumer_ProvideStruct(which *string) interface{} { - _init_.Initialize() - - var returns interface{} - - _jsii_.StaticInvoke( - "jsii-calc.StructUnionConsumer", - "provideStruct", - []interface{}{which}, - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IObjectWithProperty", + reflect.TypeOf((*IObjectWithProperty)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, + _jsii_.MemberMethod{JsiiMethod: "wasSet", GoMethod: "WasSet"}, + }, + func() interface{} { + return &jsiiProxy_IObjectWithProperty{} + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StructWithCollectionOfUnionts.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type StructWithCollectionOfUnionts struct { - UnionProperty *[]*map[string]interface{} \`field:"required" json:"unionProperty" yaml:"unionProperty"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StructWithEnum.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type StructWithEnum struct { - // An enum value. - Foo StringEnum \`field:"required" json:"foo" yaml:"foo"\` - // Optional enum value (of type integer). - Bar AllTypesEnum \`field:"optional" json:"bar" yaml:"bar"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StructWithJavaReservedWords.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type StructWithJavaReservedWords struct { - Default *string \`field:"required" json:"default" yaml:"default"\` - Assert *string \`field:"optional" json:"assert" yaml:"assert"\` - Result *string \`field:"optional" json:"result" yaml:"result"\` - That *string \`field:"optional" json:"that" yaml:"that"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Sum.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition" - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" -) - -// An operation that sums multiple values. -type Sum interface { - composition.CompositeOperation - // A set of postfixes to include in a decorated .toString(). - DecorationPostfixes() *[]*string - SetDecorationPostfixes(val *[]*string) - // A set of prefixes to include in a decorated .toString(). - DecorationPrefixes() *[]*string - SetDecorationPrefixes(val *[]*string) - // The expression that this operation consists of. - // - // Must be implemented by derived classes. - Expression() scopejsiicalclib.NumericValue - // The parts to sum. - Parts() *[]scopejsiicalclib.NumericValue - SetParts(val *[]scopejsiicalclib.NumericValue) - // The .toString() style. - StringStyle() composition.CompositeOperation_CompositionStringStyle - SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) - // The value. - Value() *float64 - // String representation of the value. - ToString() *string - // Returns: the name of the class (to verify native type names are created for derived classes). - TypeName() interface{} -} - -// The jsii proxy struct for Sum -type jsiiProxy_Sum struct { - internal.Type__compositionCompositeOperation -} - -func (j *jsiiProxy_Sum) DecorationPostfixes() *[]*string { - var returns *[]*string - _jsii_.Get( - j, - "decorationPostfixes", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IOptionalMethod", + reflect.TypeOf((*IOptionalMethod)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "optional", GoMethod: "Optional"}, + }, + func() interface{} { + return &jsiiProxy_IOptionalMethod{} + }, ) - return returns -} - -func (j *jsiiProxy_Sum) DecorationPrefixes() *[]*string { - var returns *[]*string - _jsii_.Get( - j, - "decorationPrefixes", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IPrivatelyImplemented", + reflect.TypeOf((*IPrivatelyImplemented)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "success", GoGetter: "Success"}, + }, + func() interface{} { + return &jsiiProxy_IPrivatelyImplemented{} + }, ) - return returns -} - -func (j *jsiiProxy_Sum) Expression() scopejsiicalclib.NumericValue { - var returns scopejsiicalclib.NumericValue - _jsii_.Get( - j, - "expression", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IPublicInterface", + reflect.TypeOf((*IPublicInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "bye", GoMethod: "Bye"}, + }, + func() interface{} { + return &jsiiProxy_IPublicInterface{} + }, ) - return returns -} - -func (j *jsiiProxy_Sum) Parts() *[]scopejsiicalclib.NumericValue { - var returns *[]scopejsiicalclib.NumericValue - _jsii_.Get( - j, - "parts", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IPublicInterface2", + reflect.TypeOf((*IPublicInterface2)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "ciao", GoMethod: "Ciao"}, + }, + func() interface{} { + return &jsiiProxy_IPublicInterface2{} + }, ) - return returns -} - -func (j *jsiiProxy_Sum) StringStyle() composition.CompositeOperation_CompositionStringStyle { - var returns composition.CompositeOperation_CompositionStringStyle - _jsii_.Get( - j, - "stringStyle", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IRandomNumberGenerator", + reflect.TypeOf((*IRandomNumberGenerator)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"}, + }, + func() interface{} { + return &jsiiProxy_IRandomNumberGenerator{} + }, ) - return returns -} - -func (j *jsiiProxy_Sum) Value() *float64 { - var returns *float64 - _jsii_.Get( - j, - "value", - &returns, + _jsii_.RegisterInterface( + "jsii-calc.IReturnJsii976", + reflect.TypeOf((*IReturnJsii976)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "foo", GoGetter: "Foo"}, + }, + func() interface{} { + return &jsiiProxy_IReturnJsii976{} + }, ) - return returns -} - - -func NewSum() Sum { - _init_.Initialize() - - j := jsiiProxy_Sum{} - - _jsii_.Create( - "jsii-calc.Sum", - nil, // no parameters - &j, + _jsii_.RegisterInterface( + "jsii-calc.IReturnsNumber", + reflect.TypeOf((*IReturnsNumber)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "numberProp", GoGetter: "NumberProp"}, + _jsii_.MemberMethod{JsiiMethod: "obtainNumber", GoMethod: "ObtainNumber"}, + }, + func() interface{} { + return &jsiiProxy_IReturnsNumber{} + }, ) - - return &j -} - -func NewSum_Override(s Sum) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.Sum", - nil, // no parameters - s, + _jsii_.RegisterInterface( + "jsii-calc.IStableInterface", + reflect.TypeOf((*IStableInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, + }, + func() interface{} { + return &jsiiProxy_IStableInterface{} + }, ) -} - -func (j *jsiiProxy_Sum)SetDecorationPostfixes(val *[]*string) { - _jsii_.Set( - j, - "decorationPostfixes", - val, + _jsii_.RegisterInterface( + "jsii-calc.IStructReturningDelegate", + reflect.TypeOf((*IStructReturningDelegate)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "returnStruct", GoMethod: "ReturnStruct"}, + }, + func() interface{} { + return &jsiiProxy_IStructReturningDelegate{} + }, ) -} - -func (j *jsiiProxy_Sum)SetDecorationPrefixes(val *[]*string) { - _jsii_.Set( - j, - "decorationPrefixes", - val, + _jsii_.RegisterInterface( + "jsii-calc.IWallClock", + reflect.TypeOf((*IWallClock)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "iso8601Now", GoMethod: "Iso8601Now"}, + }, + func() interface{} { + return &jsiiProxy_IWallClock{} + }, ) -} - -func (j *jsiiProxy_Sum)SetParts(val *[]scopejsiicalclib.NumericValue) { - _jsii_.Set( - j, - "parts", - val, + _jsii_.RegisterClass( + "jsii-calc.ImplementInternalInterface", + reflect.TypeOf((*ImplementInternalInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "prop", GoGetter: "Prop"}, + }, + func() interface{} { + return &jsiiProxy_ImplementInternalInterface{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.Implementation", + reflect.TypeOf((*Implementation)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + return &jsiiProxy_Implementation{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.ImplementsInterfaceWithInternal", + reflect.TypeOf((*ImplementsInterfaceWithInternal)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "visible", GoMethod: "Visible"}, + }, + func() interface{} { + j := jsiiProxy_ImplementsInterfaceWithInternal{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceWithInternal) + return &j + }, + ) + _jsii_.RegisterClass( + "jsii-calc.ImplementsInterfaceWithInternalSubclass", + reflect.TypeOf((*ImplementsInterfaceWithInternalSubclass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "visible", GoMethod: "Visible"}, + }, + func() interface{} { + j := jsiiProxy_ImplementsInterfaceWithInternalSubclass{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_ImplementsInterfaceWithInternal) + return &j + }, + ) + _jsii_.RegisterClass( + "jsii-calc.ImplementsPrivateInterface", + reflect.TypeOf((*ImplementsPrivateInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "private", GoGetter: "Private"}, + }, + func() interface{} { + return &jsiiProxy_ImplementsPrivateInterface{} + }, + ) + _jsii_.RegisterStruct( + "jsii-calc.ImplictBaseOfBase", + reflect.TypeOf((*ImplictBaseOfBase)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "jsii-calc.InbetweenClass", + reflect.TypeOf((*InbetweenClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "ciao", GoMethod: "Ciao"}, + _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, + }, + func() interface{} { + j := jsiiProxy_InbetweenClass{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_PublicClass) + _jsii_.InitJsiiProxy(&j.jsiiProxy_IPublicInterface2) + return &j + }, ) -} - -func (j *jsiiProxy_Sum)SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) { - _jsii_.Set( - j, - "stringStyle", - val, + _jsii_.RegisterClass( + "jsii-calc.InterfaceCollections", + reflect.TypeOf((*InterfaceCollections)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_InterfaceCollections{} + }, ) -} - -func (s *jsiiProxy_Sum) ToString() *string { - var returns *string - - _jsii_.Invoke( - s, - "toString", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.InterfacesMaker", + reflect.TypeOf((*InterfacesMaker)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_InterfacesMaker{} + }, ) - - return returns -} - -func (s *jsiiProxy_Sum) TypeName() interface{} { - var returns interface{} - - _jsii_.Invoke( - s, - "typeName", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.Isomorphism", + reflect.TypeOf((*Isomorphism)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "myself", GoMethod: "Myself"}, + }, + func() interface{} { + return &jsiiProxy_Isomorphism{} + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SupportsNiceJavaBuilder.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type SupportsNiceJavaBuilder interface { - SupportsNiceJavaBuilderWithRequiredProps - Bar() *float64 - // some identifier. - Id() *float64 - PropId() *string - Rest() *[]*string -} - -// The jsii proxy struct for SupportsNiceJavaBuilder -type jsiiProxy_SupportsNiceJavaBuilder struct { - jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps -} - -func (j *jsiiProxy_SupportsNiceJavaBuilder) Bar() *float64 { - var returns *float64 - _jsii_.Get( - j, - "bar", - &returns, + _jsii_.RegisterClass( + "jsii-calc.Issue2638", + reflect.TypeOf((*Issue2638)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_Issue2638{} + }, ) - return returns -} - -func (j *jsiiProxy_SupportsNiceJavaBuilder) Id() *float64 { - var returns *float64 - _jsii_.Get( - j, - "id", - &returns, + _jsii_.RegisterClass( + "jsii-calc.Issue2638B", + reflect.TypeOf((*Issue2638B)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_Issue2638B{} + }, ) - return returns -} - -func (j *jsiiProxy_SupportsNiceJavaBuilder) PropId() *string { - var returns *string - _jsii_.Get( - j, - "propId", - &returns, + _jsii_.RegisterClass( + "jsii-calc.JSII417Derived", + reflect.TypeOf((*JSII417Derived)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, + _jsii_.MemberMethod{JsiiMethod: "baz", GoMethod: "Baz"}, + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + _jsii_.MemberProperty{JsiiProperty: "hasRoot", GoGetter: "HasRoot"}, + _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, + }, + func() interface{} { + j := jsiiProxy_JSII417Derived{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_JSII417PublicBaseOfBase) + return &j + }, ) - return returns -} - -func (j *jsiiProxy_SupportsNiceJavaBuilder) Rest() *[]*string { - var returns *[]*string - _jsii_.Get( - j, - "rest", - &returns, + _jsii_.RegisterClass( + "jsii-calc.JSII417PublicBaseOfBase", + reflect.TypeOf((*JSII417PublicBaseOfBase)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + _jsii_.MemberProperty{JsiiProperty: "hasRoot", GoGetter: "HasRoot"}, + }, + func() interface{} { + return &jsiiProxy_JSII417PublicBaseOfBase{} + }, ) - return returns -} - - -func NewSupportsNiceJavaBuilder(id *float64, defaultBar *float64, props *SupportsNiceJavaBuilderProps, rest ...*string) SupportsNiceJavaBuilder { - _init_.Initialize() - - args := []interface{}{id, defaultBar, props} - for _, a := range rest { - args = append(args, a) - } - - j := jsiiProxy_SupportsNiceJavaBuilder{} - - _jsii_.Create( - "jsii-calc.SupportsNiceJavaBuilder", - args, - &j, + _jsii_.RegisterClass( + "jsii-calc.JSObjectLiteralForInterface", + reflect.TypeOf((*JSObjectLiteralForInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "giveMeFriendly", GoMethod: "GiveMeFriendly"}, + _jsii_.MemberMethod{JsiiMethod: "giveMeFriendlyGenerator", GoMethod: "GiveMeFriendlyGenerator"}, + }, + func() interface{} { + return &jsiiProxy_JSObjectLiteralForInterface{} + }, ) - - return &j -} - -func NewSupportsNiceJavaBuilder_Override(s SupportsNiceJavaBuilder, id *float64, defaultBar *float64, props *SupportsNiceJavaBuilderProps, rest ...*string) { - _init_.Initialize() - - args := []interface{}{id, defaultBar, props} - for _, a := range rest { - args = append(args, a) - } - - _jsii_.Create( - "jsii-calc.SupportsNiceJavaBuilder", - args, - s, + _jsii_.RegisterClass( + "jsii-calc.JSObjectLiteralToNative", + reflect.TypeOf((*JSObjectLiteralToNative)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "returnLiteral", GoMethod: "ReturnLiteral"}, + }, + func() interface{} { + return &jsiiProxy_JSObjectLiteralToNative{} + }, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SupportsNiceJavaBuilderProps.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type SupportsNiceJavaBuilderProps struct { - // Some number, like 42. - Bar *float64 \`field:"required" json:"bar" yaml:"bar"\` - // An \`id\` field here is terrible API design, because the constructor of \`SupportsNiceJavaBuilder\` already has a parameter named \`id\`. - // - // But here we are, doing it like we didn't care. - Id *string \`field:"optional" json:"id" yaml:"id"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SupportsNiceJavaBuilderWithRequiredProps.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -// We can generate fancy builders in Java for classes which take a mix of positional & struct parameters. -type SupportsNiceJavaBuilderWithRequiredProps interface { - Bar() *float64 - // some identifier of your choice. - Id() *float64 - PropId() *string -} - -// The jsii proxy struct for SupportsNiceJavaBuilderWithRequiredProps -type jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps struct { - _ byte // padding -} - -func (j *jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps) Bar() *float64 { - var returns *float64 - _jsii_.Get( - j, - "bar", - &returns, + _jsii_.RegisterClass( + "jsii-calc.JSObjectLiteralToNativeClass", + reflect.TypeOf((*JSObjectLiteralToNativeClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "propA", GoGetter: "PropA"}, + _jsii_.MemberProperty{JsiiProperty: "propB", GoGetter: "PropB"}, + }, + func() interface{} { + return &jsiiProxy_JSObjectLiteralToNativeClass{} + }, ) - return returns -} - -func (j *jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps) Id() *float64 { - var returns *float64 - _jsii_.Get( - j, - "id", - &returns, + _jsii_.RegisterClass( + "jsii-calc.JavaReservedWords", + reflect.TypeOf((*JavaReservedWords)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "abstract", GoMethod: "Abstract"}, + _jsii_.MemberMethod{JsiiMethod: "assert", GoMethod: "Assert"}, + _jsii_.MemberMethod{JsiiMethod: "boolean", GoMethod: "Boolean"}, + _jsii_.MemberMethod{JsiiMethod: "break", GoMethod: "Break"}, + _jsii_.MemberMethod{JsiiMethod: "byte", GoMethod: "Byte"}, + _jsii_.MemberMethod{JsiiMethod: "case", GoMethod: "Case"}, + _jsii_.MemberMethod{JsiiMethod: "catch", GoMethod: "Catch"}, + _jsii_.MemberMethod{JsiiMethod: "char", GoMethod: "Char"}, + _jsii_.MemberMethod{JsiiMethod: "class", GoMethod: "Class"}, + _jsii_.MemberMethod{JsiiMethod: "const", GoMethod: "Const"}, + _jsii_.MemberMethod{JsiiMethod: "continue", GoMethod: "Continue"}, + _jsii_.MemberMethod{JsiiMethod: "default", GoMethod: "Default"}, + _jsii_.MemberMethod{JsiiMethod: "do", GoMethod: "Do"}, + _jsii_.MemberMethod{JsiiMethod: "double", GoMethod: "Double"}, + _jsii_.MemberMethod{JsiiMethod: "else", GoMethod: "Else"}, + _jsii_.MemberMethod{JsiiMethod: "enum", GoMethod: "Enum"}, + _jsii_.MemberMethod{JsiiMethod: "extends", GoMethod: "Extends"}, + _jsii_.MemberMethod{JsiiMethod: "false", GoMethod: "False"}, + _jsii_.MemberMethod{JsiiMethod: "final", GoMethod: "Final"}, + _jsii_.MemberMethod{JsiiMethod: "finally", GoMethod: "Finally"}, + _jsii_.MemberMethod{JsiiMethod: "float", GoMethod: "Float"}, + _jsii_.MemberMethod{JsiiMethod: "for", GoMethod: "For"}, + _jsii_.MemberMethod{JsiiMethod: "goto", GoMethod: "Goto"}, + _jsii_.MemberMethod{JsiiMethod: "if", GoMethod: "If"}, + _jsii_.MemberMethod{JsiiMethod: "implements", GoMethod: "Implements"}, + _jsii_.MemberMethod{JsiiMethod: "import", GoMethod: "Import"}, + _jsii_.MemberMethod{JsiiMethod: "instanceof", GoMethod: "Instanceof"}, + _jsii_.MemberMethod{JsiiMethod: "int", GoMethod: "Int"}, + _jsii_.MemberMethod{JsiiMethod: "interface", GoMethod: "Interface"}, + _jsii_.MemberMethod{JsiiMethod: "long", GoMethod: "Long"}, + _jsii_.MemberMethod{JsiiMethod: "native", GoMethod: "Native"}, + _jsii_.MemberMethod{JsiiMethod: "new", GoMethod: "New"}, + _jsii_.MemberMethod{JsiiMethod: "null", GoMethod: "Null"}, + _jsii_.MemberMethod{JsiiMethod: "package", GoMethod: "Package"}, + _jsii_.MemberMethod{JsiiMethod: "private", GoMethod: "Private"}, + _jsii_.MemberMethod{JsiiMethod: "protected", GoMethod: "Protected"}, + _jsii_.MemberMethod{JsiiMethod: "public", GoMethod: "Public"}, + _jsii_.MemberMethod{JsiiMethod: "return", GoMethod: "Return"}, + _jsii_.MemberMethod{JsiiMethod: "short", GoMethod: "Short"}, + _jsii_.MemberMethod{JsiiMethod: "static", GoMethod: "Static"}, + _jsii_.MemberMethod{JsiiMethod: "strictfp", GoMethod: "Strictfp"}, + _jsii_.MemberMethod{JsiiMethod: "super", GoMethod: "Super"}, + _jsii_.MemberMethod{JsiiMethod: "switch", GoMethod: "Switch"}, + _jsii_.MemberMethod{JsiiMethod: "synchronized", GoMethod: "Synchronized"}, + _jsii_.MemberMethod{JsiiMethod: "this", GoMethod: "This"}, + _jsii_.MemberMethod{JsiiMethod: "throw", GoMethod: "Throw"}, + _jsii_.MemberMethod{JsiiMethod: "throws", GoMethod: "Throws"}, + _jsii_.MemberMethod{JsiiMethod: "transient", GoMethod: "Transient"}, + _jsii_.MemberMethod{JsiiMethod: "true", GoMethod: "True"}, + _jsii_.MemberMethod{JsiiMethod: "try", GoMethod: "Try"}, + _jsii_.MemberMethod{JsiiMethod: "void", GoMethod: "Void"}, + _jsii_.MemberMethod{JsiiMethod: "volatile", GoMethod: "Volatile"}, + _jsii_.MemberProperty{JsiiProperty: "while", GoGetter: "While"}, + }, + func() interface{} { + return &jsiiProxy_JavaReservedWords{} + }, ) - return returns -} - -func (j *jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps) PropId() *string { - var returns *string - _jsii_.Get( - j, - "propId", - &returns, + _jsii_.RegisterClass( + "jsii-calc.Jsii487Derived", + reflect.TypeOf((*Jsii487Derived)(nil)).Elem(), + nil, // no members + func() interface{} { + j := jsiiProxy_Jsii487Derived{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IJsii487External) + _jsii_.InitJsiiProxy(&j.jsiiProxy_IJsii487External2) + return &j + }, ) - return returns -} - - -func NewSupportsNiceJavaBuilderWithRequiredProps(id *float64, props *SupportsNiceJavaBuilderProps) SupportsNiceJavaBuilderWithRequiredProps { - _init_.Initialize() - - j := jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps{} - - _jsii_.Create( - "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", - []interface{}{id, props}, - &j, + _jsii_.RegisterClass( + "jsii-calc.Jsii496Derived", + reflect.TypeOf((*Jsii496Derived)(nil)).Elem(), + nil, // no members + func() interface{} { + j := jsiiProxy_Jsii496Derived{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IJsii496) + return &j + }, ) - - return &j -} - -func NewSupportsNiceJavaBuilderWithRequiredProps_Override(s SupportsNiceJavaBuilderWithRequiredProps, id *float64, props *SupportsNiceJavaBuilderProps) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", - []interface{}{id, props}, - s, + _jsii_.RegisterClass( + "jsii-calc.JsiiAgent", + reflect.TypeOf((*JsiiAgent)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_JsiiAgent{} + }, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SyncVirtualMethods.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type SyncVirtualMethods interface { - A() *float64 - SetA(val *float64) - CallerIsProperty() *float64 - SetCallerIsProperty(val *float64) - OtherProperty() *string - SetOtherProperty(val *string) - ReadonlyProperty() *string - TheProperty() *string - SetTheProperty(val *string) - ValueOfOtherProperty() *string - SetValueOfOtherProperty(val *string) - CallerIsAsync() *float64 - CallerIsMethod() *float64 - ModifyOtherProperty(value *string) - ModifyValueOfTheProperty(value *string) - ReadA() *float64 - RetrieveOtherProperty() *string - RetrieveReadOnlyProperty() *string - RetrieveValueOfTheProperty() *string - VirtualMethod(n *float64) *float64 - WriteA(value *float64) -} - -// The jsii proxy struct for SyncVirtualMethods -type jsiiProxy_SyncVirtualMethods struct { - _ byte // padding -} - -func (j *jsiiProxy_SyncVirtualMethods) A() *float64 { - var returns *float64 - _jsii_.Get( - j, - "a", - &returns, + _jsii_.RegisterClass( + "jsii-calc.JsonFormatter", + reflect.TypeOf((*JsonFormatter)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_JsonFormatter{} + }, ) - return returns -} - -func (j *jsiiProxy_SyncVirtualMethods) CallerIsProperty() *float64 { - var returns *float64 - _jsii_.Get( - j, - "callerIsProperty", - &returns, + _jsii_.RegisterClass( + "jsii-calc.LevelOne", + reflect.TypeOf((*LevelOne)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "props", GoGetter: "Props"}, + }, + func() interface{} { + return &jsiiProxy_LevelOne{} + }, ) - return returns -} - -func (j *jsiiProxy_SyncVirtualMethods) OtherProperty() *string { - var returns *string - _jsii_.Get( - j, - "otherProperty", - &returns, + _jsii_.RegisterStruct( + "jsii-calc.LevelOne.PropBooleanValue", + reflect.TypeOf((*LevelOne_PropBooleanValue)(nil)).Elem(), ) - return returns -} - -func (j *jsiiProxy_SyncVirtualMethods) ReadonlyProperty() *string { - var returns *string - _jsii_.Get( - j, - "readonlyProperty", - &returns, + _jsii_.RegisterStruct( + "jsii-calc.LevelOne.PropProperty", + reflect.TypeOf((*LevelOne_PropProperty)(nil)).Elem(), ) - return returns -} - -func (j *jsiiProxy_SyncVirtualMethods) TheProperty() *string { - var returns *string - _jsii_.Get( - j, - "theProperty", - &returns, + _jsii_.RegisterStruct( + "jsii-calc.LevelOneProps", + reflect.TypeOf((*LevelOneProps)(nil)).Elem(), ) - return returns -} - -func (j *jsiiProxy_SyncVirtualMethods) ValueOfOtherProperty() *string { - var returns *string - _jsii_.Get( - j, - "valueOfOtherProperty", - &returns, + _jsii_.RegisterStruct( + "jsii-calc.LoadBalancedFargateServiceProps", + reflect.TypeOf((*LoadBalancedFargateServiceProps)(nil)).Elem(), ) - return returns -} - - -func NewSyncVirtualMethods() SyncVirtualMethods { - _init_.Initialize() - - j := jsiiProxy_SyncVirtualMethods{} - - _jsii_.Create( - "jsii-calc.SyncVirtualMethods", - nil, // no parameters - &j, + _jsii_.RegisterClass( + "jsii-calc.MethodNamedProperty", + reflect.TypeOf((*MethodNamedProperty)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "elite", GoGetter: "Elite"}, + _jsii_.MemberMethod{JsiiMethod: "property", GoMethod: "Property"}, + }, + func() interface{} { + return &jsiiProxy_MethodNamedProperty{} + }, ) - - return &j -} - -func NewSyncVirtualMethods_Override(s SyncVirtualMethods) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.SyncVirtualMethods", - nil, // no parameters - s, + _jsii_.RegisterClass( + "jsii-calc.Multiply", + reflect.TypeOf((*Multiply)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "farewell", GoMethod: "Farewell"}, + _jsii_.MemberMethod{JsiiMethod: "goodbye", GoMethod: "Goodbye"}, + _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, + _jsii_.MemberProperty{JsiiProperty: "lhs", GoGetter: "Lhs"}, + _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"}, + _jsii_.MemberProperty{JsiiProperty: "rhs", GoGetter: "Rhs"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + j := jsiiProxy_Multiply{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_BinaryOperation) + _jsii_.InitJsiiProxy(&j.jsiiProxy_IFriendlier) + _jsii_.InitJsiiProxy(&j.jsiiProxy_IRandomNumberGenerator) + return &j + }, ) -} - -func (j *jsiiProxy_SyncVirtualMethods)SetA(val *float64) { - _jsii_.Set( - j, - "a", - val, + _jsii_.RegisterClass( + "jsii-calc.Negate", + reflect.TypeOf((*Negate)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "farewell", GoMethod: "Farewell"}, + _jsii_.MemberMethod{JsiiMethod: "goodbye", GoMethod: "Goodbye"}, + _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, + _jsii_.MemberProperty{JsiiProperty: "operand", GoGetter: "Operand"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + j := jsiiProxy_Negate{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_UnaryOperation) + _jsii_.InitJsiiProxy(&j.jsiiProxy_IFriendlier) + return &j + }, ) -} - -func (j *jsiiProxy_SyncVirtualMethods)SetCallerIsProperty(val *float64) { - _jsii_.Set( - j, - "callerIsProperty", - val, + _jsii_.RegisterClass( + "jsii-calc.NestedClassInstance", + reflect.TypeOf((*NestedClassInstance)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_NestedClassInstance{} + }, ) -} - -func (j *jsiiProxy_SyncVirtualMethods)SetOtherProperty(val *string) { - _jsii_.Set( - j, - "otherProperty", - val, + _jsii_.RegisterStruct( + "jsii-calc.NestedStruct", + reflect.TypeOf((*NestedStruct)(nil)).Elem(), ) -} - -func (j *jsiiProxy_SyncVirtualMethods)SetTheProperty(val *string) { - _jsii_.Set( - j, - "theProperty", - val, + _jsii_.RegisterClass( + "jsii-calc.NodeStandardLibrary", + reflect.TypeOf((*NodeStandardLibrary)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "cryptoSha256", GoMethod: "CryptoSha256"}, + _jsii_.MemberMethod{JsiiMethod: "fsReadFile", GoMethod: "FsReadFile"}, + _jsii_.MemberMethod{JsiiMethod: "fsReadFileSync", GoMethod: "FsReadFileSync"}, + _jsii_.MemberProperty{JsiiProperty: "osPlatform", GoGetter: "OsPlatform"}, + }, + func() interface{} { + return &jsiiProxy_NodeStandardLibrary{} + }, ) -} - -func (j *jsiiProxy_SyncVirtualMethods)SetValueOfOtherProperty(val *string) { - _jsii_.Set( - j, - "valueOfOtherProperty", - val, + _jsii_.RegisterClass( + "jsii-calc.NullShouldBeTreatedAsUndefined", + reflect.TypeOf((*NullShouldBeTreatedAsUndefined)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "changeMeToUndefined", GoGetter: "ChangeMeToUndefined"}, + _jsii_.MemberMethod{JsiiMethod: "giveMeUndefined", GoMethod: "GiveMeUndefined"}, + _jsii_.MemberMethod{JsiiMethod: "giveMeUndefinedInsideAnObject", GoMethod: "GiveMeUndefinedInsideAnObject"}, + _jsii_.MemberMethod{JsiiMethod: "verifyPropertyIsUndefined", GoMethod: "VerifyPropertyIsUndefined"}, + }, + func() interface{} { + return &jsiiProxy_NullShouldBeTreatedAsUndefined{} + }, ) -} - -func (s *jsiiProxy_SyncVirtualMethods) CallerIsAsync() *float64 { - var returns *float64 - - _jsii_.Invoke( - s, - "callerIsAsync", - nil, // no parameters - &returns, + _jsii_.RegisterStruct( + "jsii-calc.NullShouldBeTreatedAsUndefinedData", + reflect.TypeOf((*NullShouldBeTreatedAsUndefinedData)(nil)).Elem(), ) - - return returns -} - -func (s *jsiiProxy_SyncVirtualMethods) CallerIsMethod() *float64 { - var returns *float64 - - _jsii_.Invoke( - s, - "callerIsMethod", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.NumberGenerator", + reflect.TypeOf((*NumberGenerator)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "generator", GoGetter: "Generator"}, + _jsii_.MemberMethod{JsiiMethod: "isSameGenerator", GoMethod: "IsSameGenerator"}, + _jsii_.MemberMethod{JsiiMethod: "nextTimes100", GoMethod: "NextTimes100"}, + }, + func() interface{} { + return &jsiiProxy_NumberGenerator{} + }, ) - - return returns -} - -func (s *jsiiProxy_SyncVirtualMethods) ModifyOtherProperty(value *string) { - _jsii_.InvokeVoid( - s, - "modifyOtherProperty", - []interface{}{value}, + _jsii_.RegisterClass( + "jsii-calc.ObjectRefsInCollections", + reflect.TypeOf((*ObjectRefsInCollections)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "sumFromArray", GoMethod: "SumFromArray"}, + _jsii_.MemberMethod{JsiiMethod: "sumFromMap", GoMethod: "SumFromMap"}, + }, + func() interface{} { + return &jsiiProxy_ObjectRefsInCollections{} + }, ) -} - -func (s *jsiiProxy_SyncVirtualMethods) ModifyValueOfTheProperty(value *string) { - _jsii_.InvokeVoid( - s, - "modifyValueOfTheProperty", - []interface{}{value}, + _jsii_.RegisterClass( + "jsii-calc.ObjectWithPropertyProvider", + reflect.TypeOf((*ObjectWithPropertyProvider)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_ObjectWithPropertyProvider{} + }, ) -} - -func (s *jsiiProxy_SyncVirtualMethods) ReadA() *float64 { - var returns *float64 - - _jsii_.Invoke( - s, - "readA", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.Old", + reflect.TypeOf((*Old)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "doAThing", GoMethod: "DoAThing"}, + }, + func() interface{} { + return &jsiiProxy_Old{} + }, ) - - return returns -} - -func (s *jsiiProxy_SyncVirtualMethods) RetrieveOtherProperty() *string { - var returns *string - - _jsii_.Invoke( - s, - "retrieveOtherProperty", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.OptionalArgumentInvoker", + reflect.TypeOf((*OptionalArgumentInvoker)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "invokeWithOptional", GoMethod: "InvokeWithOptional"}, + _jsii_.MemberMethod{JsiiMethod: "invokeWithoutOptional", GoMethod: "InvokeWithoutOptional"}, + }, + func() interface{} { + return &jsiiProxy_OptionalArgumentInvoker{} + }, ) - - return returns -} - -func (s *jsiiProxy_SyncVirtualMethods) RetrieveReadOnlyProperty() *string { - var returns *string - - _jsii_.Invoke( - s, - "retrieveReadOnlyProperty", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.OptionalConstructorArgument", + reflect.TypeOf((*OptionalConstructorArgument)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "arg1", GoGetter: "Arg1"}, + _jsii_.MemberProperty{JsiiProperty: "arg2", GoGetter: "Arg2"}, + _jsii_.MemberProperty{JsiiProperty: "arg3", GoGetter: "Arg3"}, + }, + func() interface{} { + return &jsiiProxy_OptionalConstructorArgument{} + }, ) - - return returns -} - -func (s *jsiiProxy_SyncVirtualMethods) RetrieveValueOfTheProperty() *string { - var returns *string - - _jsii_.Invoke( - s, - "retrieveValueOfTheProperty", - nil, // no parameters - &returns, + _jsii_.RegisterStruct( + "jsii-calc.OptionalStruct", + reflect.TypeOf((*OptionalStruct)(nil)).Elem(), ) - - return returns -} - -func (s *jsiiProxy_SyncVirtualMethods) VirtualMethod(n *float64) *float64 { - var returns *float64 - - _jsii_.Invoke( - s, - "virtualMethod", - []interface{}{n}, - &returns, + _jsii_.RegisterClass( + "jsii-calc.OptionalStructConsumer", + reflect.TypeOf((*OptionalStructConsumer)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "fieldValue", GoGetter: "FieldValue"}, + _jsii_.MemberProperty{JsiiProperty: "parameterWasUndefined", GoGetter: "ParameterWasUndefined"}, + }, + func() interface{} { + return &jsiiProxy_OptionalStructConsumer{} + }, ) - - return returns -} - -func (s *jsiiProxy_SyncVirtualMethods) WriteA(value *float64) { - _jsii_.InvokeVoid( - s, - "writeA", - []interface{}{value}, + _jsii_.RegisterClass( + "jsii-calc.OverridableProtectedMember", + reflect.TypeOf((*OverridableProtectedMember)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "overrideMe", GoMethod: "OverrideMe"}, + _jsii_.MemberProperty{JsiiProperty: "overrideReadOnly", GoGetter: "OverrideReadOnly"}, + _jsii_.MemberProperty{JsiiProperty: "overrideReadWrite", GoGetter: "OverrideReadWrite"}, + _jsii_.MemberMethod{JsiiMethod: "switchModes", GoMethod: "SwitchModes"}, + _jsii_.MemberMethod{JsiiMethod: "valueFromProtected", GoMethod: "ValueFromProtected"}, + }, + func() interface{} { + return &jsiiProxy_OverridableProtectedMember{} + }, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_TestStructWithEnum.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type TestStructWithEnum interface { - // Returns \`foo: StringEnum.A\`. - StructWithFoo() *StructWithEnum - // Returns \`foo: StringEnum.C\` and \`bar: AllTypesEnum.MY_ENUM_VALUE\`. - StructWithFooBar() *StructWithEnum - // Returns true if \`foo\` is \`StringEnum.A\`. - IsStringEnumA(input *StructWithEnum) *bool - // Returns true if \`foo\` is \`StringEnum.B\` and \`bar\` is \`AllTypesEnum.THIS_IS_GREAT\`. - IsStringEnumB(input *StructWithEnum) *bool -} - -// The jsii proxy struct for TestStructWithEnum -type jsiiProxy_TestStructWithEnum struct { - _ byte // padding -} - -func (j *jsiiProxy_TestStructWithEnum) StructWithFoo() *StructWithEnum { - var returns *StructWithEnum - _jsii_.Get( - j, - "structWithFoo", - &returns, + _jsii_.RegisterClass( + "jsii-calc.OverrideReturnsObject", + reflect.TypeOf((*OverrideReturnsObject)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "test", GoMethod: "Test"}, + }, + func() interface{} { + return &jsiiProxy_OverrideReturnsObject{} + }, ) - return returns -} - -func (j *jsiiProxy_TestStructWithEnum) StructWithFooBar() *StructWithEnum { - var returns *StructWithEnum - _jsii_.Get( - j, - "structWithFooBar", - &returns, + _jsii_.RegisterClass( + "jsii-calc.ParamShadowsBuiltins", + reflect.TypeOf((*ParamShadowsBuiltins)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_ParamShadowsBuiltins{} + }, ) - return returns -} - - -func NewTestStructWithEnum() TestStructWithEnum { - _init_.Initialize() - - j := jsiiProxy_TestStructWithEnum{} - - _jsii_.Create( - "jsii-calc.TestStructWithEnum", - nil, // no parameters - &j, + _jsii_.RegisterStruct( + "jsii-calc.ParamShadowsBuiltinsProps", + reflect.TypeOf((*ParamShadowsBuiltinsProps)(nil)).Elem(), ) - - return &j -} - -func NewTestStructWithEnum_Override(t TestStructWithEnum) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.TestStructWithEnum", - nil, // no parameters - t, + _jsii_.RegisterClass( + "jsii-calc.ParamShadowsScope", + reflect.TypeOf((*ParamShadowsScope)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "useScope", GoMethod: "UseScope"}, + }, + func() interface{} { + return &jsiiProxy_ParamShadowsScope{} + }, ) -} - -func (t *jsiiProxy_TestStructWithEnum) IsStringEnumA(input *StructWithEnum) *bool { - var returns *bool - - _jsii_.Invoke( - t, - "isStringEnumA", - []interface{}{input}, - &returns, + _jsii_.RegisterStruct( + "jsii-calc.ParentStruct982", + reflect.TypeOf((*ParentStruct982)(nil)).Elem(), ) - - return returns -} - -func (t *jsiiProxy_TestStructWithEnum) IsStringEnumB(input *StructWithEnum) *bool { - var returns *bool - - _jsii_.Invoke( - t, - "isStringEnumB", - []interface{}{input}, - &returns, + _jsii_.RegisterClass( + "jsii-calc.PartiallyInitializedThisConsumer", + reflect.TypeOf((*PartiallyInitializedThisConsumer)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "consumePartiallyInitializedThis", GoMethod: "ConsumePartiallyInitializedThis"}, + }, + func() interface{} { + return &jsiiProxy_PartiallyInitializedThisConsumer{} + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Thrower.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type Thrower interface { - ThrowError() -} - -// The jsii proxy struct for Thrower -type jsiiProxy_Thrower struct { - _ byte // padding -} - -func NewThrower() Thrower { - _init_.Initialize() - - j := jsiiProxy_Thrower{} - - _jsii_.Create( - "jsii-calc.Thrower", - nil, // no parameters - &j, + _jsii_.RegisterClass( + "jsii-calc.Polymorphism", + reflect.TypeOf((*Polymorphism)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "sayHello", GoMethod: "SayHello"}, + }, + func() interface{} { + return &jsiiProxy_Polymorphism{} + }, ) - - return &j -} - -func NewThrower_Override(t Thrower) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.Thrower", - nil, // no parameters - t, + _jsii_.RegisterClass( + "jsii-calc.Power", + reflect.TypeOf((*Power)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "base", GoGetter: "Base"}, + _jsii_.MemberProperty{JsiiProperty: "decorationPostfixes", GoGetter: "DecorationPostfixes"}, + _jsii_.MemberProperty{JsiiProperty: "decorationPrefixes", GoGetter: "DecorationPrefixes"}, + _jsii_.MemberProperty{JsiiProperty: "expression", GoGetter: "Expression"}, + _jsii_.MemberProperty{JsiiProperty: "pow", GoGetter: "Pow"}, + _jsii_.MemberProperty{JsiiProperty: "stringStyle", GoGetter: "StringStyle"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + j := jsiiProxy_Power{} + _jsii_.InitJsiiProxy(&j.Type__compositionCompositeOperation) + return &j + }, ) -} - -func (t *jsiiProxy_Thrower) ThrowError() { - _jsii_.InvokeVoid( - t, - "throwError", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.PromiseNothing", + reflect.TypeOf((*PromiseNothing)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "instancePromiseIt", GoMethod: "InstancePromiseIt"}, + }, + func() interface{} { + return &jsiiProxy_PromiseNothing{} + }, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_TopLevelStruct.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type TopLevelStruct struct { - // This is a required field. - Required *string \`field:"required" json:"required" yaml:"required"\` - // A union to really stress test our serialization. - SecondLevel interface{} \`field:"required" json:"secondLevel" yaml:"secondLevel"\` - // You don't have to pass this. - Optional *string \`field:"optional" json:"optional" yaml:"optional"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_TwoMethodsWithSimilarCapitalization.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -// In TypeScript it is possible to have two methods with the same name but different capitalization. -// See: https://github.com/aws/jsii/issues/2508 -// -type TwoMethodsWithSimilarCapitalization interface { - FooBar() *float64 - // Deprecated: YES. - FooBAR() *float64 - ToIsoString() *string - // Deprecated: python requires that all alternatives are deprecated. - ToIsOString() *string - // Deprecated: python requires that all alternatives are deprecated. - ToISOString() *string -} - -// The jsii proxy struct for TwoMethodsWithSimilarCapitalization -type jsiiProxy_TwoMethodsWithSimilarCapitalization struct { - _ byte // padding -} - -func (j *jsiiProxy_TwoMethodsWithSimilarCapitalization) FooBar() *float64 { - var returns *float64 - _jsii_.Get( - j, - "fooBar", - &returns, + _jsii_.RegisterClass( + "jsii-calc.PropertyNamedProperty", + reflect.TypeOf((*PropertyNamedProperty)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"}, + _jsii_.MemberProperty{JsiiProperty: "yetAnoterOne", GoGetter: "YetAnoterOne"}, + }, + func() interface{} { + return &jsiiProxy_PropertyNamedProperty{} + }, ) - return returns -} - -func (j *jsiiProxy_TwoMethodsWithSimilarCapitalization) FooBAR() *float64 { - var returns *float64 - _jsii_.Get( - j, - "fooBAR", - &returns, + _jsii_.RegisterClass( + "jsii-calc.PublicClass", + reflect.TypeOf((*PublicClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, + }, + func() interface{} { + return &jsiiProxy_PublicClass{} + }, ) - return returns -} - - -func NewTwoMethodsWithSimilarCapitalization() TwoMethodsWithSimilarCapitalization { - _init_.Initialize() - - j := jsiiProxy_TwoMethodsWithSimilarCapitalization{} - - _jsii_.Create( - "jsii-calc.TwoMethodsWithSimilarCapitalization", - nil, // no parameters - &j, + _jsii_.RegisterClass( + "jsii-calc.PythonReservedWords", + reflect.TypeOf((*PythonReservedWords)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "and", GoMethod: "And"}, + _jsii_.MemberMethod{JsiiMethod: "as", GoMethod: "As"}, + _jsii_.MemberMethod{JsiiMethod: "assert", GoMethod: "Assert"}, + _jsii_.MemberMethod{JsiiMethod: "async", GoMethod: "Async"}, + _jsii_.MemberMethod{JsiiMethod: "await", GoMethod: "Await"}, + _jsii_.MemberMethod{JsiiMethod: "break", GoMethod: "Break"}, + _jsii_.MemberMethod{JsiiMethod: "class", GoMethod: "Class"}, + _jsii_.MemberMethod{JsiiMethod: "continue", GoMethod: "Continue"}, + _jsii_.MemberMethod{JsiiMethod: "def", GoMethod: "Def"}, + _jsii_.MemberMethod{JsiiMethod: "del", GoMethod: "Del"}, + _jsii_.MemberMethod{JsiiMethod: "elif", GoMethod: "Elif"}, + _jsii_.MemberMethod{JsiiMethod: "else", GoMethod: "Else"}, + _jsii_.MemberMethod{JsiiMethod: "except", GoMethod: "Except"}, + _jsii_.MemberMethod{JsiiMethod: "finally", GoMethod: "Finally"}, + _jsii_.MemberMethod{JsiiMethod: "for", GoMethod: "For"}, + _jsii_.MemberMethod{JsiiMethod: "from", GoMethod: "From"}, + _jsii_.MemberMethod{JsiiMethod: "global", GoMethod: "Global"}, + _jsii_.MemberMethod{JsiiMethod: "if", GoMethod: "If"}, + _jsii_.MemberMethod{JsiiMethod: "import", GoMethod: "Import"}, + _jsii_.MemberMethod{JsiiMethod: "in", GoMethod: "In"}, + _jsii_.MemberMethod{JsiiMethod: "is", GoMethod: "Is"}, + _jsii_.MemberMethod{JsiiMethod: "lambda", GoMethod: "Lambda"}, + _jsii_.MemberMethod{JsiiMethod: "nonlocal", GoMethod: "Nonlocal"}, + _jsii_.MemberMethod{JsiiMethod: "not", GoMethod: "Not"}, + _jsii_.MemberMethod{JsiiMethod: "or", GoMethod: "Or"}, + _jsii_.MemberMethod{JsiiMethod: "pass", GoMethod: "Pass"}, + _jsii_.MemberMethod{JsiiMethod: "raise", GoMethod: "Raise"}, + _jsii_.MemberMethod{JsiiMethod: "return", GoMethod: "Return"}, + _jsii_.MemberMethod{JsiiMethod: "try", GoMethod: "Try"}, + _jsii_.MemberMethod{JsiiMethod: "while", GoMethod: "While"}, + _jsii_.MemberMethod{JsiiMethod: "with", GoMethod: "With"}, + _jsii_.MemberMethod{JsiiMethod: "yield", GoMethod: "Yield"}, + }, + func() interface{} { + return &jsiiProxy_PythonReservedWords{} + }, ) - - return &j -} - -func NewTwoMethodsWithSimilarCapitalization_Override(t TwoMethodsWithSimilarCapitalization) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.TwoMethodsWithSimilarCapitalization", - nil, // no parameters - t, + _jsii_.RegisterClass( + "jsii-calc.ReferenceEnumFromScopedPackage", + reflect.TypeOf((*ReferenceEnumFromScopedPackage)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "foo", GoGetter: "Foo"}, + _jsii_.MemberMethod{JsiiMethod: "loadFoo", GoMethod: "LoadFoo"}, + _jsii_.MemberMethod{JsiiMethod: "saveFoo", GoMethod: "SaveFoo"}, + }, + func() interface{} { + return &jsiiProxy_ReferenceEnumFromScopedPackage{} + }, ) -} - -func (t *jsiiProxy_TwoMethodsWithSimilarCapitalization) ToIsoString() *string { - var returns *string - - _jsii_.Invoke( - t, - "toIsoString", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.ReturnsPrivateImplementationOfInterface", + reflect.TypeOf((*ReturnsPrivateImplementationOfInterface)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "privateImplementation", GoGetter: "PrivateImplementation"}, + }, + func() interface{} { + return &jsiiProxy_ReturnsPrivateImplementationOfInterface{} + }, ) - - return returns -} - -func (t *jsiiProxy_TwoMethodsWithSimilarCapitalization) ToIsOString() *string { - var returns *string - - _jsii_.Invoke( - t, - "toIsOString", - nil, // no parameters - &returns, + _jsii_.RegisterStruct( + "jsii-calc.RootStruct", + reflect.TypeOf((*RootStruct)(nil)).Elem(), ) - - return returns -} - -func (t *jsiiProxy_TwoMethodsWithSimilarCapitalization) ToISOString() *string { - var returns *string - - _jsii_.Invoke( - t, - "toISOString", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.RootStructValidator", + reflect.TypeOf((*RootStructValidator)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_RootStructValidator{} + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UmaskCheck.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -// Checks the current file permissions are cool (no funky UMASK down-scoping happened). -// See: https://github.com/aws/jsii/issues/1765 -// -type UmaskCheck interface { -} - -// The jsii proxy struct for UmaskCheck -type jsiiProxy_UmaskCheck struct { - _ byte // padding -} - -// This should return 0o644 (-rw-r--r--). -func UmaskCheck_Mode() *float64 { - _init_.Initialize() - - var returns *float64 - - _jsii_.StaticInvoke( - "jsii-calc.UmaskCheck", - "mode", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.RuntimeTypeChecking", + reflect.TypeOf((*RuntimeTypeChecking)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "methodWithDefaultedArguments", GoMethod: "MethodWithDefaultedArguments"}, + _jsii_.MemberMethod{JsiiMethod: "methodWithOptionalAnyArgument", GoMethod: "MethodWithOptionalAnyArgument"}, + _jsii_.MemberMethod{JsiiMethod: "methodWithOptionalArguments", GoMethod: "MethodWithOptionalArguments"}, + }, + func() interface{} { + return &jsiiProxy_RuntimeTypeChecking{} + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UnaryOperation.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" -) - -// An operation on a single operand. -type UnaryOperation interface { - scopejsiicalclib.Operation - Operand() scopejsiicalclib.NumericValue - // The value. - // Deprecated. - Value() *float64 - // String representation of the value. - // Deprecated. - ToString() *string - // Returns: the name of the class (to verify native type names are created for derived classes). - TypeName() interface{} -} - -// The jsii proxy struct for UnaryOperation -type jsiiProxy_UnaryOperation struct { - internal.Type__scopejsiicalclibOperation -} - -func (j *jsiiProxy_UnaryOperation) Operand() scopejsiicalclib.NumericValue { - var returns scopejsiicalclib.NumericValue - _jsii_.Get( - j, - "operand", - &returns, + _jsii_.RegisterStruct( + "jsii-calc.SecondLevelStruct", + reflect.TypeOf((*SecondLevelStruct)(nil)).Elem(), ) - return returns -} - -func (j *jsiiProxy_UnaryOperation) Value() *float64 { - var returns *float64 - _jsii_.Get( - j, - "value", - &returns, + _jsii_.RegisterClass( + "jsii-calc.SingleInstanceTwoTypes", + reflect.TypeOf((*SingleInstanceTwoTypes)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "interface1", GoMethod: "Interface1"}, + _jsii_.MemberMethod{JsiiMethod: "interface2", GoMethod: "Interface2"}, + }, + func() interface{} { + return &jsiiProxy_SingleInstanceTwoTypes{} + }, ) - return returns -} - - -func NewUnaryOperation_Override(u UnaryOperation, operand scopejsiicalclib.NumericValue) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.UnaryOperation", - []interface{}{operand}, - u, + _jsii_.RegisterClass( + "jsii-calc.SingletonInt", + reflect.TypeOf((*SingletonInt)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "isSingletonInt", GoMethod: "IsSingletonInt"}, + }, + func() interface{} { + return &jsiiProxy_SingletonInt{} + }, ) -} - -func (u *jsiiProxy_UnaryOperation) ToString() *string { - var returns *string - - _jsii_.Invoke( - u, - "toString", - nil, // no parameters - &returns, + _jsii_.RegisterEnum( + "jsii-calc.SingletonIntEnum", + reflect.TypeOf((*SingletonIntEnum)(nil)).Elem(), + map[string]interface{}{ + "SINGLETON_INT": SingletonIntEnum_SINGLETON_INT, + }, ) - - return returns -} - -func (u *jsiiProxy_UnaryOperation) TypeName() interface{} { - var returns interface{} - - _jsii_.Invoke( - u, - "typeName", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.SingletonString", + reflect.TypeOf((*SingletonString)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "isSingletonString", GoMethod: "IsSingletonString"}, + }, + func() interface{} { + return &jsiiProxy_SingletonString{} + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UnionProperties.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - - -type UnionProperties struct { - Bar interface{} \`field:"required" json:"bar" yaml:"bar"\` - Foo interface{} \`field:"optional" json:"foo" yaml:"foo"\` -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UpcasingReflectable.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal" - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/customsubmodulename" -) - -// Ensures submodule-imported types from dependencies can be used correctly. -type UpcasingReflectable interface { - customsubmodulename.IReflectable - Entries() *[]*customsubmodulename.ReflectableEntry -} - -// The jsii proxy struct for UpcasingReflectable -type jsiiProxy_UpcasingReflectable struct { - internal.Type__customsubmodulenameIReflectable -} - -func (j *jsiiProxy_UpcasingReflectable) Entries() *[]*customsubmodulename.ReflectableEntry { - var returns *[]*customsubmodulename.ReflectableEntry - _jsii_.Get( - j, - "entries", - &returns, + _jsii_.RegisterEnum( + "jsii-calc.SingletonStringEnum", + reflect.TypeOf((*SingletonStringEnum)(nil)).Elem(), + map[string]interface{}{ + "SINGLETON_STRING": SingletonStringEnum_SINGLETON_STRING, + }, ) - return returns -} - - -func NewUpcasingReflectable(delegate *map[string]interface{}) UpcasingReflectable { - _init_.Initialize() - - j := jsiiProxy_UpcasingReflectable{} - - _jsii_.Create( - "jsii-calc.UpcasingReflectable", - []interface{}{delegate}, - &j, + _jsii_.RegisterStruct( + "jsii-calc.SmellyStruct", + reflect.TypeOf((*SmellyStruct)(nil)).Elem(), ) - - return &j -} - -func NewUpcasingReflectable_Override(u UpcasingReflectable, delegate *map[string]interface{}) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.UpcasingReflectable", - []interface{}{delegate}, - u, + _jsii_.RegisterClass( + "jsii-calc.SomeTypeJsii976", + reflect.TypeOf((*SomeTypeJsii976)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_SomeTypeJsii976{} + }, ) -} - -func UpcasingReflectable_Reflector() customsubmodulename.Reflector { - _init_.Initialize() - var returns customsubmodulename.Reflector - _jsii_.StaticGet( - "jsii-calc.UpcasingReflectable", - "reflector", - &returns, + _jsii_.RegisterClass( + "jsii-calc.StableClass", + reflect.TypeOf((*StableClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"}, + _jsii_.MemberProperty{JsiiProperty: "readonlyProperty", GoGetter: "ReadonlyProperty"}, + }, + func() interface{} { + return &jsiiProxy_StableClass{} + }, ) - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UseBundledDependency.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type UseBundledDependency interface { - Value() interface{} -} - -// The jsii proxy struct for UseBundledDependency -type jsiiProxy_UseBundledDependency struct { - _ byte // padding -} - -func NewUseBundledDependency() UseBundledDependency { - _init_.Initialize() - - j := jsiiProxy_UseBundledDependency{} - - _jsii_.Create( - "jsii-calc.UseBundledDependency", - nil, // no parameters - &j, + _jsii_.RegisterEnum( + "jsii-calc.StableEnum", + reflect.TypeOf((*StableEnum)(nil)).Elem(), + map[string]interface{}{ + "OPTION_A": StableEnum_OPTION_A, + "OPTION_B": StableEnum_OPTION_B, + }, ) - - return &j -} - -func NewUseBundledDependency_Override(u UseBundledDependency) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.UseBundledDependency", - nil, // no parameters - u, + _jsii_.RegisterStruct( + "jsii-calc.StableStruct", + reflect.TypeOf((*StableStruct)(nil)).Elem(), ) -} - -func (u *jsiiProxy_UseBundledDependency) Value() interface{} { - var returns interface{} - - _jsii_.Invoke( - u, - "value", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.StaticContext", + reflect.TypeOf((*StaticContext)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_StaticContext{} + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UseCalcBase.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/jcb" -) - -// Depend on a type from jsii-calc-base as a test for awslabs/jsii#128. -type UseCalcBase interface { - Hello() jcb.Base -} - -// The jsii proxy struct for UseCalcBase -type jsiiProxy_UseCalcBase struct { - _ byte // padding -} - -func NewUseCalcBase() UseCalcBase { - _init_.Initialize() - - j := jsiiProxy_UseCalcBase{} - - _jsii_.Create( - "jsii-calc.UseCalcBase", - nil, // no parameters - &j, + _jsii_.RegisterClass( + "jsii-calc.StaticHelloChild", + reflect.TypeOf((*StaticHelloChild)(nil)).Elem(), + nil, // no members + func() interface{} { + j := jsiiProxy_StaticHelloChild{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_StaticHelloParent) + return &j + }, ) - - return &j -} - -func NewUseCalcBase_Override(u UseCalcBase) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.UseCalcBase", - nil, // no parameters - u, + _jsii_.RegisterClass( + "jsii-calc.StaticHelloParent", + reflect.TypeOf((*StaticHelloParent)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_StaticHelloParent{} + }, ) -} - -func (u *jsiiProxy_UseCalcBase) Hello() jcb.Base { - var returns jcb.Base - - _jsii_.Invoke( - u, - "hello", - nil, // no parameters - &returns, + _jsii_.RegisterClass( + "jsii-calc.Statics", + reflect.TypeOf((*Statics)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "justMethod", GoMethod: "JustMethod"}, + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + return &jsiiProxy_Statics{} + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UsesInterfaceWithProperties.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type UsesInterfaceWithProperties interface { - Obj() IInterfaceWithProperties - JustRead() *string - ReadStringAndNumber(ext IInterfaceWithPropertiesExtension) *string - WriteAndRead(value *string) *string -} - -// The jsii proxy struct for UsesInterfaceWithProperties -type jsiiProxy_UsesInterfaceWithProperties struct { - _ byte // padding -} - -func (j *jsiiProxy_UsesInterfaceWithProperties) Obj() IInterfaceWithProperties { - var returns IInterfaceWithProperties - _jsii_.Get( - j, - "obj", - &returns, + _jsii_.RegisterEnum( + "jsii-calc.StringEnum", + reflect.TypeOf((*StringEnum)(nil)).Elem(), + map[string]interface{}{ + "A": StringEnum_A, + "B": StringEnum_B, + "C": StringEnum_C, + }, ) - return returns -} - - -func NewUsesInterfaceWithProperties(obj IInterfaceWithProperties) UsesInterfaceWithProperties { - _init_.Initialize() - - j := jsiiProxy_UsesInterfaceWithProperties{} - - _jsii_.Create( - "jsii-calc.UsesInterfaceWithProperties", - []interface{}{obj}, - &j, + _jsii_.RegisterClass( + "jsii-calc.StripInternal", + reflect.TypeOf((*StripInternal)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "youSeeMe", GoGetter: "YouSeeMe"}, + }, + func() interface{} { + return &jsiiProxy_StripInternal{} + }, ) - - return &j -} - -func NewUsesInterfaceWithProperties_Override(u UsesInterfaceWithProperties, obj IInterfaceWithProperties) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.UsesInterfaceWithProperties", - []interface{}{obj}, - u, + _jsii_.RegisterStruct( + "jsii-calc.StructA", + reflect.TypeOf((*StructA)(nil)).Elem(), ) -} - -func (u *jsiiProxy_UsesInterfaceWithProperties) JustRead() *string { - var returns *string - - _jsii_.Invoke( - u, - "justRead", - nil, // no parameters - &returns, + _jsii_.RegisterStruct( + "jsii-calc.StructB", + reflect.TypeOf((*StructB)(nil)).Elem(), ) - - return returns -} - -func (u *jsiiProxy_UsesInterfaceWithProperties) ReadStringAndNumber(ext IInterfaceWithPropertiesExtension) *string { - var returns *string - - _jsii_.Invoke( - u, - "readStringAndNumber", - []interface{}{ext}, - &returns, + _jsii_.RegisterStruct( + "jsii-calc.StructParameterType", + reflect.TypeOf((*StructParameterType)(nil)).Elem(), ) - - return returns -} - -func (u *jsiiProxy_UsesInterfaceWithProperties) WriteAndRead(value *string) *string { - var returns *string - - _jsii_.Invoke( - u, - "writeAndRead", - []interface{}{value}, - &returns, + _jsii_.RegisterClass( + "jsii-calc.StructPassing", + reflect.TypeOf((*StructPassing)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_StructPassing{} + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VariadicInvoker.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type VariadicInvoker interface { - AsArray(values ...*float64) *[]*float64 -} - -// The jsii proxy struct for VariadicInvoker -type jsiiProxy_VariadicInvoker struct { - _ byte // padding -} - -func NewVariadicInvoker(method VariadicMethod) VariadicInvoker { - _init_.Initialize() - - j := jsiiProxy_VariadicInvoker{} - - _jsii_.Create( - "jsii-calc.VariadicInvoker", - []interface{}{method}, - &j, + _jsii_.RegisterClass( + "jsii-calc.StructUnionConsumer", + reflect.TypeOf((*StructUnionConsumer)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_StructUnionConsumer{} + }, ) - - return &j -} - -func NewVariadicInvoker_Override(v VariadicInvoker, method VariadicMethod) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.VariadicInvoker", - []interface{}{method}, - v, + _jsii_.RegisterStruct( + "jsii-calc.StructWithCollectionOfUnionts", + reflect.TypeOf((*StructWithCollectionOfUnionts)(nil)).Elem(), ) -} - -func (v *jsiiProxy_VariadicInvoker) AsArray(values ...*float64) *[]*float64 { - args := []interface{}{} - for _, a := range values { - args = append(args, a) - } - - var returns *[]*float64 - - _jsii_.Invoke( - v, - "asArray", - args, - &returns, + _jsii_.RegisterStruct( + "jsii-calc.StructWithEnum", + reflect.TypeOf((*StructWithEnum)(nil)).Elem(), ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VariadicMethod.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type VariadicMethod interface { - AsArray(first *float64, others ...*float64) *[]*float64 -} - -// The jsii proxy struct for VariadicMethod -type jsiiProxy_VariadicMethod struct { - _ byte // padding -} - -func NewVariadicMethod(prefix ...*float64) VariadicMethod { - _init_.Initialize() - - args := []interface{}{} - for _, a := range prefix { - args = append(args, a) - } - - j := jsiiProxy_VariadicMethod{} - - _jsii_.Create( - "jsii-calc.VariadicMethod", - args, - &j, + _jsii_.RegisterStruct( + "jsii-calc.StructWithJavaReservedWords", + reflect.TypeOf((*StructWithJavaReservedWords)(nil)).Elem(), ) - - return &j -} - -func NewVariadicMethod_Override(v VariadicMethod, prefix ...*float64) { - _init_.Initialize() - - args := []interface{}{} - for _, a := range prefix { - args = append(args, a) - } - - _jsii_.Create( - "jsii-calc.VariadicMethod", - args, - v, + _jsii_.RegisterClass( + "jsii-calc.Sum", + reflect.TypeOf((*Sum)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "decorationPostfixes", GoGetter: "DecorationPostfixes"}, + _jsii_.MemberProperty{JsiiProperty: "decorationPrefixes", GoGetter: "DecorationPrefixes"}, + _jsii_.MemberProperty{JsiiProperty: "expression", GoGetter: "Expression"}, + _jsii_.MemberProperty{JsiiProperty: "parts", GoGetter: "Parts"}, + _jsii_.MemberProperty{JsiiProperty: "stringStyle", GoGetter: "StringStyle"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + j := jsiiProxy_Sum{} + _jsii_.InitJsiiProxy(&j.Type__compositionCompositeOperation) + return &j + }, ) -} - -func (v *jsiiProxy_VariadicMethod) AsArray(first *float64, others ...*float64) *[]*float64 { - args := []interface{}{first} - for _, a := range others { - args = append(args, a) - } - - var returns *[]*float64 - - _jsii_.Invoke( - v, - "asArray", - args, - &returns, + _jsii_.RegisterClass( + "jsii-calc.SupportsNiceJavaBuilder", + reflect.TypeOf((*SupportsNiceJavaBuilder)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "bar", GoGetter: "Bar"}, + _jsii_.MemberProperty{JsiiProperty: "id", GoGetter: "Id"}, + _jsii_.MemberProperty{JsiiProperty: "propId", GoGetter: "PropId"}, + _jsii_.MemberProperty{JsiiProperty: "rest", GoGetter: "Rest"}, + }, + func() interface{} { + j := jsiiProxy_SupportsNiceJavaBuilder{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps) + return &j + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VariadicTypeUnion.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type VariadicTypeUnion interface { - Union() *[]interface{} - SetUnion(val *[]interface{}) -} - -// The jsii proxy struct for VariadicTypeUnion -type jsiiProxy_VariadicTypeUnion struct { - _ byte // padding -} - -func (j *jsiiProxy_VariadicTypeUnion) Union() *[]interface{} { - var returns *[]interface{} - _jsii_.Get( - j, - "union", - &returns, + _jsii_.RegisterStruct( + "jsii-calc.SupportsNiceJavaBuilderProps", + reflect.TypeOf((*SupportsNiceJavaBuilderProps)(nil)).Elem(), ) - return returns -} - - -func NewVariadicTypeUnion(union ...interface{}) VariadicTypeUnion { - _init_.Initialize() - - args := []interface{}{} - for _, a := range union { - args = append(args, a) - } - - j := jsiiProxy_VariadicTypeUnion{} - - _jsii_.Create( - "jsii-calc.VariadicTypeUnion", - args, - &j, + _jsii_.RegisterClass( + "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", + reflect.TypeOf((*SupportsNiceJavaBuilderWithRequiredProps)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "bar", GoGetter: "Bar"}, + _jsii_.MemberProperty{JsiiProperty: "id", GoGetter: "Id"}, + _jsii_.MemberProperty{JsiiProperty: "propId", GoGetter: "PropId"}, + }, + func() interface{} { + return &jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps{} + }, ) - - return &j -} - -func NewVariadicTypeUnion_Override(v VariadicTypeUnion, union ...interface{}) { - _init_.Initialize() - - args := []interface{}{} - for _, a := range union { - args = append(args, a) - } - - _jsii_.Create( - "jsii-calc.VariadicTypeUnion", - args, - v, + _jsii_.RegisterClass( + "jsii-calc.SyncVirtualMethods", + reflect.TypeOf((*SyncVirtualMethods)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"}, + _jsii_.MemberMethod{JsiiMethod: "callerIsAsync", GoMethod: "CallerIsAsync"}, + _jsii_.MemberMethod{JsiiMethod: "callerIsMethod", GoMethod: "CallerIsMethod"}, + _jsii_.MemberProperty{JsiiProperty: "callerIsProperty", GoGetter: "CallerIsProperty"}, + _jsii_.MemberMethod{JsiiMethod: "modifyOtherProperty", GoMethod: "ModifyOtherProperty"}, + _jsii_.MemberMethod{JsiiMethod: "modifyValueOfTheProperty", GoMethod: "ModifyValueOfTheProperty"}, + _jsii_.MemberProperty{JsiiProperty: "otherProperty", GoGetter: "OtherProperty"}, + _jsii_.MemberMethod{JsiiMethod: "readA", GoMethod: "ReadA"}, + _jsii_.MemberProperty{JsiiProperty: "readonlyProperty", GoGetter: "ReadonlyProperty"}, + _jsii_.MemberMethod{JsiiMethod: "retrieveOtherProperty", GoMethod: "RetrieveOtherProperty"}, + _jsii_.MemberMethod{JsiiMethod: "retrieveReadOnlyProperty", GoMethod: "RetrieveReadOnlyProperty"}, + _jsii_.MemberMethod{JsiiMethod: "retrieveValueOfTheProperty", GoMethod: "RetrieveValueOfTheProperty"}, + _jsii_.MemberProperty{JsiiProperty: "theProperty", GoGetter: "TheProperty"}, + _jsii_.MemberProperty{JsiiProperty: "valueOfOtherProperty", GoGetter: "ValueOfOtherProperty"}, + _jsii_.MemberMethod{JsiiMethod: "virtualMethod", GoMethod: "VirtualMethod"}, + _jsii_.MemberMethod{JsiiMethod: "writeA", GoMethod: "WriteA"}, + }, + func() interface{} { + return &jsiiProxy_SyncVirtualMethods{} + }, ) -} - -func (j *jsiiProxy_VariadicTypeUnion)SetUnion(val *[]interface{}) { - _jsii_.Set( - j, - "union", - val, + _jsii_.RegisterClass( + "jsii-calc.TestStructWithEnum", + reflect.TypeOf((*TestStructWithEnum)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "isStringEnumA", GoMethod: "IsStringEnumA"}, + _jsii_.MemberMethod{JsiiMethod: "isStringEnumB", GoMethod: "IsStringEnumB"}, + _jsii_.MemberProperty{JsiiProperty: "structWithFoo", GoGetter: "StructWithFoo"}, + _jsii_.MemberProperty{JsiiProperty: "structWithFooBar", GoGetter: "StructWithFooBar"}, + }, + func() interface{} { + return &jsiiProxy_TestStructWithEnum{} + }, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VirtualMethodPlayground.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -type VirtualMethodPlayground interface { - OverrideMeAsync(index *float64) *float64 - OverrideMeSync(index *float64) *float64 - ParallelSumAsync(count *float64) *float64 - SerialSumAsync(count *float64) *float64 - SumSync(count *float64) *float64 -} - -// The jsii proxy struct for VirtualMethodPlayground -type jsiiProxy_VirtualMethodPlayground struct { - _ byte // padding -} - -func NewVirtualMethodPlayground() VirtualMethodPlayground { - _init_.Initialize() - - j := jsiiProxy_VirtualMethodPlayground{} - - _jsii_.Create( - "jsii-calc.VirtualMethodPlayground", - nil, // no parameters - &j, + _jsii_.RegisterClass( + "jsii-calc.Thrower", + reflect.TypeOf((*Thrower)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "throwError", GoMethod: "ThrowError"}, + }, + func() interface{} { + return &jsiiProxy_Thrower{} + }, ) - - return &j -} - -func NewVirtualMethodPlayground_Override(v VirtualMethodPlayground) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.VirtualMethodPlayground", - nil, // no parameters - v, + _jsii_.RegisterStruct( + "jsii-calc.TopLevelStruct", + reflect.TypeOf((*TopLevelStruct)(nil)).Elem(), ) -} - -func (v *jsiiProxy_VirtualMethodPlayground) OverrideMeAsync(index *float64) *float64 { - var returns *float64 - - _jsii_.Invoke( - v, - "overrideMeAsync", - []interface{}{index}, - &returns, + _jsii_.RegisterClass( + "jsii-calc.TwoMethodsWithSimilarCapitalization", + reflect.TypeOf((*TwoMethodsWithSimilarCapitalization)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "fooBar", GoGetter: "FooBar"}, + _jsii_.MemberProperty{JsiiProperty: "fooBAR", GoGetter: "FooBAR"}, + _jsii_.MemberMethod{JsiiMethod: "toIsoString", GoMethod: "ToIsoString"}, + _jsii_.MemberMethod{JsiiMethod: "toIsOString", GoMethod: "ToIsOString"}, + _jsii_.MemberMethod{JsiiMethod: "toISOString", GoMethod: "ToISOString"}, + }, + func() interface{} { + return &jsiiProxy_TwoMethodsWithSimilarCapitalization{} + }, ) - - return returns -} - -func (v *jsiiProxy_VirtualMethodPlayground) OverrideMeSync(index *float64) *float64 { - var returns *float64 - - _jsii_.Invoke( - v, - "overrideMeSync", - []interface{}{index}, - &returns, + _jsii_.RegisterClass( + "jsii-calc.UmaskCheck", + reflect.TypeOf((*UmaskCheck)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_UmaskCheck{} + }, ) - - return returns -} - -func (v *jsiiProxy_VirtualMethodPlayground) ParallelSumAsync(count *float64) *float64 { - var returns *float64 - - _jsii_.Invoke( - v, - "parallelSumAsync", - []interface{}{count}, - &returns, + _jsii_.RegisterClass( + "jsii-calc.UnaryOperation", + reflect.TypeOf((*UnaryOperation)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "operand", GoGetter: "Operand"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + j := jsiiProxy_UnaryOperation{} + _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibOperation) + return &j + }, ) - - return returns -} - -func (v *jsiiProxy_VirtualMethodPlayground) SerialSumAsync(count *float64) *float64 { - var returns *float64 - - _jsii_.Invoke( - v, - "serialSumAsync", - []interface{}{count}, - &returns, + _jsii_.RegisterStruct( + "jsii-calc.UnionProperties", + reflect.TypeOf((*UnionProperties)(nil)).Elem(), ) - - return returns -} - -func (v *jsiiProxy_VirtualMethodPlayground) SumSync(count *float64) *float64 { - var returns *float64 - - _jsii_.Invoke( - v, - "sumSync", - []interface{}{count}, - &returns, + _jsii_.RegisterClass( + "jsii-calc.UpcasingReflectable", + reflect.TypeOf((*UpcasingReflectable)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "entries", GoGetter: "Entries"}, + }, + func() interface{} { + j := jsiiProxy_UpcasingReflectable{} + _jsii_.InitJsiiProxy(&j.Type__customsubmodulenameIReflectable) + return &j + }, ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VoidCallback.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -// This test is used to validate the runtimes can return correctly from a void callback. -// -// - Implement \`overrideMe\` (method does not have to do anything). -// - Invoke \`callMe\` -// - Verify that \`methodWasCalled\` is \`true\`. -type VoidCallback interface { - MethodWasCalled() *bool - CallMe() - OverrideMe() -} - -// The jsii proxy struct for VoidCallback -type jsiiProxy_VoidCallback struct { - _ byte // padding -} - -func (j *jsiiProxy_VoidCallback) MethodWasCalled() *bool { - var returns *bool - _jsii_.Get( - j, - "methodWasCalled", - &returns, + _jsii_.RegisterClass( + "jsii-calc.UseBundledDependency", + reflect.TypeOf((*UseBundledDependency)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "value", GoMethod: "Value"}, + }, + func() interface{} { + return &jsiiProxy_UseBundledDependency{} + }, ) - return returns -} - - -func NewVoidCallback_Override(v VoidCallback) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.VoidCallback", - nil, // no parameters - v, + _jsii_.RegisterClass( + "jsii-calc.UseCalcBase", + reflect.TypeOf((*UseCalcBase)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, + }, + func() interface{} { + return &jsiiProxy_UseCalcBase{} + }, ) -} - -func (v *jsiiProxy_VoidCallback) CallMe() { - _jsii_.InvokeVoid( - v, - "callMe", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.UsesInterfaceWithProperties", + reflect.TypeOf((*UsesInterfaceWithProperties)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "justRead", GoMethod: "JustRead"}, + _jsii_.MemberProperty{JsiiProperty: "obj", GoGetter: "Obj"}, + _jsii_.MemberMethod{JsiiMethod: "readStringAndNumber", GoMethod: "ReadStringAndNumber"}, + _jsii_.MemberMethod{JsiiMethod: "writeAndRead", GoMethod: "WriteAndRead"}, + }, + func() interface{} { + return &jsiiProxy_UsesInterfaceWithProperties{} + }, ) -} - -func (v *jsiiProxy_VoidCallback) OverrideMe() { - _jsii_.InvokeVoid( - v, - "overrideMe", - nil, // no parameters + _jsii_.RegisterClass( + "jsii-calc.VariadicInvoker", + reflect.TypeOf((*VariadicInvoker)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "asArray", GoMethod: "AsArray"}, + }, + func() interface{} { + return &jsiiProxy_VariadicInvoker{} + }, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_WithPrivatePropertyInConstructor.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) - -// Verifies that private property declarations in constructor arguments are hidden. -type WithPrivatePropertyInConstructor interface { - Success() *bool -} - -// The jsii proxy struct for WithPrivatePropertyInConstructor -type jsiiProxy_WithPrivatePropertyInConstructor struct { - _ byte // padding -} - -func (j *jsiiProxy_WithPrivatePropertyInConstructor) Success() *bool { - var returns *bool - _jsii_.Get( - j, - "success", - &returns, + _jsii_.RegisterClass( + "jsii-calc.VariadicMethod", + reflect.TypeOf((*VariadicMethod)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "asArray", GoMethod: "AsArray"}, + }, + func() interface{} { + return &jsiiProxy_VariadicMethod{} + }, ) - return returns -} - - -func NewWithPrivatePropertyInConstructor(privateField *string) WithPrivatePropertyInConstructor { - _init_.Initialize() - - j := jsiiProxy_WithPrivatePropertyInConstructor{} - - _jsii_.Create( - "jsii-calc.WithPrivatePropertyInConstructor", - []interface{}{privateField}, - &j, + _jsii_.RegisterClass( + "jsii-calc.VariadicTypeUnion", + reflect.TypeOf((*VariadicTypeUnion)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "union", GoGetter: "Union"}, + }, + func() interface{} { + return &jsiiProxy_VariadicTypeUnion{} + }, ) - - return &j -} - -func NewWithPrivatePropertyInConstructor_Override(w WithPrivatePropertyInConstructor, privateField *string) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.WithPrivatePropertyInConstructor", - []interface{}{privateField}, - w, + _jsii_.RegisterClass( + "jsii-calc.VirtualMethodPlayground", + reflect.TypeOf((*VirtualMethodPlayground)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "overrideMeAsync", GoMethod: "OverrideMeAsync"}, + _jsii_.MemberMethod{JsiiMethod: "overrideMeSync", GoMethod: "OverrideMeSync"}, + _jsii_.MemberMethod{JsiiMethod: "parallelSumAsync", GoMethod: "ParallelSumAsync"}, + _jsii_.MemberMethod{JsiiMethod: "serialSumAsync", GoMethod: "SerialSumAsync"}, + _jsii_.MemberMethod{JsiiMethod: "sumSync", GoMethod: "SumSync"}, + }, + func() interface{} { + return &jsiiProxy_VirtualMethodPlayground{} + }, ) -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2530/module2530.go 1`] = ` -package module2530 - -import ( - "reflect" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -func init() { _jsii_.RegisterClass( - "jsii-calc.module2530.MyClass", - reflect.TypeOf((*MyClass)(nil)).Elem(), + "jsii-calc.VoidCallback", + reflect.TypeOf((*VoidCallback)(nil)).Elem(), []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + _jsii_.MemberMethod{JsiiMethod: "callMe", GoMethod: "CallMe"}, + _jsii_.MemberProperty{JsiiProperty: "methodWasCalled", GoGetter: "MethodWasCalled"}, + _jsii_.MemberMethod{JsiiMethod: "overrideMe", GoMethod: "OverrideMe"}, }, func() interface{} { - return &jsiiProxy_MyClass{} + return &jsiiProxy_VoidCallback{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.WithPrivatePropertyInConstructor", + reflect.TypeOf((*WithPrivatePropertyInConstructor)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "success", GoGetter: "Success"}, + }, + func() interface{} { + return &jsiiProxy_WithPrivatePropertyInConstructor{} }, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2530/module2530_MyClass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2530/MyClass.go 1`] = ` package module2530 import ( @@ -21879,8 +21853,8 @@ func (m *jsiiProxy_MyClass) Foo(_arg *string) { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2617/module2617.go 1`] = ` -package module2617 +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2530/main.go 1`] = ` +package module2530 import ( "reflect" @@ -21890,18 +21864,20 @@ import ( func init() { _jsii_.RegisterClass( - "jsii-calc.module2617.OnlyStatics", - reflect.TypeOf((*OnlyStatics)(nil)).Elem(), - nil, // no members + "jsii-calc.module2530.MyClass", + reflect.TypeOf((*MyClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + }, func() interface{} { - return &jsiiProxy_OnlyStatics{} + return &jsiiProxy_MyClass{} }, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2617/module2617_OnlyStatics.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2617/OnlyStatics.go 1`] = ` package module2617 import ( @@ -21940,18 +21916,8 @@ func OnlyStatics_Foo() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2647/internal/types.go 1`] = ` -package internal -import ( - "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" -) -type Type__scopejsiicalclibBaseFor2647 = scopejsiicalclib.BaseFor2647 -type Type__scopejsiicalclibIFriendly = scopejsiicalclib.IFriendly - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2647/module2647.go 1`] = ` -package module2647 +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2617/main.go 1`] = ` +package module2617 import ( "reflect" @@ -21961,25 +21927,18 @@ import ( func init() { _jsii_.RegisterClass( - "jsii-calc.module2647.ExtendAndImplement", - reflect.TypeOf((*ExtendAndImplement)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, - _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, - _jsii_.MemberMethod{JsiiMethod: "localMethod", GoMethod: "LocalMethod"}, - }, + "jsii-calc.module2617.OnlyStatics", + reflect.TypeOf((*OnlyStatics)(nil)).Elem(), + nil, // no members func() interface{} { - j := jsiiProxy_ExtendAndImplement{} - _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibBaseFor2647) - _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibIFriendly) - return &j + return &jsiiProxy_OnlyStatics{} }, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2647/module2647_ExtendAndImplement.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2647/ExtendAndImplement.go 1`] = ` package module2647 import ( @@ -22074,8 +22033,18 @@ func (e *jsiiProxy_ExtendAndImplement) LocalMethod() *string { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/methods/methods.go 1`] = ` -package methods +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2647/internal/types.go 1`] = ` +package internal +import ( + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) +type Type__scopejsiicalclibBaseFor2647 = scopejsiicalclib.BaseFor2647 +type Type__scopejsiicalclibIFriendly = scopejsiicalclib.IFriendly + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2647/main.go 1`] = ` +package module2647 import ( "reflect" @@ -22085,21 +22054,25 @@ import ( func init() { _jsii_.RegisterClass( - "jsii-calc.module2689.methods.MyClass", - reflect.TypeOf((*MyClass)(nil)).Elem(), + "jsii-calc.module2647.ExtendAndImplement", + reflect.TypeOf((*ExtendAndImplement)(nil)).Elem(), []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"}, + _jsii_.MemberMethod{JsiiMethod: "localMethod", GoMethod: "LocalMethod"}, }, func() interface{} { - return &jsiiProxy_MyClass{} + j := jsiiProxy_ExtendAndImplement{} + _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibBaseFor2647) + _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibIFriendly) + return &j }, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/methods/methods_MyClass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/methods/MyClass.go 1`] = ` package methods import ( @@ -22163,8 +22136,8 @@ func (m *jsiiProxy_MyClass) Foo(_values *[]scopejsiicalclib.Number) { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/props/props.go 1`] = ` -package props +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/methods/main.go 1`] = ` +package methods import ( "reflect" @@ -22174,11 +22147,11 @@ import ( func init() { _jsii_.RegisterClass( - "jsii-calc.module2689.props.MyClass", + "jsii-calc.module2689.methods.MyClass", reflect.TypeOf((*MyClass)(nil)).Elem(), []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "bar", GoGetter: "Bar"}, - _jsii_.MemberProperty{JsiiProperty: "foo", GoGetter: "Foo"}, + _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, }, func() interface{} { return &jsiiProxy_MyClass{} @@ -22188,7 +22161,7 @@ func init() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/props/props_MyClass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/props/MyClass.go 1`] = ` package props import ( @@ -22257,8 +22230,8 @@ func NewMyClass_Override(m MyClass) { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/retval/retval.go 1`] = ` -package retval +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/props/main.go 1`] = ` +package props import ( "reflect" @@ -22268,11 +22241,11 @@ import ( func init() { _jsii_.RegisterClass( - "jsii-calc.module2689.retval.MyClass", + "jsii-calc.module2689.props.MyClass", reflect.TypeOf((*MyClass)(nil)).Elem(), []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + _jsii_.MemberProperty{JsiiProperty: "bar", GoGetter: "Bar"}, + _jsii_.MemberProperty{JsiiProperty: "foo", GoGetter: "Foo"}, }, func() interface{} { return &jsiiProxy_MyClass{} @@ -22282,7 +22255,7 @@ func init() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/retval/retval_MyClass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/retval/MyClass.go 1`] = ` package retval import ( @@ -22356,8 +22329,8 @@ func (m *jsiiProxy_MyClass) Foo() *[]scopejsiicalclib.Number { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/structs/structs.go 1`] = ` -package structs +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/retval/main.go 1`] = ` +package retval import ( "reflect" @@ -22366,15 +22339,22 @@ import ( ) func init() { - _jsii_.RegisterStruct( - "jsii-calc.module2689.structs.MyStruct", - reflect.TypeOf((*MyStruct)(nil)).Elem(), + _jsii_.RegisterClass( + "jsii-calc.module2689.retval.MyClass", + reflect.TypeOf((*MyClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + }, + func() interface{} { + return &jsiiProxy_MyClass{} + }, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/structs/structs_MyStruct.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/structs/MyStruct.go 1`] = ` package structs import ( @@ -22390,8 +22370,8 @@ type MyStruct struct { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2692/submodule1/submodule1.go 1`] = ` -package submodule1 +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/structs/main.go 1`] = ` +package structs import ( "reflect" @@ -22401,14 +22381,14 @@ import ( func init() { _jsii_.RegisterStruct( - "jsii-calc.module2692.submodule1.Bar", - reflect.TypeOf((*Bar)(nil)).Elem(), + "jsii-calc.module2689.structs.MyStruct", + reflect.TypeOf((*MyStruct)(nil)).Elem(), ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2692/submodule1/submodule1_Bar.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2692/submodule1/Bar.go 1`] = ` package submodule1 @@ -22419,8 +22399,8 @@ type Bar struct { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2692/submodule2/submodule2.go 1`] = ` -package submodule2 +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2692/submodule1/main.go 1`] = ` +package submodule1 import ( "reflect" @@ -22430,18 +22410,14 @@ import ( func init() { _jsii_.RegisterStruct( - "jsii-calc.module2692.submodule2.Bar", + "jsii-calc.module2692.submodule1.Bar", reflect.TypeOf((*Bar)(nil)).Elem(), ) - _jsii_.RegisterStruct( - "jsii-calc.module2692.submodule2.Foo", - reflect.TypeOf((*Foo)(nil)).Elem(), - ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2692/submodule2/submodule2_Bar.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2692/submodule2/Bar.go 1`] = ` package submodule2 @@ -22452,7 +22428,7 @@ type Bar struct { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2692/submodule2/submodule2_Foo.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2692/submodule2/Foo.go 1`] = ` package submodule2 @@ -22465,8 +22441,8 @@ type Foo struct { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2700/module2700.go 1`] = ` -package module2700 +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2692/submodule2/main.go 1`] = ` +package submodule2 import ( "reflect" @@ -22475,50 +22451,19 @@ import ( ) func init() { - _jsii_.RegisterClass( - "jsii-calc.module2700.Base", - reflect.TypeOf((*Base)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, - _jsii_.MemberProperty{JsiiProperty: "baz", GoGetter: "Baz"}, - }, - func() interface{} { - j := jsiiProxy_Base{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IFoo) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.module2700.Derived", - reflect.TypeOf((*Derived)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, - _jsii_.MemberProperty{JsiiProperty: "baz", GoGetter: "Baz"}, - _jsii_.MemberMethod{JsiiMethod: "zoo", GoMethod: "Zoo"}, - }, - func() interface{} { - j := jsiiProxy_Derived{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_Base) - _jsii_.InitJsiiProxy(&j.jsiiProxy_IFoo) - return &j - }, + _jsii_.RegisterStruct( + "jsii-calc.module2692.submodule2.Bar", + reflect.TypeOf((*Bar)(nil)).Elem(), ) - _jsii_.RegisterInterface( - "jsii-calc.module2700.IFoo", - reflect.TypeOf((*IFoo)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, - _jsii_.MemberProperty{JsiiProperty: "baz", GoGetter: "Baz"}, - }, - func() interface{} { - return &jsiiProxy_IFoo{} - }, + _jsii_.RegisterStruct( + "jsii-calc.module2692.submodule2.Foo", + reflect.TypeOf((*Foo)(nil)).Elem(), ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2700/module2700_Base.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2700/Base.go 1`] = ` package module2700 import ( @@ -22588,7 +22533,7 @@ func (b *jsiiProxy_Base) Bar() *string { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2700/module2700_Derived.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2700/Derived.go 1`] = ` package module2700 import ( @@ -22674,7 +22619,7 @@ func (d *jsiiProxy_Derived) Zoo() *string { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2700/module2700_IFoo.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2700/IFoo.go 1`] = ` package module2700 import ( @@ -22717,18 +22662,8 @@ func (j *jsiiProxy_IFoo) Baz() *float64 { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/internal/types.go 1`] = ` -package internal -import ( - "github.com/aws/jsii/jsii-calc/go/jcb" -) -type Type__jcbBase = jcb.Base -type Type__jcbIBaseInterface = jcb.IBaseInterface - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/module2702.go 1`] = ` -package module2702 +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2700/main.go 1`] = ` +package module2700 import ( "reflect" @@ -22738,172 +22673,49 @@ import ( func init() { _jsii_.RegisterClass( - "jsii-calc.module2702.Baz", - reflect.TypeOf((*Baz)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, - _jsii_.MemberMethod{JsiiMethod: "bazMethod", GoMethod: "BazMethod"}, - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, - _jsii_.MemberMethod{JsiiMethod: "iBaseInterface", GoMethod: "IBaseInterface"}, - }, - func() interface{} { - j := jsiiProxy_Baz{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_Class3) - _jsii_.InitJsiiProxy(&j.jsiiProxy_IBaz) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.module2702.Class1", - reflect.TypeOf((*Class1)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "base", GoMethod: "Base"}, - _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, - }, - func() interface{} { - j := jsiiProxy_Class1{} - _jsii_.InitJsiiProxy(&j.Type__jcbBase) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.module2702.Class2", - reflect.TypeOf((*Class2)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "base", GoGetter: "Base"}, - _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, - }, - func() interface{} { - j := jsiiProxy_Class2{} - _jsii_.InitJsiiProxy(&j.Type__jcbBase) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.module2702.Class3", - reflect.TypeOf((*Class3)(nil)).Elem(), + "jsii-calc.module2700.Base", + reflect.TypeOf((*Base)(nil)).Elem(), []_jsii_.Member{ _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, - _jsii_.MemberMethod{JsiiMethod: "iBaseInterface", GoMethod: "IBaseInterface"}, + _jsii_.MemberProperty{JsiiProperty: "baz", GoGetter: "Baz"}, }, func() interface{} { - j := jsiiProxy_Class3{} - _jsii_.InitJsiiProxy(&j.Type__jcbIBaseInterface) + j := jsiiProxy_Base{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IFoo) return &j }, ) _jsii_.RegisterClass( - "jsii-calc.module2702.Construct", - reflect.TypeOf((*Construct)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "constructMethod", GoMethod: "ConstructMethod"}, - }, - func() interface{} { - j := jsiiProxy_Construct{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IConstruct) - return &j - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.module2702.IBaz", - reflect.TypeOf((*IBaz)(nil)).Elem(), + "jsii-calc.module2700.Derived", + reflect.TypeOf((*Derived)(nil)).Elem(), []_jsii_.Member{ _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, - _jsii_.MemberMethod{JsiiMethod: "bazMethod", GoMethod: "BazMethod"}, - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + _jsii_.MemberProperty{JsiiProperty: "baz", GoGetter: "Baz"}, + _jsii_.MemberMethod{JsiiMethod: "zoo", GoMethod: "Zoo"}, }, func() interface{} { - j := jsiiProxy_IBaz{} - _jsii_.InitJsiiProxy(&j.Type__jcbIBaseInterface) + j := jsiiProxy_Derived{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_Base) + _jsii_.InitJsiiProxy(&j.jsiiProxy_IFoo) return &j }, ) _jsii_.RegisterInterface( - "jsii-calc.module2702.IConstruct", - reflect.TypeOf((*IConstruct)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "constructMethod", GoMethod: "ConstructMethod"}, - }, - func() interface{} { - return &jsiiProxy_IConstruct{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.module2702.IFoo", + "jsii-calc.module2700.IFoo", reflect.TypeOf((*IFoo)(nil)).Elem(), []_jsii_.Member{ _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, - _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, - _jsii_.MemberProperty{JsiiProperty: "iBaseInterface", GoGetter: "IBaseInterface"}, - }, - func() interface{} { - j := jsiiProxy_IFoo{} - _jsii_.InitJsiiProxy(&j.Type__jcbIBaseInterface) - return &j - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.module2702.IResource", - reflect.TypeOf((*IResource)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "constructMethod", GoMethod: "ConstructMethod"}, - _jsii_.MemberMethod{JsiiMethod: "resourceMethod", GoMethod: "ResourceMethod"}, - }, - func() interface{} { - j := jsiiProxy_IResource{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IConstruct) - return &j - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.module2702.IVpc", - reflect.TypeOf((*IVpc)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "constructMethod", GoMethod: "ConstructMethod"}, - _jsii_.MemberMethod{JsiiMethod: "resourceMethod", GoMethod: "ResourceMethod"}, - _jsii_.MemberMethod{JsiiMethod: "vpcMethod", GoMethod: "VpcMethod"}, - }, - func() interface{} { - j := jsiiProxy_IVpc{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IResource) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.module2702.Resource", - reflect.TypeOf((*Resource)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "constructMethod", GoMethod: "ConstructMethod"}, - _jsii_.MemberMethod{JsiiMethod: "resourceMethod", GoMethod: "ResourceMethod"}, - }, - func() interface{} { - j := jsiiProxy_Resource{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_Construct) - _jsii_.InitJsiiProxy(&j.jsiiProxy_IResource) - return &j - }, - ) - _jsii_.RegisterClass( - "jsii-calc.module2702.Vpc", - reflect.TypeOf((*Vpc)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "constructMethod", GoMethod: "ConstructMethod"}, - _jsii_.MemberMethod{JsiiMethod: "resourceMethod", GoMethod: "ResourceMethod"}, - _jsii_.MemberMethod{JsiiMethod: "vpcMethod", GoMethod: "VpcMethod"}, + _jsii_.MemberProperty{JsiiProperty: "baz", GoGetter: "Baz"}, }, func() interface{} { - j := jsiiProxy_Vpc{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_Resource) - _jsii_.InitJsiiProxy(&j.jsiiProxy_IVpc) - return &j + return &jsiiProxy_IFoo{} }, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/module2702_Baz.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/Baz.go 1`] = ` package module2702 import ( @@ -22985,7 +22797,7 @@ func (b *jsiiProxy_Baz) IBaseInterface() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/module2702_Class1.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/Class1.go 1`] = ` package module2702 import ( @@ -23056,7 +22868,7 @@ func (c *jsiiProxy_Class1) TypeName() interface{} { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/module2702_Class2.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/Class2.go 1`] = ` package module2702 import ( @@ -23130,7 +22942,7 @@ func (c *jsiiProxy_Class2) TypeName() interface{} { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/module2702_Class3.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/Class3.go 1`] = ` package module2702 import ( @@ -23204,7 +23016,7 @@ func (c *jsiiProxy_Class3) IBaseInterface() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/module2702_Construct.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/Construct.go 1`] = ` package module2702 import ( @@ -23257,7 +23069,7 @@ func (c *jsiiProxy_Construct) ConstructMethod() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/module2702_IBaz.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/IBaz.go 1`] = ` package module2702 import ( @@ -23288,7 +23100,7 @@ func (i *jsiiProxy_IBaz) BazMethod() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/module2702_IConstruct.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/IConstruct.go 1`] = ` package module2702 import ( @@ -23315,7 +23127,7 @@ func (i *jsiiProxy_IConstruct) ConstructMethod() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/module2702_IFoo.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/IFoo.go 1`] = ` package module2702 import ( @@ -23348,7 +23160,7 @@ func (j *jsiiProxy_IFoo) IBaseInterface() *string { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/module2702_IResource.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/IResource.go 1`] = ` package module2702 import ( @@ -23376,7 +23188,7 @@ func (i *jsiiProxy_IResource) ResourceMethod() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/module2702_IVpc.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/IVpc.go 1`] = ` package module2702 import ( @@ -23404,7 +23216,7 @@ func (i *jsiiProxy_IVpc) VpcMethod() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/module2702_Resource.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/Resource.go 1`] = ` package module2702 import ( @@ -23454,7 +23266,7 @@ func (r *jsiiProxy_Resource) ResourceMethod() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/module2702_Vpc.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/Vpc.go 1`] = ` package module2702 import ( @@ -23527,8 +23339,18 @@ func (v *jsiiProxy_Vpc) VpcMethod() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/nodirect/sub1/sub1.go 1`] = ` -package sub1 +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/internal/types.go 1`] = ` +package internal +import ( + "github.com/aws/jsii/jsii-calc/go/jcb" +) +type Type__jcbBase = jcb.Base +type Type__jcbIBaseInterface = jcb.IBaseInterface + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2702/main.go 1`] = ` +package module2702 import ( "reflect" @@ -23538,20 +23360,172 @@ import ( func init() { _jsii_.RegisterClass( - "jsii-calc.nodirect.sub1.TypeFromSub1", - reflect.TypeOf((*TypeFromSub1)(nil)).Elem(), + "jsii-calc.module2702.Baz", + reflect.TypeOf((*Baz)(nil)).Elem(), []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "sub1", GoMethod: "Sub1"}, + _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, + _jsii_.MemberMethod{JsiiMethod: "bazMethod", GoMethod: "BazMethod"}, + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + _jsii_.MemberMethod{JsiiMethod: "iBaseInterface", GoMethod: "IBaseInterface"}, }, func() interface{} { - return &jsiiProxy_TypeFromSub1{} + j := jsiiProxy_Baz{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_Class3) + _jsii_.InitJsiiProxy(&j.jsiiProxy_IBaz) + return &j + }, + ) + _jsii_.RegisterClass( + "jsii-calc.module2702.Class1", + reflect.TypeOf((*Class1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "base", GoMethod: "Base"}, + _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, + }, + func() interface{} { + j := jsiiProxy_Class1{} + _jsii_.InitJsiiProxy(&j.Type__jcbBase) + return &j + }, + ) + _jsii_.RegisterClass( + "jsii-calc.module2702.Class2", + reflect.TypeOf((*Class2)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "base", GoGetter: "Base"}, + _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"}, + }, + func() interface{} { + j := jsiiProxy_Class2{} + _jsii_.InitJsiiProxy(&j.Type__jcbBase) + return &j + }, + ) + _jsii_.RegisterClass( + "jsii-calc.module2702.Class3", + reflect.TypeOf((*Class3)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + _jsii_.MemberMethod{JsiiMethod: "iBaseInterface", GoMethod: "IBaseInterface"}, + }, + func() interface{} { + j := jsiiProxy_Class3{} + _jsii_.InitJsiiProxy(&j.Type__jcbIBaseInterface) + return &j + }, + ) + _jsii_.RegisterClass( + "jsii-calc.module2702.Construct", + reflect.TypeOf((*Construct)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "constructMethod", GoMethod: "ConstructMethod"}, + }, + func() interface{} { + j := jsiiProxy_Construct{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IConstruct) + return &j + }, + ) + _jsii_.RegisterInterface( + "jsii-calc.module2702.IBaz", + reflect.TypeOf((*IBaz)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, + _jsii_.MemberMethod{JsiiMethod: "bazMethod", GoMethod: "BazMethod"}, + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + }, + func() interface{} { + j := jsiiProxy_IBaz{} + _jsii_.InitJsiiProxy(&j.Type__jcbIBaseInterface) + return &j + }, + ) + _jsii_.RegisterInterface( + "jsii-calc.module2702.IConstruct", + reflect.TypeOf((*IConstruct)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "constructMethod", GoMethod: "ConstructMethod"}, + }, + func() interface{} { + return &jsiiProxy_IConstruct{} + }, + ) + _jsii_.RegisterInterface( + "jsii-calc.module2702.IFoo", + reflect.TypeOf((*IFoo)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"}, + _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"}, + _jsii_.MemberProperty{JsiiProperty: "iBaseInterface", GoGetter: "IBaseInterface"}, + }, + func() interface{} { + j := jsiiProxy_IFoo{} + _jsii_.InitJsiiProxy(&j.Type__jcbIBaseInterface) + return &j + }, + ) + _jsii_.RegisterInterface( + "jsii-calc.module2702.IResource", + reflect.TypeOf((*IResource)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "constructMethod", GoMethod: "ConstructMethod"}, + _jsii_.MemberMethod{JsiiMethod: "resourceMethod", GoMethod: "ResourceMethod"}, + }, + func() interface{} { + j := jsiiProxy_IResource{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IConstruct) + return &j + }, + ) + _jsii_.RegisterInterface( + "jsii-calc.module2702.IVpc", + reflect.TypeOf((*IVpc)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "constructMethod", GoMethod: "ConstructMethod"}, + _jsii_.MemberMethod{JsiiMethod: "resourceMethod", GoMethod: "ResourceMethod"}, + _jsii_.MemberMethod{JsiiMethod: "vpcMethod", GoMethod: "VpcMethod"}, + }, + func() interface{} { + j := jsiiProxy_IVpc{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IResource) + return &j + }, + ) + _jsii_.RegisterClass( + "jsii-calc.module2702.Resource", + reflect.TypeOf((*Resource)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "constructMethod", GoMethod: "ConstructMethod"}, + _jsii_.MemberMethod{JsiiMethod: "resourceMethod", GoMethod: "ResourceMethod"}, + }, + func() interface{} { + j := jsiiProxy_Resource{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_Construct) + _jsii_.InitJsiiProxy(&j.jsiiProxy_IResource) + return &j + }, + ) + _jsii_.RegisterClass( + "jsii-calc.module2702.Vpc", + reflect.TypeOf((*Vpc)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "constructMethod", GoMethod: "ConstructMethod"}, + _jsii_.MemberMethod{JsiiMethod: "resourceMethod", GoMethod: "ResourceMethod"}, + _jsii_.MemberMethod{JsiiMethod: "vpcMethod", GoMethod: "VpcMethod"}, + }, + func() interface{} { + j := jsiiProxy_Vpc{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_Resource) + _jsii_.InitJsiiProxy(&j.jsiiProxy_IVpc) + return &j }, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/nodirect/sub1/sub1_TypeFromSub1.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/nodirect/sub1/TypeFromSub1.go 1`] = ` package sub1 import ( @@ -23608,8 +23582,8 @@ func (t *jsiiProxy_TypeFromSub1) Sub1() *string { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/nodirect/sub2/sub2.go 1`] = ` -package sub2 +exports[`Generated code for "jsii-calc": /go/jsiicalc/nodirect/sub1/main.go 1`] = ` +package sub1 import ( "reflect" @@ -23619,20 +23593,20 @@ import ( func init() { _jsii_.RegisterClass( - "jsii-calc.nodirect.sub2.TypeFromSub2", - reflect.TypeOf((*TypeFromSub2)(nil)).Elem(), + "jsii-calc.nodirect.sub1.TypeFromSub1", + reflect.TypeOf((*TypeFromSub1)(nil)).Elem(), []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "sub2", GoMethod: "Sub2"}, + _jsii_.MemberMethod{JsiiMethod: "sub1", GoMethod: "Sub1"}, }, func() interface{} { - return &jsiiProxy_TypeFromSub2{} + return &jsiiProxy_TypeFromSub1{} }, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/nodirect/sub2/sub2_TypeFromSub2.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/nodirect/sub2/TypeFromSub2.go 1`] = ` package sub2 import ( @@ -23689,8 +23663,8 @@ func (t *jsiiProxy_TypeFromSub2) Sub2() *string { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/onlystatic/onlystatic.go 1`] = ` -package onlystatic +exports[`Generated code for "jsii-calc": /go/jsiicalc/nodirect/sub2/main.go 1`] = ` +package sub2 import ( "reflect" @@ -23700,18 +23674,20 @@ import ( func init() { _jsii_.RegisterClass( - "jsii-calc.onlystatic.OnlyStaticMethods", - reflect.TypeOf((*OnlyStaticMethods)(nil)).Elem(), - nil, // no members + "jsii-calc.nodirect.sub2.TypeFromSub2", + reflect.TypeOf((*TypeFromSub2)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "sub2", GoMethod: "Sub2"}, + }, func() interface{} { - return &jsiiProxy_OnlyStaticMethods{} + return &jsiiProxy_TypeFromSub2{} }, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/onlystatic/onlystatic_OnlyStaticMethods.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/onlystatic/OnlyStaticMethods.go 1`] = ` package onlystatic import ( @@ -23746,8 +23722,8 @@ func OnlyStaticMethods_StaticMethod() *string { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself.go 1`] = ` -package pythonself +exports[`Generated code for "jsii-calc": /go/jsiicalc/onlystatic/main.go 1`] = ` +package onlystatic import ( "reflect" @@ -23757,45 +23733,18 @@ import ( func init() { _jsii_.RegisterClass( - "jsii-calc.PythonSelf.ClassWithSelf", - reflect.TypeOf((*ClassWithSelf)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - _jsii_.MemberProperty{JsiiProperty: "self", GoGetter: "Self"}, - }, - func() interface{} { - return &jsiiProxy_ClassWithSelf{} - }, - ) - _jsii_.RegisterClass( - "jsii-calc.PythonSelf.ClassWithSelfKwarg", - reflect.TypeOf((*ClassWithSelfKwarg)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "props", GoGetter: "Props"}, - }, - func() interface{} { - return &jsiiProxy_ClassWithSelfKwarg{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.PythonSelf.IInterfaceWithSelf", - reflect.TypeOf((*IInterfaceWithSelf)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - }, + "jsii-calc.onlystatic.OnlyStaticMethods", + reflect.TypeOf((*OnlyStaticMethods)(nil)).Elem(), + nil, // no members func() interface{} { - return &jsiiProxy_IInterfaceWithSelf{} + return &jsiiProxy_OnlyStaticMethods{} }, ) - _jsii_.RegisterStruct( - "jsii-calc.PythonSelf.StructWithSelf", - reflect.TypeOf((*StructWithSelf)(nil)).Elem(), - ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself_ClassWithSelf.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/ClassWithSelf.go 1`] = ` package pythonself import ( @@ -23864,7 +23813,7 @@ func (c *jsiiProxy_ClassWithSelf) Method(self *float64) *string { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself_ClassWithSelfKwarg.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/ClassWithSelfKwarg.go 1`] = ` package pythonself import ( @@ -23919,7 +23868,7 @@ func NewClassWithSelfKwarg_Override(c ClassWithSelfKwarg, props *StructWithSelf) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself_IInterfaceWithSelf.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/IInterfaceWithSelf.go 1`] = ` package pythonself import ( @@ -23935,13 +23884,216 @@ type jsiiProxy_IInterfaceWithSelf struct { _ byte // padding } -func (i *jsiiProxy_IInterfaceWithSelf) Method(self *float64) *string { +func (i *jsiiProxy_IInterfaceWithSelf) Method(self *float64) *string { + var returns *string + + _jsii_.Invoke( + i, + "method", + []interface{}{self}, + &returns, + ) + + return returns +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/StructWithSelf.go 1`] = ` +package pythonself + + +type StructWithSelf struct { + Self *string \`field:"required" json:"self" yaml:"self"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/main.go 1`] = ` +package pythonself + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "jsii-calc.PythonSelf.ClassWithSelf", + reflect.TypeOf((*ClassWithSelf)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + _jsii_.MemberProperty{JsiiProperty: "self", GoGetter: "Self"}, + }, + func() interface{} { + return &jsiiProxy_ClassWithSelf{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.PythonSelf.ClassWithSelfKwarg", + reflect.TypeOf((*ClassWithSelfKwarg)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "props", GoGetter: "Props"}, + }, + func() interface{} { + return &jsiiProxy_ClassWithSelfKwarg{} + }, + ) + _jsii_.RegisterInterface( + "jsii-calc.PythonSelf.IInterfaceWithSelf", + reflect.TypeOf((*IInterfaceWithSelf)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, + }, + func() interface{} { + return &jsiiProxy_IInterfaceWithSelf{} + }, + ) + _jsii_.RegisterStruct( + "jsii-calc.PythonSelf.StructWithSelf", + reflect.TypeOf((*StructWithSelf)(nil)).Elem(), + ) +} + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/Default.go 1`] = ` +package submodule + + +// A struct named "Default". +// See: https://github.com/aws/jsii/issues/2637 +// +type Default struct { + Foo *float64 \`field:"required" json:"foo" yaml:"foo"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/MyClass.go 1`] = ` +package submodule + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/child" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/internal" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/nestedsubmodule/deeplynested" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/param" +) + +type MyClass interface { + deeplynested.INamespaced + AllTypes() jsiicalc.AllTypes + SetAllTypes(val jsiicalc.AllTypes) + Awesomeness() child.Awesomeness + DefinedAt() *string + Goodness() child.Goodness + Props() *child.SomeStruct + MethodWithSpecialParam(param *param.SpecialParameter) *string +} + +// The jsii proxy struct for MyClass +type jsiiProxy_MyClass struct { + internal.Type__deeplynestedINamespaced +} + +func (j *jsiiProxy_MyClass) AllTypes() jsiicalc.AllTypes { + var returns jsiicalc.AllTypes + _jsii_.Get( + j, + "allTypes", + &returns, + ) + return returns +} + +func (j *jsiiProxy_MyClass) Awesomeness() child.Awesomeness { + var returns child.Awesomeness + _jsii_.Get( + j, + "awesomeness", + &returns, + ) + return returns +} + +func (j *jsiiProxy_MyClass) DefinedAt() *string { + var returns *string + _jsii_.Get( + j, + "definedAt", + &returns, + ) + return returns +} + +func (j *jsiiProxy_MyClass) Goodness() child.Goodness { + var returns child.Goodness + _jsii_.Get( + j, + "goodness", + &returns, + ) + return returns +} + +func (j *jsiiProxy_MyClass) Props() *child.SomeStruct { + var returns *child.SomeStruct + _jsii_.Get( + j, + "props", + &returns, + ) + return returns +} + + +func NewMyClass(props *child.SomeStruct) MyClass { + _init_.Initialize() + + j := jsiiProxy_MyClass{} + + _jsii_.Create( + "jsii-calc.submodule.MyClass", + []interface{}{props}, + &j, + ) + + return &j +} + +func NewMyClass_Override(m MyClass, props *child.SomeStruct) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.submodule.MyClass", + []interface{}{props}, + m, + ) +} + +func (j *jsiiProxy_MyClass)SetAllTypes(val jsiicalc.AllTypes) { + _jsii_.Set( + j, + "allTypes", + val, + ) +} + +func (m *jsiiProxy_MyClass) MethodWithSpecialParam(param *param.SpecialParameter) *string { var returns *string _jsii_.Invoke( - i, - "method", - []interface{}{self}, + m, + "methodWithSpecialParam", + []interface{}{param}, &returns, ) @@ -23949,17 +24101,6 @@ func (i *jsiiProxy_IInterfaceWithSelf) Method(self *float64) *string { } -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself_StructWithSelf.go 1`] = ` -package pythonself - - -type StructWithSelf struct { - Self *string \`field:"required" json:"self" yaml:"self"\` -} - - `; exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/README.md 1`] = ` @@ -23969,25 +24110,7 @@ This is the readme of the \`jsii-calc.submodule\` module. `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/backreferences/backreferences.go 1`] = ` -package backreferences - -import ( - "reflect" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -func init() { - _jsii_.RegisterStruct( - "jsii-calc.submodule.back_references.MyClassReference", - reflect.TypeOf((*MyClassReference)(nil)).Elem(), - ) -} - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/backreferences/backreferences_MyClassReference.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/backreferences/MyClassReference.go 1`] = ` package backreferences import ( @@ -24001,8 +24124,8 @@ type MyClassReference struct { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/child.go 1`] = ` -package child +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/backreferences/main.go 1`] = ` +package backreferences import ( "reflect" @@ -24011,64 +24134,15 @@ import ( ) func init() { - _jsii_.RegisterEnum( - "jsii-calc.submodule.child.Awesomeness", - reflect.TypeOf((*Awesomeness)(nil)).Elem(), - map[string]interface{}{ - "AWESOME": Awesomeness_AWESOME, - }, - ) - _jsii_.RegisterEnum( - "jsii-calc.submodule.child.Goodness", - reflect.TypeOf((*Goodness)(nil)).Elem(), - map[string]interface{}{ - "PRETTY_GOOD": Goodness_PRETTY_GOOD, - "REALLY_GOOD": Goodness_REALLY_GOOD, - "AMAZINGLY_GOOD": Goodness_AMAZINGLY_GOOD, - }, - ) - _jsii_.RegisterClass( - "jsii-calc.submodule.child.InnerClass", - reflect.TypeOf((*InnerClass)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_InnerClass{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.submodule.child.KwargsProps", - reflect.TypeOf((*KwargsProps)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.submodule.child.OuterClass", - reflect.TypeOf((*OuterClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "innerClass", GoGetter: "InnerClass"}, - }, - func() interface{} { - return &jsiiProxy_OuterClass{} - }, - ) - _jsii_.RegisterEnum( - "jsii-calc.submodule.child.SomeEnum", - reflect.TypeOf((*SomeEnum)(nil)).Elem(), - map[string]interface{}{ - "SOME": SomeEnum_SOME, - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.submodule.child.SomeStruct", - reflect.TypeOf((*SomeStruct)(nil)).Elem(), - ) _jsii_.RegisterStruct( - "jsii-calc.submodule.child.Structure", - reflect.TypeOf((*Structure)(nil)).Elem(), + "jsii-calc.submodule.back_references.MyClassReference", + reflect.TypeOf((*MyClassReference)(nil)).Elem(), ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/child_Awesomeness.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/Awesomeness.go 1`] = ` package child @@ -24082,7 +24156,7 @@ const ( `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/child_Goodness.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/Goodness.go 1`] = ` package child @@ -24100,7 +24174,7 @@ const ( `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/child_InnerClass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/InnerClass.go 1`] = ` package child import ( @@ -24154,7 +24228,7 @@ func InnerClass_StaticProp() *SomeStruct { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/child_KwargsProps.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/KwargsProps.go 1`] = ` package child @@ -24166,7 +24240,7 @@ type KwargsProps struct { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/child_OuterClass.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/OuterClass.go 1`] = ` package child import ( @@ -24224,7 +24298,7 @@ func NewOuterClass_Override(o OuterClass) { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/child_SomeEnum.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/SomeEnum.go 1`] = ` package child @@ -24237,7 +24311,7 @@ const ( `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/child_SomeStruct.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/SomeStruct.go 1`] = ` package child @@ -24248,7 +24322,7 @@ type SomeStruct struct { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/child_Structure.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/Structure.go 1`] = ` package child @@ -24259,24 +24333,8 @@ type Structure struct { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/internal/types.go 1`] = ` -package internal -import ( - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/nestedsubmodule/deeplynested" -) -type Type__deeplynestedINamespaced = deeplynested.INamespaced - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/README.md 1`] = ` -# Read you, read me - -This is the readme of the \`jsii-calc.submodule.isolated\` module. - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/isolated.go 1`] = ` -package isolated +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/child/main.go 1`] = ` +package child import ( "reflect" @@ -24285,19 +24343,73 @@ import ( ) func init() { + _jsii_.RegisterEnum( + "jsii-calc.submodule.child.Awesomeness", + reflect.TypeOf((*Awesomeness)(nil)).Elem(), + map[string]interface{}{ + "AWESOME": Awesomeness_AWESOME, + }, + ) + _jsii_.RegisterEnum( + "jsii-calc.submodule.child.Goodness", + reflect.TypeOf((*Goodness)(nil)).Elem(), + map[string]interface{}{ + "PRETTY_GOOD": Goodness_PRETTY_GOOD, + "REALLY_GOOD": Goodness_REALLY_GOOD, + "AMAZINGLY_GOOD": Goodness_AMAZINGLY_GOOD, + }, + ) _jsii_.RegisterClass( - "jsii-calc.submodule.isolated.Kwargs", - reflect.TypeOf((*Kwargs)(nil)).Elem(), + "jsii-calc.submodule.child.InnerClass", + reflect.TypeOf((*InnerClass)(nil)).Elem(), nil, // no members func() interface{} { - return &jsiiProxy_Kwargs{} + return &jsiiProxy_InnerClass{} + }, + ) + _jsii_.RegisterStruct( + "jsii-calc.submodule.child.KwargsProps", + reflect.TypeOf((*KwargsProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "jsii-calc.submodule.child.OuterClass", + reflect.TypeOf((*OuterClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "innerClass", GoGetter: "InnerClass"}, + }, + func() interface{} { + return &jsiiProxy_OuterClass{} + }, + ) + _jsii_.RegisterEnum( + "jsii-calc.submodule.child.SomeEnum", + reflect.TypeOf((*SomeEnum)(nil)).Elem(), + map[string]interface{}{ + "SOME": SomeEnum_SOME, }, ) + _jsii_.RegisterStruct( + "jsii-calc.submodule.child.SomeStruct", + reflect.TypeOf((*SomeStruct)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "jsii-calc.submodule.child.Structure", + reflect.TypeOf((*Structure)(nil)).Elem(), + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/isolated_Kwargs.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/internal/types.go 1`] = ` +package internal +import ( + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/nestedsubmodule/deeplynested" +) +type Type__deeplynestedINamespaced = deeplynested.INamespaced + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/Kwargs.go 1`] = ` package isolated import ( @@ -24334,8 +24446,15 @@ func Kwargs_Method(props *child.KwargsProps) *bool { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/nestedsubmodule/deeplynested/deeplynested.go 1`] = ` -package deeplynested +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/README.md 1`] = ` +# Read you, read me + +This is the readme of the \`jsii-calc.submodule.isolated\` module. + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/main.go 1`] = ` +package isolated import ( "reflect" @@ -24344,60 +24463,20 @@ import ( ) func init() { - _jsii_.RegisterInterface( - "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced", - reflect.TypeOf((*INamespaced)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "definedAt", GoGetter: "DefinedAt"}, - }, + _jsii_.RegisterClass( + "jsii-calc.submodule.isolated.Kwargs", + reflect.TypeOf((*Kwargs)(nil)).Elem(), + nil, // no members func() interface{} { - return &jsiiProxy_INamespaced{} + return &jsiiProxy_Kwargs{} }, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/nestedsubmodule/deeplynested/deeplynested_INamespaced.go 1`] = ` -package deeplynested - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -type INamespaced interface { - DefinedAt() *string -} - -// The jsii proxy for INamespaced -type jsiiProxy_INamespaced struct { - _ byte // padding -} - -func (j *jsiiProxy_INamespaced) DefinedAt() *string { - var returns *string - _jsii_.Get( - j, - "definedAt", - &returns, - ) - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/nestedsubmodule/internal/types.go 1`] = ` -package internal -import ( - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/nestedsubmodule/deeplynested" -) -type Type__deeplynestedINamespaced = deeplynested.INamespaced - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/nestedsubmodule/nestedsubmodule.go 1`] = ` -package nestedsubmodule +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/main.go 1`] = ` +package submodule import ( "reflect" @@ -24406,15 +24485,23 @@ import ( ) func init() { + _jsii_.RegisterStruct( + "jsii-calc.submodule.Default", + reflect.TypeOf((*Default)(nil)).Elem(), + ) _jsii_.RegisterClass( - "jsii-calc.submodule.nested_submodule.Namespaced", - reflect.TypeOf((*Namespaced)(nil)).Elem(), + "jsii-calc.submodule.MyClass", + reflect.TypeOf((*MyClass)(nil)).Elem(), []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "allTypes", GoGetter: "AllTypes"}, + _jsii_.MemberProperty{JsiiProperty: "awesomeness", GoGetter: "Awesomeness"}, _jsii_.MemberProperty{JsiiProperty: "definedAt", GoGetter: "DefinedAt"}, _jsii_.MemberProperty{JsiiProperty: "goodness", GoGetter: "Goodness"}, + _jsii_.MemberMethod{JsiiMethod: "methodWithSpecialParam", GoMethod: "MethodWithSpecialParam"}, + _jsii_.MemberProperty{JsiiProperty: "props", GoGetter: "Props"}, }, func() interface{} { - j := jsiiProxy_Namespaced{} + j := jsiiProxy_MyClass{} _jsii_.InitJsiiProxy(&j.Type__deeplynestedINamespaced) return &j }, @@ -24423,7 +24510,7 @@ func init() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/nestedsubmodule/nestedsubmodule_Namespaced.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/nestedsubmodule/Namespaced.go 1`] = ` package nestedsubmodule import ( @@ -24469,37 +24556,37 @@ func (j *jsiiProxy_Namespaced) Goodness() child.Goodness { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/param/param.go 1`] = ` -package param +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/nestedsubmodule/deeplynested/INamespaced.go 1`] = ` +package deeplynested import ( - "reflect" - _jsii_ "github.com/aws/jsii-runtime-go/runtime" ) -func init() { - _jsii_.RegisterStruct( - "jsii-calc.submodule.param.SpecialParameter", - reflect.TypeOf((*SpecialParameter)(nil)).Elem(), - ) +type INamespaced interface { + DefinedAt() *string } -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/param/param_SpecialParameter.go 1`] = ` -package param - +// The jsii proxy for INamespaced +type jsiiProxy_INamespaced struct { + _ byte // padding +} -type SpecialParameter struct { - Value *string \`field:"required" json:"value" yaml:"value"\` +func (j *jsiiProxy_INamespaced) DefinedAt() *string { + var returns *string + _jsii_.Get( + j, + "definedAt", + &returns, + ) + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/returnsparam/returnsparam.go 1`] = ` -package returnsparam +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/nestedsubmodule/deeplynested/main.go 1`] = ` +package deeplynested import ( "reflect" @@ -24508,81 +24595,31 @@ import ( ) func init() { - _jsii_.RegisterClass( - "jsii-calc.submodule.returnsparam.ReturnsSpecialParameter", - reflect.TypeOf((*ReturnsSpecialParameter)(nil)).Elem(), + _jsii_.RegisterInterface( + "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced", + reflect.TypeOf((*INamespaced)(nil)).Elem(), []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "returnsSpecialParam", GoMethod: "ReturnsSpecialParam"}, + _jsii_.MemberProperty{JsiiProperty: "definedAt", GoGetter: "DefinedAt"}, }, func() interface{} { - return &jsiiProxy_ReturnsSpecialParameter{} + return &jsiiProxy_INamespaced{} }, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/returnsparam/returnsparam_ReturnsSpecialParameter.go 1`] = ` -package returnsparam - +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/nestedsubmodule/internal/types.go 1`] = ` +package internal import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" - - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/param" + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/nestedsubmodule/deeplynested" ) - -type ReturnsSpecialParameter interface { - ReturnsSpecialParam() *param.SpecialParameter -} - -// The jsii proxy struct for ReturnsSpecialParameter -type jsiiProxy_ReturnsSpecialParameter struct { - _ byte // padding -} - -func NewReturnsSpecialParameter() ReturnsSpecialParameter { - _init_.Initialize() - - j := jsiiProxy_ReturnsSpecialParameter{} - - _jsii_.Create( - "jsii-calc.submodule.returnsparam.ReturnsSpecialParameter", - nil, // no parameters - &j, - ) - - return &j -} - -func NewReturnsSpecialParameter_Override(r ReturnsSpecialParameter) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.submodule.returnsparam.ReturnsSpecialParameter", - nil, // no parameters - r, - ) -} - -func (r *jsiiProxy_ReturnsSpecialParameter) ReturnsSpecialParam() *param.SpecialParameter { - var returns *param.SpecialParameter - - _jsii_.Invoke( - r, - "returnsSpecialParam", - nil, // no parameters - &returns, - ) - - return returns -} - +type Type__deeplynestedINamespaced = deeplynested.INamespaced `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/submodule.go 1`] = ` -package submodule +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/nestedsubmodule/main.go 1`] = ` +package nestedsubmodule import ( "reflect" @@ -24591,23 +24628,15 @@ import ( ) func init() { - _jsii_.RegisterStruct( - "jsii-calc.submodule.Default", - reflect.TypeOf((*Default)(nil)).Elem(), - ) _jsii_.RegisterClass( - "jsii-calc.submodule.MyClass", - reflect.TypeOf((*MyClass)(nil)).Elem(), + "jsii-calc.submodule.nested_submodule.Namespaced", + reflect.TypeOf((*Namespaced)(nil)).Elem(), []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "allTypes", GoGetter: "AllTypes"}, - _jsii_.MemberProperty{JsiiProperty: "awesomeness", GoGetter: "Awesomeness"}, _jsii_.MemberProperty{JsiiProperty: "definedAt", GoGetter: "DefinedAt"}, _jsii_.MemberProperty{JsiiProperty: "goodness", GoGetter: "Goodness"}, - _jsii_.MemberMethod{JsiiMethod: "methodWithSpecialParam", GoMethod: "MethodWithSpecialParam"}, - _jsii_.MemberProperty{JsiiProperty: "props", GoGetter: "Props"}, }, func() interface{} { - j := jsiiProxy_MyClass{} + j := jsiiProxy_Namespaced{} _jsii_.InitJsiiProxy(&j.Type__deeplynestedINamespaced) return &j }, @@ -24616,140 +24645,85 @@ func init() { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/submodule_Default.go 1`] = ` -package submodule +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/param/SpecialParameter.go 1`] = ` +package param -// A struct named "Default". -// See: https://github.com/aws/jsii/issues/2637 -// -type Default struct { - Foo *float64 \`field:"required" json:"foo" yaml:"foo"\` +type SpecialParameter struct { + Value *string \`field:"required" json:"value" yaml:"value"\` } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/submodule_MyClass.go 1`] = ` -package submodule +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/param/main.go 1`] = ` +package param import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" + "reflect" - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3" - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/child" - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/internal" - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/nestedsubmodule/deeplynested" - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/param" + _jsii_ "github.com/aws/jsii-runtime-go/runtime" ) -type MyClass interface { - deeplynested.INamespaced - AllTypes() jsiicalc.AllTypes - SetAllTypes(val jsiicalc.AllTypes) - Awesomeness() child.Awesomeness - DefinedAt() *string - Goodness() child.Goodness - Props() *child.SomeStruct - MethodWithSpecialParam(param *param.SpecialParameter) *string +func init() { + _jsii_.RegisterStruct( + "jsii-calc.submodule.param.SpecialParameter", + reflect.TypeOf((*SpecialParameter)(nil)).Elem(), + ) } -// The jsii proxy struct for MyClass -type jsiiProxy_MyClass struct { - internal.Type__deeplynestedINamespaced -} +`; -func (j *jsiiProxy_MyClass) AllTypes() jsiicalc.AllTypes { - var returns jsiicalc.AllTypes - _jsii_.Get( - j, - "allTypes", - &returns, - ) - return returns -} +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/returnsparam/ReturnsSpecialParameter.go 1`] = ` +package returnsparam -func (j *jsiiProxy_MyClass) Awesomeness() child.Awesomeness { - var returns child.Awesomeness - _jsii_.Get( - j, - "awesomeness", - &returns, - ) - return returns -} +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -func (j *jsiiProxy_MyClass) DefinedAt() *string { - var returns *string - _jsii_.Get( - j, - "definedAt", - &returns, - ) - return returns -} + "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/param" +) -func (j *jsiiProxy_MyClass) Goodness() child.Goodness { - var returns child.Goodness - _jsii_.Get( - j, - "goodness", - &returns, - ) - return returns +type ReturnsSpecialParameter interface { + ReturnsSpecialParam() *param.SpecialParameter } -func (j *jsiiProxy_MyClass) Props() *child.SomeStruct { - var returns *child.SomeStruct - _jsii_.Get( - j, - "props", - &returns, - ) - return returns +// The jsii proxy struct for ReturnsSpecialParameter +type jsiiProxy_ReturnsSpecialParameter struct { + _ byte // padding } - -func NewMyClass(props *child.SomeStruct) MyClass { +func NewReturnsSpecialParameter() ReturnsSpecialParameter { _init_.Initialize() - j := jsiiProxy_MyClass{} + j := jsiiProxy_ReturnsSpecialParameter{} _jsii_.Create( - "jsii-calc.submodule.MyClass", - []interface{}{props}, + "jsii-calc.submodule.returnsparam.ReturnsSpecialParameter", + nil, // no parameters &j, ) return &j } -func NewMyClass_Override(m MyClass, props *child.SomeStruct) { +func NewReturnsSpecialParameter_Override(r ReturnsSpecialParameter) { _init_.Initialize() _jsii_.Create( - "jsii-calc.submodule.MyClass", - []interface{}{props}, - m, - ) -} - -func (j *jsiiProxy_MyClass)SetAllTypes(val jsiicalc.AllTypes) { - _jsii_.Set( - j, - "allTypes", - val, + "jsii-calc.submodule.returnsparam.ReturnsSpecialParameter", + nil, // no parameters + r, ) } -func (m *jsiiProxy_MyClass) MethodWithSpecialParam(param *param.SpecialParameter) *string { - var returns *string +func (r *jsiiProxy_ReturnsSpecialParameter) ReturnsSpecialParam() *param.SpecialParameter { + var returns *param.SpecialParameter _jsii_.Invoke( - m, - "methodWithSpecialParam", - []interface{}{param}, + r, + "returnsSpecialParam", + nil, // no parameters &returns, ) @@ -24759,51 +24733,31 @@ func (m *jsiiProxy_MyClass) MethodWithSpecialParam(param *param.SpecialParameter `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/union/union.go 1`] = ` -package union +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/returnsparam/main.go 1`] = ` +package returnsparam import ( - "reflect" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -func init() { - _jsii_.RegisterClass( - "jsii-calc.union.ConsumesUnion", - reflect.TypeOf((*ConsumesUnion)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_ConsumesUnion{} - }, - ) - _jsii_.RegisterInterface( - "jsii-calc.union.IResolvable", - reflect.TypeOf((*IResolvable)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "resolve", GoMethod: "Resolve"}, - }, - func() interface{} { - return &jsiiProxy_IResolvable{} - }, - ) + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { _jsii_.RegisterClass( - "jsii-calc.union.Resolvable", - reflect.TypeOf((*Resolvable)(nil)).Elem(), + "jsii-calc.submodule.returnsparam.ReturnsSpecialParameter", + reflect.TypeOf((*ReturnsSpecialParameter)(nil)).Elem(), []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "resolve", GoMethod: "Resolve"}, + _jsii_.MemberMethod{JsiiMethod: "returnsSpecialParam", GoMethod: "ReturnsSpecialParam"}, }, func() interface{} { - j := jsiiProxy_Resolvable{} - _jsii_.InitJsiiProxy(&j.jsiiProxy_IResolvable) - return &j + return &jsiiProxy_ReturnsSpecialParameter{} }, ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/union/union_ConsumesUnion.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/union/ConsumesUnion.go 1`] = ` package union import ( @@ -24832,7 +24786,7 @@ func ConsumesUnion_UnionType(param interface{}) { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/union/union_IResolvable.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/union/IResolvable.go 1`] = ` package union import ( @@ -24864,7 +24818,7 @@ func (i *jsiiProxy_IResolvable) Resolve() interface{} { `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/union/union_Resolvable.go 1`] = ` +exports[`Generated code for "jsii-calc": /go/jsiicalc/union/Resolvable.go 1`] = ` package union import ( @@ -24879,1121 +24833,437 @@ type Resolvable interface { // The jsii proxy struct for Resolvable type jsiiProxy_Resolvable struct { jsiiProxy_IResolvable -} - -func (r *jsiiProxy_Resolvable) Resolve() interface{} { - var returns interface{} - - _jsii_.Invoke( - r, - "resolve", - nil, // no parameters - &returns, - ) - - return returns -} - - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/version 1`] = ` -3.20.120 - -`; - -exports[`Generated code for "jsii-calc": / 1`] = ` - - ┗━ 📁 go - ┗━ 📁 jsiicalc - ┣━ 📁 anonymous - ┃ ┣━ 🆕 anonymous_UseOptions__no_runtime_type_checking.go - ┃ ┣━ 🆕 anonymous_UseOptions__runtime_type_checks.go - ┃ ┗━ 📄 anonymous_UseOptions.go.diff - ┣━ 📁 cdk16625 - ┃ ┣━ 🆕 cdk16625_Cdk16625__no_runtime_type_checking.go - ┃ ┣━ 🆕 cdk16625_Cdk16625__runtime_type_checks.go - ┃ ┣━ 📄 cdk16625_Cdk16625.go.diff - ┃ ┗━ 📁 donotimport - ┃ ┣━ 🆕 donotimport_UnimportedSubmoduleType__no_runtime_type_checking.go - ┃ ┣━ 🆕 donotimport_UnimportedSubmoduleType__runtime_type_checks.go - ┃ ┗━ 📄 donotimport_UnimportedSubmoduleType.go.diff - ┣━ 📁 cdk22369 - ┃ ┣━ 🆕 cdk22369_AcceptsPath__no_runtime_type_checking.go - ┃ ┣━ 🆕 cdk22369_AcceptsPath__runtime_type_checks.go - ┃ ┗━ 📄 cdk22369_AcceptsPath.go.diff - ┣━ 📁 composition - ┃ ┣━ 🆕 composition_CompositeOperation__no_runtime_type_checking.go - ┃ ┣━ 🆕 composition_CompositeOperation__runtime_type_checks.go - ┃ ┗━ 📄 composition_CompositeOperation.go.diff - ┣━ 📁 derivedclasshasnoproperties - ┃ ┣━ 🆕 derivedclasshasnoproperties_Base__no_runtime_type_checking.go - ┃ ┣━ 🆕 derivedclasshasnoproperties_Base__runtime_type_checks.go - ┃ ┣━ 📄 derivedclasshasnoproperties_Base.go.diff - ┃ ┣━ 🆕 derivedclasshasnoproperties_Derived__no_runtime_type_checking.go - ┃ ┣━ 🆕 derivedclasshasnoproperties_Derived__runtime_type_checks.go - ┃ ┗━ 📄 derivedclasshasnoproperties_Derived.go.diff - ┣━ 📁 homonymousforwardreferences - ┃ ┣━ 📁 bar - ┃ ┃ ┣━ 🆕 bar_Consumer__no_runtime_type_checking.go - ┃ ┃ ┣━ 🆕 bar_Consumer__runtime_type_checks.go - ┃ ┃ ┗━ 📄 bar_Consumer.go.diff - ┃ ┗━ 📁 foo - ┃ ┣━ 🆕 foo_Consumer__no_runtime_type_checking.go - ┃ ┣━ 🆕 foo_Consumer__runtime_type_checks.go - ┃ ┗━ 📄 foo_Consumer.go.diff - ┣━ 📁 jsii3656 - ┃ ┣━ 🆕 jsii3656_OverrideMe__no_runtime_type_checking.go - ┃ ┣━ 🆕 jsii3656_OverrideMe__runtime_type_checks.go - ┃ ┗━ 📄 jsii3656_OverrideMe.go.diff - ┣━ 🆕 jsiicalc_AbstractClass__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_AbstractClass__runtime_type_checks.go - ┣━ 📄 jsiicalc_AbstractClass.go.diff - ┣━ 🆕 jsiicalc_AbstractSuite__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_AbstractSuite__runtime_type_checks.go - ┣━ 📄 jsiicalc_AbstractSuite.go.diff - ┣━ 🆕 jsiicalc_Add__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_Add__runtime_type_checks.go - ┣━ 📄 jsiicalc_Add.go.diff - ┣━ 🆕 jsiicalc_AllowedMethodNames__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_AllowedMethodNames__runtime_type_checks.go - ┣━ 📄 jsiicalc_AllowedMethodNames.go.diff - ┣━ 🆕 jsiicalc_AllTypes__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_AllTypes__runtime_type_checks.go - ┣━ 📄 jsiicalc_AllTypes.go.diff - ┣━ 🆕 jsiicalc_AmbiguousParameters__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_AmbiguousParameters__runtime_type_checks.go - ┣━ 📄 jsiicalc_AmbiguousParameters.go.diff - ┣━ 🆕 jsiicalc_AsyncVirtualMethods__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_AsyncVirtualMethods__runtime_type_checks.go - ┣━ 📄 jsiicalc_AsyncVirtualMethods.go.diff - ┣━ 🆕 jsiicalc_Bell__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_Bell__runtime_type_checks.go - ┣━ 📄 jsiicalc_Bell.go.diff - ┣━ 🆕 jsiicalc_BinaryOperation__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_BinaryOperation__runtime_type_checks.go - ┣━ 🆕 jsiicalc_BurriedAnonymousObject__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_BurriedAnonymousObject__runtime_type_checks.go - ┣━ 📄 jsiicalc_BurriedAnonymousObject.go.diff - ┣━ 🆕 jsiicalc_Calculator__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_Calculator__runtime_type_checks.go - ┣━ 📄 jsiicalc_Calculator.go.diff - ┣━ 🆕 jsiicalc_ClassThatImplementsTheInternalInterface__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ClassThatImplementsTheInternalInterface__runtime_type_checks.go - ┣━ 📄 jsiicalc_ClassThatImplementsTheInternalInterface.go.diff - ┣━ 🆕 jsiicalc_ClassThatImplementsThePrivateInterface__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ClassThatImplementsThePrivateInterface__runtime_type_checks.go - ┣━ 📄 jsiicalc_ClassThatImplementsThePrivateInterface.go.diff - ┣━ 🆕 jsiicalc_ClassWithCollectionOfUnions__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ClassWithCollectionOfUnions__runtime_type_checks.go - ┣━ 📄 jsiicalc_ClassWithCollectionOfUnions.go.diff - ┣━ 🆕 jsiicalc_ClassWithCollections__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ClassWithCollections__runtime_type_checks.go - ┣━ 📄 jsiicalc_ClassWithCollections.go.diff - ┣━ 🆕 jsiicalc_ClassWithContainerTypes__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ClassWithContainerTypes__runtime_type_checks.go - ┣━ 📄 jsiicalc_ClassWithContainerTypes.go.diff - ┣━ 🆕 jsiicalc_ClassWithJavaReservedWords__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ClassWithJavaReservedWords__runtime_type_checks.go - ┣━ 📄 jsiicalc_ClassWithJavaReservedWords.go.diff - ┣━ 🆕 jsiicalc_ClassWithMutableObjectLiteralProperty__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ClassWithMutableObjectLiteralProperty__runtime_type_checks.go - ┣━ 📄 jsiicalc_ClassWithMutableObjectLiteralProperty.go.diff - ┣━ 🆕 jsiicalc_ClassWithNestedUnion__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ClassWithNestedUnion__runtime_type_checks.go - ┣━ 📄 jsiicalc_ClassWithNestedUnion.go.diff - ┣━ 🆕 jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties__runtime_type_checks.go - ┣━ 📄 jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties.go.diff - ┣━ 🆕 jsiicalc_ConfusingToJackson__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ConfusingToJackson__runtime_type_checks.go - ┣━ 📄 jsiicalc_ConfusingToJackson.go.diff - ┣━ 🆕 jsiicalc_ConstructorPassesThisOut__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ConstructorPassesThisOut__runtime_type_checks.go - ┣━ 📄 jsiicalc_ConstructorPassesThisOut.go.diff - ┣━ 🆕 jsiicalc_ConsumePureInterface__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ConsumePureInterface__runtime_type_checks.go - ┣━ 📄 jsiicalc_ConsumePureInterface.go.diff - ┣━ 🆕 jsiicalc_ConsumerCanRingBell__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ConsumerCanRingBell__runtime_type_checks.go - ┣━ 📄 jsiicalc_ConsumerCanRingBell.go.diff - ┣━ 🆕 jsiicalc_ConsumersOfThisCrazyTypeSystem__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ConsumersOfThisCrazyTypeSystem__runtime_type_checks.go - ┣━ 📄 jsiicalc_ConsumersOfThisCrazyTypeSystem.go.diff - ┣━ 🆕 jsiicalc_DataRenderer__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_DataRenderer__runtime_type_checks.go - ┣━ 📄 jsiicalc_DataRenderer.go.diff - ┣━ 🆕 jsiicalc_DeprecatedClass__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_DeprecatedClass__runtime_type_checks.go - ┣━ 📄 jsiicalc_DeprecatedClass.go.diff - ┣━ 🆕 jsiicalc_DocumentedClass__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_DocumentedClass__runtime_type_checks.go - ┣━ 📄 jsiicalc_DocumentedClass.go.diff - ┣━ 🆕 jsiicalc_DoNotOverridePrivates__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_DoNotOverridePrivates__runtime_type_checks.go - ┣━ 📄 jsiicalc_DoNotOverridePrivates.go.diff - ┣━ 🆕 jsiicalc_DoNotRecognizeAnyAsOptional__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_DoNotRecognizeAnyAsOptional__runtime_type_checks.go - ┣━ 📄 jsiicalc_DoNotRecognizeAnyAsOptional.go.diff - ┣━ 🆕 jsiicalc_DynamicPropertyBearer__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_DynamicPropertyBearer__runtime_type_checks.go - ┣━ 📄 jsiicalc_DynamicPropertyBearer.go.diff - ┣━ 🆕 jsiicalc_DynamicPropertyBearerChild__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_DynamicPropertyBearerChild__runtime_type_checks.go - ┣━ 📄 jsiicalc_DynamicPropertyBearerChild.go.diff - ┣━ 🆕 jsiicalc_Entropy__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_Entropy__runtime_type_checks.go - ┣━ 📄 jsiicalc_Entropy.go.diff - ┣━ 🆕 jsiicalc_EraseUndefinedHashValues__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_EraseUndefinedHashValues__runtime_type_checks.go - ┣━ 📄 jsiicalc_EraseUndefinedHashValues.go.diff - ┣━ 🆕 jsiicalc_ExperimentalClass__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ExperimentalClass__runtime_type_checks.go - ┣━ 📄 jsiicalc_ExperimentalClass.go.diff - ┣━ 🆕 jsiicalc_ExportedBaseClass__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ExportedBaseClass__runtime_type_checks.go - ┣━ 📄 jsiicalc_ExportedBaseClass.go.diff - ┣━ 🆕 jsiicalc_ExternalClass__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ExternalClass__runtime_type_checks.go - ┣━ 📄 jsiicalc_ExternalClass.go.diff - ┣━ 🆕 jsiicalc_GiveMeStructs__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_GiveMeStructs__runtime_type_checks.go - ┣━ 📄 jsiicalc_GiveMeStructs.go.diff - ┣━ 🆕 jsiicalc_GreetingAugmenter__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_GreetingAugmenter__runtime_type_checks.go - ┣━ 📄 jsiicalc_GreetingAugmenter.go.diff - ┣━ 🆕 jsiicalc_IAnotherPublicInterface__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_IAnotherPublicInterface__runtime_type_checks.go - ┣━ 📄 jsiicalc_IAnotherPublicInterface.go.diff - ┣━ 🆕 jsiicalc_IBellRinger__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_IBellRinger__runtime_type_checks.go - ┣━ 📄 jsiicalc_IBellRinger.go.diff - ┣━ 🆕 jsiicalc_IConcreteBellRinger__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_IConcreteBellRinger__runtime_type_checks.go - ┣━ 📄 jsiicalc_IConcreteBellRinger.go.diff - ┣━ 🆕 jsiicalc_IExtendsPrivateInterface__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_IExtendsPrivateInterface__runtime_type_checks.go - ┣━ 📄 jsiicalc_IExtendsPrivateInterface.go.diff - ┣━ 🆕 jsiicalc_IInterfaceWithOptionalMethodArguments__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_IInterfaceWithOptionalMethodArguments__runtime_type_checks.go - ┣━ 📄 jsiicalc_IInterfaceWithOptionalMethodArguments.go.diff - ┣━ 🆕 jsiicalc_IInterfaceWithProperties__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_IInterfaceWithProperties__runtime_type_checks.go - ┣━ 📄 jsiicalc_IInterfaceWithProperties.go.diff - ┣━ 🆕 jsiicalc_IInterfaceWithPropertiesExtension__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_IInterfaceWithPropertiesExtension__runtime_type_checks.go - ┣━ 📄 jsiicalc_IInterfaceWithPropertiesExtension.go.diff - ┣━ 🆕 jsiicalc_ImplementInternalInterface__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ImplementInternalInterface__runtime_type_checks.go - ┣━ 📄 jsiicalc_ImplementInternalInterface.go.diff - ┣━ 🆕 jsiicalc_ImplementsPrivateInterface__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ImplementsPrivateInterface__runtime_type_checks.go - ┣━ 📄 jsiicalc_ImplementsPrivateInterface.go.diff - ┣━ 🆕 jsiicalc_IMutableObjectLiteral__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_IMutableObjectLiteral__runtime_type_checks.go - ┣━ 📄 jsiicalc_IMutableObjectLiteral.go.diff - ┣━ 🆕 jsiicalc_INonInternalInterface__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_INonInternalInterface__runtime_type_checks.go - ┣━ 📄 jsiicalc_INonInternalInterface.go.diff - ┣━ 🆕 jsiicalc_InterfacesMaker__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_InterfacesMaker__runtime_type_checks.go - ┣━ 📄 jsiicalc_InterfacesMaker.go.diff - ┣━ 🆕 jsiicalc_IObjectWithProperty__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_IObjectWithProperty__runtime_type_checks.go - ┣━ 📄 jsiicalc_IObjectWithProperty.go.diff - ┣━ 🆕 jsiicalc_JavaReservedWords__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_JavaReservedWords__runtime_type_checks.go - ┣━ 📄 jsiicalc_JavaReservedWords.go.diff - ┣━ 🆕 jsiicalc_JSII417Derived__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_JSII417Derived__runtime_type_checks.go - ┣━ 📄 jsiicalc_JSII417Derived.go.diff - ┣━ 🆕 jsiicalc_JSObjectLiteralToNativeClass__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_JSObjectLiteralToNativeClass__runtime_type_checks.go - ┣━ 📄 jsiicalc_JSObjectLiteralToNativeClass.go.diff - ┣━ 🆕 jsiicalc_LevelOne__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_LevelOne__runtime_type_checks.go - ┣━ 📄 jsiicalc_LevelOne.go.diff - ┣━ 🆕 jsiicalc_Multiply__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_Multiply__runtime_type_checks.go - ┣━ 📄 jsiicalc_Multiply.go.diff - ┣━ 🆕 jsiicalc_Negate__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_Negate__runtime_type_checks.go - ┣━ 📄 jsiicalc_Negate.go.diff - ┣━ 🆕 jsiicalc_NullShouldBeTreatedAsUndefined__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_NullShouldBeTreatedAsUndefined__runtime_type_checks.go - ┣━ 📄 jsiicalc_NullShouldBeTreatedAsUndefined.go.diff - ┣━ 🆕 jsiicalc_NumberGenerator__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_NumberGenerator__runtime_type_checks.go - ┣━ 📄 jsiicalc_NumberGenerator.go.diff - ┣━ 🆕 jsiicalc_ObjectRefsInCollections__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ObjectRefsInCollections__runtime_type_checks.go - ┣━ 📄 jsiicalc_ObjectRefsInCollections.go.diff - ┣━ 🆕 jsiicalc_OptionalArgumentInvoker__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_OptionalArgumentInvoker__runtime_type_checks.go - ┣━ 📄 jsiicalc_OptionalArgumentInvoker.go.diff - ┣━ 🆕 jsiicalc_OptionalConstructorArgument__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_OptionalConstructorArgument__runtime_type_checks.go - ┣━ 📄 jsiicalc_OptionalConstructorArgument.go.diff - ┣━ 🆕 jsiicalc_OptionalStructConsumer__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_OptionalStructConsumer__runtime_type_checks.go - ┣━ 📄 jsiicalc_OptionalStructConsumer.go.diff - ┣━ 🆕 jsiicalc_OverridableProtectedMember__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_OverridableProtectedMember__runtime_type_checks.go - ┣━ 📄 jsiicalc_OverridableProtectedMember.go.diff - ┣━ 🆕 jsiicalc_OverrideReturnsObject__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_OverrideReturnsObject__runtime_type_checks.go - ┣━ 📄 jsiicalc_OverrideReturnsObject.go.diff - ┣━ 🆕 jsiicalc_ParamShadowsBuiltins__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ParamShadowsBuiltins__runtime_type_checks.go - ┣━ 📄 jsiicalc_ParamShadowsBuiltins.go.diff - ┣━ 🆕 jsiicalc_ParamShadowsScope__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ParamShadowsScope__runtime_type_checks.go - ┣━ 📄 jsiicalc_ParamShadowsScope.go.diff - ┣━ 🆕 jsiicalc_PartiallyInitializedThisConsumer__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_PartiallyInitializedThisConsumer__runtime_type_checks.go - ┣━ 📄 jsiicalc_PartiallyInitializedThisConsumer.go.diff - ┣━ 🆕 jsiicalc_Polymorphism__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_Polymorphism__runtime_type_checks.go - ┣━ 📄 jsiicalc_Polymorphism.go.diff - ┣━ 🆕 jsiicalc_Power__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_Power__runtime_type_checks.go - ┣━ 📄 jsiicalc_Power.go.diff - ┣━ 🆕 jsiicalc_ReferenceEnumFromScopedPackage__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_ReferenceEnumFromScopedPackage__runtime_type_checks.go - ┣━ 📄 jsiicalc_ReferenceEnumFromScopedPackage.go.diff - ┣━ 🆕 jsiicalc_RootStructValidator__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_RootStructValidator__runtime_type_checks.go - ┣━ 📄 jsiicalc_RootStructValidator.go.diff - ┣━ 🆕 jsiicalc_RuntimeTypeChecking__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_RuntimeTypeChecking__runtime_type_checks.go - ┣━ 📄 jsiicalc_RuntimeTypeChecking.go.diff - ┣━ 🆕 jsiicalc_SingletonInt__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_SingletonInt__runtime_type_checks.go - ┣━ 📄 jsiicalc_SingletonInt.go.diff - ┣━ 🆕 jsiicalc_SingletonString__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_SingletonString__runtime_type_checks.go - ┣━ 📄 jsiicalc_SingletonString.go.diff - ┣━ 🆕 jsiicalc_StableClass__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_StableClass__runtime_type_checks.go - ┣━ 📄 jsiicalc_StableClass.go.diff - ┣━ 🆕 jsiicalc_StaticContext__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_StaticContext__runtime_type_checks.go - ┣━ 📄 jsiicalc_StaticContext.go.diff - ┣━ 🆕 jsiicalc_Statics__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_Statics__runtime_type_checks.go - ┣━ 📄 jsiicalc_Statics.go.diff - ┣━ 🆕 jsiicalc_StripInternal__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_StripInternal__runtime_type_checks.go - ┣━ 📄 jsiicalc_StripInternal.go.diff - ┣━ 🆕 jsiicalc_StructPassing__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_StructPassing__runtime_type_checks.go - ┣━ 📄 jsiicalc_StructPassing.go.diff - ┣━ 🆕 jsiicalc_StructUnionConsumer__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_StructUnionConsumer__runtime_type_checks.go - ┣━ 📄 jsiicalc_StructUnionConsumer.go.diff - ┣━ 🆕 jsiicalc_Sum__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_Sum__runtime_type_checks.go - ┣━ 📄 jsiicalc_Sum.go.diff - ┣━ 🆕 jsiicalc_SupportsNiceJavaBuilder__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_SupportsNiceJavaBuilder__runtime_type_checks.go - ┣━ 📄 jsiicalc_SupportsNiceJavaBuilder.go.diff - ┣━ 🆕 jsiicalc_SupportsNiceJavaBuilderWithRequiredProps__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_SupportsNiceJavaBuilderWithRequiredProps__runtime_type_checks.go - ┣━ 📄 jsiicalc_SupportsNiceJavaBuilderWithRequiredProps.go.diff - ┣━ 🆕 jsiicalc_SyncVirtualMethods__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_SyncVirtualMethods__runtime_type_checks.go - ┣━ 📄 jsiicalc_SyncVirtualMethods.go.diff - ┣━ 🆕 jsiicalc_TestStructWithEnum__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_TestStructWithEnum__runtime_type_checks.go - ┣━ 📄 jsiicalc_TestStructWithEnum.go.diff - ┣━ 🆕 jsiicalc_UnaryOperation__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_UnaryOperation__runtime_type_checks.go - ┣━ 🆕 jsiicalc_UpcasingReflectable__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_UpcasingReflectable__runtime_type_checks.go - ┣━ 📄 jsiicalc_UpcasingReflectable.go.diff - ┣━ 🆕 jsiicalc_UsesInterfaceWithProperties__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_UsesInterfaceWithProperties__runtime_type_checks.go - ┣━ 📄 jsiicalc_UsesInterfaceWithProperties.go.diff - ┣━ 🆕 jsiicalc_VariadicInvoker__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_VariadicInvoker__runtime_type_checks.go - ┣━ 📄 jsiicalc_VariadicInvoker.go.diff - ┣━ 🆕 jsiicalc_VariadicMethod__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_VariadicMethod__runtime_type_checks.go - ┣━ 📄 jsiicalc_VariadicMethod.go.diff - ┣━ 🆕 jsiicalc_VariadicTypeUnion__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_VariadicTypeUnion__runtime_type_checks.go - ┣━ 📄 jsiicalc_VariadicTypeUnion.go.diff - ┣━ 🆕 jsiicalc_VirtualMethodPlayground__no_runtime_type_checking.go - ┣━ 🆕 jsiicalc_VirtualMethodPlayground__runtime_type_checks.go - ┣━ 📄 jsiicalc_VirtualMethodPlayground.go.diff - ┣━ 📁 module2530 - ┃ ┣━ 🆕 module2530_MyClass__no_runtime_type_checking.go - ┃ ┣━ 🆕 module2530_MyClass__runtime_type_checks.go - ┃ ┗━ 📄 module2530_MyClass.go.diff - ┣━ 📁 module2647 - ┃ ┣━ 🆕 module2647_ExtendAndImplement__no_runtime_type_checking.go - ┃ ┣━ 🆕 module2647_ExtendAndImplement__runtime_type_checks.go - ┃ ┗━ 📄 module2647_ExtendAndImplement.go.diff - ┣━ 📁 module2689 - ┃ ┗━ 📁 methods - ┃ ┣━ 🆕 methods_MyClass__no_runtime_type_checking.go - ┃ ┣━ 🆕 methods_MyClass__runtime_type_checks.go - ┃ ┗━ 📄 methods_MyClass.go.diff - ┣━ 📁 pythonself - ┃ ┣━ 🆕 pythonself_ClassWithSelf__no_runtime_type_checking.go - ┃ ┣━ 🆕 pythonself_ClassWithSelf__runtime_type_checks.go - ┃ ┣━ 📄 pythonself_ClassWithSelf.go.diff - ┃ ┣━ 🆕 pythonself_ClassWithSelfKwarg__no_runtime_type_checking.go - ┃ ┣━ 🆕 pythonself_ClassWithSelfKwarg__runtime_type_checks.go - ┃ ┣━ 📄 pythonself_ClassWithSelfKwarg.go.diff - ┃ ┣━ 🆕 pythonself_IInterfaceWithSelf__no_runtime_type_checking.go - ┃ ┣━ 🆕 pythonself_IInterfaceWithSelf__runtime_type_checks.go - ┃ ┗━ 📄 pythonself_IInterfaceWithSelf.go.diff - ┣━ 📁 submodule - ┃ ┣━ 📁 isolated - ┃ ┃ ┣━ 🆕 isolated_Kwargs__no_runtime_type_checking.go - ┃ ┃ ┣━ 🆕 isolated_Kwargs__runtime_type_checks.go - ┃ ┃ ┗━ 📄 isolated_Kwargs.go.diff - ┃ ┣━ 🆕 submodule_MyClass__no_runtime_type_checking.go - ┃ ┣━ 🆕 submodule_MyClass__runtime_type_checks.go - ┃ ┗━ 📄 submodule_MyClass.go.diff - ┗━ 📁 union - ┣━ 🆕 union_ConsumesUnion__no_runtime_type_checking.go - ┣━ 🆕 union_ConsumesUnion__runtime_type_checks.go - ┗━ 📄 union_ConsumesUnion.go.diff -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/anonymous_UseOptions.go.diff 1`] = ` ---- go/jsiicalc/anonymous/anonymous_UseOptions.go --no-runtime-type-checking -+++ go/jsiicalc/anonymous/anonymous_UseOptions.go --runtime-type-checking -@@ -14,10 +14,13 @@ - } - - func UseOptions_Consume(option interface{}) *string { - _init_.Initialize() - -+ if err := validateUseOptions_ConsumeParameters(option); err != nil { -+ panic(err) -+ } - var returns *string - - _jsii_.StaticInvoke( - "jsii-calc.anonymous.UseOptions", - "consume", -@@ -29,10 +32,13 @@ - } - - func UseOptions_PrivideAsAny(which *string) interface{} { - _init_.Initialize() - -+ if err := validateUseOptions_PrivideAsAnyParameters(which); err != nil { -+ panic(err) -+ } - var returns interface{} - - _jsii_.StaticInvoke( - "jsii-calc.anonymous.UseOptions", - "privideAsAny", -@@ -44,10 +50,13 @@ - } - - func UseOptions_Provide(which *string) interface{} { - _init_.Initialize() - -+ if err := validateUseOptions_ProvideParameters(which); err != nil { -+ panic(err) -+ } - var returns interface{} - - _jsii_.StaticInvoke( - "jsii-calc.anonymous.UseOptions", - "provide", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/anonymous_UseOptions__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/anonymous/anonymous_UseOptions__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/anonymous/anonymous_UseOptions__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,18 @@ -+//go:build no_runtime_type_checking -+ -+package anonymous -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateUseOptions_ConsumeParameters(option interface{}) error { -+ return nil -+} -+ -+func validateUseOptions_PrivideAsAnyParameters(which *string) error { -+ return nil -+} -+ -+func validateUseOptions_ProvideParameters(which *string) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/anonymous_UseOptions__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/anonymous/anonymous_UseOptions__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/anonymous/anonymous_UseOptions__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,44 @@ -+//go:build !no_runtime_type_checking -+ -+package anonymous -+ -+import ( -+ "fmt" -+ -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" -+) -+ -+func validateUseOptions_ConsumeParameters(option interface{}) error { -+ if option == nil { -+ return fmt.Errorf("parameter option is required, but nil was provided") -+ } -+ switch option.(type) { -+ case IOptionA: -+ // ok -+ case IOptionB: -+ // ok -+ default: -+ if !_jsii_.IsAnonymousProxy(option) { -+ return fmt.Errorf("parameter option must be one of the allowed types: IOptionA, IOptionB; received %#v (a %T)", option, option) -+ } -+ } -+ -+ return nil -+} -+ -+func validateUseOptions_PrivideAsAnyParameters(which *string) error { -+ if which == nil { -+ return fmt.Errorf("parameter which is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -+func validateUseOptions_ProvideParameters(which *string) error { -+ if which == nil { -+ return fmt.Errorf("parameter which is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/cdk16625_Cdk16625.go.diff 1`] = ` ---- go/jsiicalc/cdk16625/cdk16625_Cdk16625.go --no-runtime-type-checking -+++ go/jsiicalc/cdk16625/cdk16625_Cdk16625.go --runtime-type-checking -@@ -36,10 +36,13 @@ - nil, // no parameters - ) - } - - func (c *jsiiProxy_Cdk16625) Unwrap(gen jsiicalc.IRandomNumberGenerator) *float64 { -+ if err := c.validateUnwrapParameters(gen); err != nil { -+ panic(err) -+ } - var returns *float64 - - _jsii_.Invoke( - c, - "unwrap", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/cdk16625_Cdk16625__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/cdk16625/cdk16625_Cdk16625__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/cdk16625/cdk16625_Cdk16625__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,10 @@ -+//go:build no_runtime_type_checking -+ -+package cdk16625 -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (c *jsiiProxy_Cdk16625) validateUnwrapParameters(gen jsiicalc.IRandomNumberGenerator) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/cdk16625_Cdk16625__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/cdk16625/cdk16625_Cdk16625__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/cdk16625/cdk16625_Cdk16625__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,18 @@ -+//go:build !no_runtime_type_checking -+ -+package cdk16625 -+ -+import ( -+ "fmt" -+ -+ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3" -+) -+ -+func (c *jsiiProxy_Cdk16625) validateUnwrapParameters(gen jsiicalc.IRandomNumberGenerator) error { -+ if gen == nil { -+ return fmt.Errorf("parameter gen is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/donotimport_UnimportedSubmoduleType.go.diff 1`] = ` ---- go/jsiicalc/cdk16625/donotimport/donotimport_UnimportedSubmoduleType.go --no-runtime-type-checking -+++ go/jsiicalc/cdk16625/donotimport/donotimport_UnimportedSubmoduleType.go --runtime-type-checking -@@ -29,10 +29,13 @@ - } - - func NewUnimportedSubmoduleType(value *float64) UnimportedSubmoduleType { - _init_.Initialize() - -+ if err := validateNewUnimportedSubmoduleTypeParameters(value); err != nil { -+ panic(err) -+ } - j := jsiiProxy_UnimportedSubmoduleType{} - - _jsii_.Create( - "jsii-calc.cdk16625.donotimport.UnimportedSubmoduleType", - []interface{}{value}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/donotimport_UnimportedSubmoduleType__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/cdk16625/donotimport/donotimport_UnimportedSubmoduleType__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/cdk16625/donotimport/donotimport_UnimportedSubmoduleType__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,10 @@ -+//go:build no_runtime_type_checking -+ -+package donotimport -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateNewUnimportedSubmoduleTypeParameters(value *float64) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/donotimport_UnimportedSubmoduleType__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/cdk16625/donotimport/donotimport_UnimportedSubmoduleType__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/cdk16625/donotimport/donotimport_UnimportedSubmoduleType__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,16 @@ -+//go:build !no_runtime_type_checking -+ -+package donotimport -+ -+import ( -+ "fmt" -+) -+ -+func validateNewUnimportedSubmoduleTypeParameters(value *float64) error { -+ if value == nil { -+ return fmt.Errorf("parameter value is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/cdk22369_AcceptsPath.go.diff 1`] = ` ---- go/jsiicalc/cdk22369/cdk22369_AcceptsPath.go --no-runtime-type-checking -+++ go/jsiicalc/cdk22369/cdk22369_AcceptsPath.go --runtime-type-checking -@@ -14,10 +14,13 @@ - } - - func NewAcceptsPath(props *AcceptsPathProps) AcceptsPath { - _init_.Initialize() - -+ if err := validateNewAcceptsPathParameters(props); err != nil { -+ panic(err) -+ } - j := jsiiProxy_AcceptsPath{} - - _jsii_.Create( - "jsii-calc.cdk22369.AcceptsPath", - []interface{}{props}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/cdk22369_AcceptsPath__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/cdk22369/cdk22369_AcceptsPath__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/cdk22369/cdk22369_AcceptsPath__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,10 @@ -+//go:build no_runtime_type_checking -+ -+package cdk22369 -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateNewAcceptsPathParameters(props *AcceptsPathProps) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/cdk22369_AcceptsPath__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/cdk22369/cdk22369_AcceptsPath__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/cdk22369/cdk22369_AcceptsPath__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,21 @@ -+//go:build !no_runtime_type_checking -+ -+package cdk22369 -+ -+import ( -+ "fmt" -+ -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" -+) -+ -+func validateNewAcceptsPathParameters(props *AcceptsPathProps) error { -+ if props == nil { -+ return fmt.Errorf("parameter props is required, but nil was provided") -+ } -+ if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { -+ return err -+ } -+ -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/composition_CompositeOperation.go.diff 1`] = ` ---- go/jsiicalc/composition/composition_CompositeOperation.go --no-runtime-type-checking -+++ go/jsiicalc/composition/composition_CompositeOperation.go --runtime-type-checking -@@ -97,26 +97,35 @@ - c, - ) - } - - func (j *jsiiProxy_CompositeOperation)SetDecorationPostfixes(val *[]*string) { -+ if err := j.validateSetDecorationPostfixesParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "decorationPostfixes", - val, - ) - } - - func (j *jsiiProxy_CompositeOperation)SetDecorationPrefixes(val *[]*string) { -+ if err := j.validateSetDecorationPrefixesParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "decorationPrefixes", - val, - ) - } - - func (j *jsiiProxy_CompositeOperation)SetStringStyle(val CompositeOperation_CompositionStringStyle) { -+ if err := j.validateSetStringStyleParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "stringStyle", - val, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/composition_CompositeOperation__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/composition/composition_CompositeOperation__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/composition/composition_CompositeOperation__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,18 @@ -+//go:build no_runtime_type_checking -+ -+package composition -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (j *jsiiProxy_CompositeOperation) validateSetDecorationPostfixesParameters(val *[]*string) error { -+ return nil -+} -+ -+func (j *jsiiProxy_CompositeOperation) validateSetDecorationPrefixesParameters(val *[]*string) error { -+ return nil -+} -+ -+func (j *jsiiProxy_CompositeOperation) validateSetStringStyleParameters(val CompositeOperation_CompositionStringStyle) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/composition_CompositeOperation__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/composition/composition_CompositeOperation__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/composition/composition_CompositeOperation__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,32 @@ -+//go:build !no_runtime_type_checking -+ -+package composition -+ -+import ( -+ "fmt" -+) -+ -+func (j *jsiiProxy_CompositeOperation) validateSetDecorationPostfixesParameters(val *[]*string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -+func (j *jsiiProxy_CompositeOperation) validateSetDecorationPrefixesParameters(val *[]*string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -+func (j *jsiiProxy_CompositeOperation) validateSetStringStyleParameters(val CompositeOperation_CompositionStringStyle) error { -+ if val == "" { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Base.go.diff 1`] = ` ---- go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Base.go --no-runtime-type-checking -+++ go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Base.go --runtime-type-checking -@@ -49,10 +49,13 @@ - b, - ) - } - - func (j *jsiiProxy_Base)SetProp(val *string) { -+ if err := j.validateSetPropParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "prop", - val, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Base__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Base__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Base__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,10 @@ -+//go:build no_runtime_type_checking -+ -+package derivedclasshasnoproperties -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (j *jsiiProxy_Base) validateSetPropParameters(val *string) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Base__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Base__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Base__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,16 @@ -+//go:build !no_runtime_type_checking -+ -+package derivedclasshasnoproperties -+ -+import ( -+ "fmt" -+) -+ -+func (j *jsiiProxy_Base) validateSetPropParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Derived.go.diff 1`] = ` ---- go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Derived.go --no-runtime-type-checking -+++ go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Derived.go --runtime-type-checking -@@ -50,10 +50,13 @@ - d, - ) - } - - func (j *jsiiProxy_Derived)SetProp(val *string) { -+ if err := j.validateSetPropParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "prop", - val, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Derived__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Derived__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Derived__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,10 @@ -+//go:build no_runtime_type_checking -+ -+package derivedclasshasnoproperties -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (j *jsiiProxy_Derived) validateSetPropParameters(val *string) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Derived__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Derived__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Derived__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,16 @@ -+//go:build !no_runtime_type_checking -+ -+package derivedclasshasnoproperties -+ -+import ( -+ "fmt" -+) -+ -+func (j *jsiiProxy_Derived) validateSetPropParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -`; +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/bar_Consumer.go.diff 1`] = ` ---- go/jsiicalc/homonymousforwardreferences/bar/bar_Consumer.go --no-runtime-type-checking -+++ go/jsiicalc/homonymousforwardreferences/bar/bar_Consumer.go --runtime-type-checking -@@ -14,10 +14,13 @@ - } - - func Consumer_Consume(props *ConsumerProps) *Homonymous { - _init_.Initialize() - -+ if err := validateConsumer_ConsumeParameters(props); err != nil { -+ panic(err) -+ } - var returns *Homonymous - - _jsii_.StaticInvoke( - "jsii-calc.homonymousForwardReferences.bar.Consumer", - "consume", -`; +func (r *jsiiProxy_Resolvable) Resolve() interface{} { + var returns interface{} -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/bar_Consumer__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/homonymousforwardreferences/bar/bar_Consumer__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/homonymousforwardreferences/bar/bar_Consumer__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,10 @@ -+//go:build no_runtime_type_checking -+ -+package bar -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateConsumer_ConsumeParameters(props *ConsumerProps) error { -+ return nil -+} -+ -`; + _jsii_.Invoke( + r, + "resolve", + nil, // no parameters + &returns, + ) -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/bar_Consumer__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/homonymousforwardreferences/bar/bar_Consumer__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/homonymousforwardreferences/bar/bar_Consumer__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,21 @@ -+//go:build !no_runtime_type_checking -+ -+package bar -+ -+import ( -+ "fmt" -+ -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" -+) -+ -+func validateConsumer_ConsumeParameters(props *ConsumerProps) error { -+ if props == nil { -+ return fmt.Errorf("parameter props is required, but nil was provided") -+ } -+ if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { -+ return err -+ } -+ -+ return nil -+} -+ -`; + return returns +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo_Consumer.go.diff 1`] = ` ---- go/jsiicalc/homonymousforwardreferences/foo/foo_Consumer.go --no-runtime-type-checking -+++ go/jsiicalc/homonymousforwardreferences/foo/foo_Consumer.go --runtime-type-checking -@@ -14,10 +14,13 @@ - } - - func Consumer_Consume(props *ConsumerProps) *Homonymous { - _init_.Initialize() - -+ if err := validateConsumer_ConsumeParameters(props); err != nil { -+ panic(err) -+ } - var returns *Homonymous - - _jsii_.StaticInvoke( - "jsii-calc.homonymousForwardReferences.foo.Consumer", - "consume", -`; -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo_Consumer__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/homonymousforwardreferences/foo/foo_Consumer__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/homonymousforwardreferences/foo/foo_Consumer__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,10 @@ -+//go:build no_runtime_type_checking -+ -+package foo -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateConsumer_ConsumeParameters(props *ConsumerProps) error { -+ return nil -+} -+ `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo_Consumer__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/homonymousforwardreferences/foo/foo_Consumer__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/homonymousforwardreferences/foo/foo_Consumer__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,21 @@ -+//go:build !no_runtime_type_checking -+ -+package foo -+ -+import ( -+ "fmt" -+ -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" -+) -+ -+func validateConsumer_ConsumeParameters(props *ConsumerProps) error { -+ if props == nil { -+ return fmt.Errorf("parameter props is required, but nil was provided") -+ } -+ if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { -+ return err -+ } -+ -+ return nil -+} -+ -`; +exports[`Generated code for "jsii-calc": /go/jsiicalc/union/main.go 1`] = ` +package union -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/jsii3656_OverrideMe.go.diff 1`] = ` ---- go/jsiicalc/jsii3656/jsii3656_OverrideMe.go --no-runtime-type-checking -+++ go/jsiicalc/jsii3656/jsii3656_OverrideMe.go --runtime-type-checking -@@ -25,10 +25,13 @@ - } - - func OverrideMe_CallAbstract(receiver OverrideMe) *bool { - _init_.Initialize() - -+ if err := validateOverrideMe_CallAbstractParameters(receiver); err != nil { -+ panic(err) -+ } - var returns *bool - - _jsii_.StaticInvoke( - "jsii-calc.jsii3656.OverrideMe", - "callAbstract", -@@ -38,10 +41,13 @@ - - return returns - } - - func (o *jsiiProxy_OverrideMe) ImplementMe(opts *ImplementMeOpts) *bool { -+ if err := o.validateImplementMeParameters(opts); err != nil { -+ panic(err) -+ } - var returns *bool - - _jsii_.Invoke( - o, - "implementMe", -`; +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "jsii-calc.union.ConsumesUnion", + reflect.TypeOf((*ConsumesUnion)(nil)).Elem(), + nil, // no members + func() interface{} { + return &jsiiProxy_ConsumesUnion{} + }, + ) + _jsii_.RegisterInterface( + "jsii-calc.union.IResolvable", + reflect.TypeOf((*IResolvable)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "resolve", GoMethod: "Resolve"}, + }, + func() interface{} { + return &jsiiProxy_IResolvable{} + }, + ) + _jsii_.RegisterClass( + "jsii-calc.union.Resolvable", + reflect.TypeOf((*Resolvable)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "resolve", GoMethod: "Resolve"}, + }, + func() interface{} { + j := jsiiProxy_Resolvable{} + _jsii_.InitJsiiProxy(&j.jsiiProxy_IResolvable) + return &j + }, + ) +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/jsii3656_OverrideMe__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsii3656/jsii3656_OverrideMe__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsii3656/jsii3656_OverrideMe__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,14 @@ -+//go:build no_runtime_type_checking -+ -+package jsii3656 -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (o *jsiiProxy_OverrideMe) validateImplementMeParameters(opts *ImplementMeOpts) error { -+ return nil -+} -+ -+func validateOverrideMe_CallAbstractParameters(receiver OverrideMe) error { -+ return nil -+} -+ `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/jsii3656_OverrideMe__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsii3656/jsii3656_OverrideMe__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsii3656/jsii3656_OverrideMe__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,29 @@ -+//go:build !no_runtime_type_checking -+ -+package jsii3656 -+ -+import ( -+ "fmt" -+ -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" -+) -+ -+func (o *jsiiProxy_OverrideMe) validateImplementMeParameters(opts *ImplementMeOpts) error { -+ if opts == nil { -+ return fmt.Errorf("parameter opts is required, but nil was provided") -+ } -+ if err := _jsii_.ValidateStruct(opts, func() string { return "parameter opts" }); err != nil { -+ return err -+ } -+ -+ return nil -+} -+ -+func validateOverrideMe_CallAbstractParameters(receiver OverrideMe) error { -+ if receiver == nil { -+ return fmt.Errorf("parameter receiver is required, but nil was provided") -+ } -+ -+ return nil -+} -+ +exports[`Generated code for "jsii-calc": /go/jsiicalc/version 1`] = ` +3.20.120 + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AbstractClass.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AbstractClass.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AbstractClass.go --runtime-type-checking +exports[`Generated code for "jsii-calc": / 1`] = ` + + ┗━ 📁 go + ┗━ 📁 jsiicalc + ┣━ 🆕 AbstractClass__checks.go + ┣━ 🆕 AbstractClass__no_checks.go + ┣━ 📄 AbstractClass.go.diff + ┣━ 🆕 AbstractSuite__checks.go + ┣━ 🆕 AbstractSuite__no_checks.go + ┣━ 📄 AbstractSuite.go.diff + ┣━ 🆕 Add__checks.go + ┣━ 🆕 Add__no_checks.go + ┣━ 📄 Add.go.diff + ┣━ 🆕 AllowedMethodNames__checks.go + ┣━ 🆕 AllowedMethodNames__no_checks.go + ┣━ 📄 AllowedMethodNames.go.diff + ┣━ 🆕 AllTypes__checks.go + ┣━ 🆕 AllTypes__no_checks.go + ┣━ 📄 AllTypes.go.diff + ┣━ 🆕 AmbiguousParameters__checks.go + ┣━ 🆕 AmbiguousParameters__no_checks.go + ┣━ 📄 AmbiguousParameters.go.diff + ┣━ 📁 anonymous + ┃ ┣━ 🆕 UseOptions__checks.go + ┃ ┣━ 🆕 UseOptions__no_checks.go + ┃ ┗━ 📄 UseOptions.go.diff + ┣━ 🆕 AsyncVirtualMethods__checks.go + ┣━ 🆕 AsyncVirtualMethods__no_checks.go + ┣━ 📄 AsyncVirtualMethods.go.diff + ┣━ 🆕 Bell__checks.go + ┣━ 🆕 Bell__no_checks.go + ┣━ 📄 Bell.go.diff + ┣━ 🆕 BinaryOperation__checks.go + ┣━ 🆕 BinaryOperation__no_checks.go + ┣━ 🆕 BurriedAnonymousObject__checks.go + ┣━ 🆕 BurriedAnonymousObject__no_checks.go + ┣━ 📄 BurriedAnonymousObject.go.diff + ┣━ 🆕 Calculator__checks.go + ┣━ 🆕 Calculator__no_checks.go + ┣━ 📄 Calculator.go.diff + ┣━ 📁 cdk16625 + ┃ ┣━ 🆕 Cdk16625__checks.go + ┃ ┣━ 🆕 Cdk16625__no_checks.go + ┃ ┣━ 📄 Cdk16625.go.diff + ┃ ┗━ 📁 donotimport + ┃ ┣━ 🆕 UnimportedSubmoduleType__checks.go + ┃ ┣━ 🆕 UnimportedSubmoduleType__no_checks.go + ┃ ┗━ 📄 UnimportedSubmoduleType.go.diff + ┣━ 📁 cdk22369 + ┃ ┣━ 🆕 AcceptsPath__checks.go + ┃ ┣━ 🆕 AcceptsPath__no_checks.go + ┃ ┗━ 📄 AcceptsPath.go.diff + ┣━ 🆕 ClassThatImplementsTheInternalInterface__checks.go + ┣━ 🆕 ClassThatImplementsTheInternalInterface__no_checks.go + ┣━ 📄 ClassThatImplementsTheInternalInterface.go.diff + ┣━ 🆕 ClassThatImplementsThePrivateInterface__checks.go + ┣━ 🆕 ClassThatImplementsThePrivateInterface__no_checks.go + ┣━ 📄 ClassThatImplementsThePrivateInterface.go.diff + ┣━ 🆕 ClassWithCollectionOfUnions__checks.go + ┣━ 🆕 ClassWithCollectionOfUnions__no_checks.go + ┣━ 📄 ClassWithCollectionOfUnions.go.diff + ┣━ 🆕 ClassWithCollections__checks.go + ┣━ 🆕 ClassWithCollections__no_checks.go + ┣━ 📄 ClassWithCollections.go.diff + ┣━ 🆕 ClassWithContainerTypes__checks.go + ┣━ 🆕 ClassWithContainerTypes__no_checks.go + ┣━ 📄 ClassWithContainerTypes.go.diff + ┣━ 🆕 ClassWithJavaReservedWords__checks.go + ┣━ 🆕 ClassWithJavaReservedWords__no_checks.go + ┣━ 📄 ClassWithJavaReservedWords.go.diff + ┣━ 🆕 ClassWithMutableObjectLiteralProperty__checks.go + ┣━ 🆕 ClassWithMutableObjectLiteralProperty__no_checks.go + ┣━ 📄 ClassWithMutableObjectLiteralProperty.go.diff + ┣━ 🆕 ClassWithNestedUnion__checks.go + ┣━ 🆕 ClassWithNestedUnion__no_checks.go + ┣━ 📄 ClassWithNestedUnion.go.diff + ┣━ 🆕 ClassWithPrivateConstructorAndAutomaticProperties__checks.go + ┣━ 🆕 ClassWithPrivateConstructorAndAutomaticProperties__no_checks.go + ┣━ 📄 ClassWithPrivateConstructorAndAutomaticProperties.go.diff + ┣━ 📁 composition + ┃ ┣━ 🆕 CompositeOperation__checks.go + ┃ ┣━ 🆕 CompositeOperation__no_checks.go + ┃ ┗━ 📄 CompositeOperation.go.diff + ┣━ 🆕 ConfusingToJackson__checks.go + ┣━ 🆕 ConfusingToJackson__no_checks.go + ┣━ 📄 ConfusingToJackson.go.diff + ┣━ 🆕 ConstructorPassesThisOut__checks.go + ┣━ 🆕 ConstructorPassesThisOut__no_checks.go + ┣━ 📄 ConstructorPassesThisOut.go.diff + ┣━ 🆕 ConsumePureInterface__checks.go + ┣━ 🆕 ConsumePureInterface__no_checks.go + ┣━ 📄 ConsumePureInterface.go.diff + ┣━ 🆕 ConsumerCanRingBell__checks.go + ┣━ 🆕 ConsumerCanRingBell__no_checks.go + ┣━ 📄 ConsumerCanRingBell.go.diff + ┣━ 🆕 ConsumersOfThisCrazyTypeSystem__checks.go + ┣━ 🆕 ConsumersOfThisCrazyTypeSystem__no_checks.go + ┣━ 📄 ConsumersOfThisCrazyTypeSystem.go.diff + ┣━ 🆕 DataRenderer__checks.go + ┣━ 🆕 DataRenderer__no_checks.go + ┣━ 📄 DataRenderer.go.diff + ┣━ 🆕 DeprecatedClass__checks.go + ┣━ 🆕 DeprecatedClass__no_checks.go + ┣━ 📄 DeprecatedClass.go.diff + ┣━ 📁 derivedclasshasnoproperties + ┃ ┣━ 🆕 Base__checks.go + ┃ ┣━ 🆕 Base__no_checks.go + ┃ ┣━ 📄 Base.go.diff + ┃ ┣━ 🆕 Derived__checks.go + ┃ ┣━ 🆕 Derived__no_checks.go + ┃ ┗━ 📄 Derived.go.diff + ┣━ 🆕 DocumentedClass__checks.go + ┣━ 🆕 DocumentedClass__no_checks.go + ┣━ 📄 DocumentedClass.go.diff + ┣━ 🆕 DoNotOverridePrivates__checks.go + ┣━ 🆕 DoNotOverridePrivates__no_checks.go + ┣━ 📄 DoNotOverridePrivates.go.diff + ┣━ 🆕 DoNotRecognizeAnyAsOptional__checks.go + ┣━ 🆕 DoNotRecognizeAnyAsOptional__no_checks.go + ┣━ 📄 DoNotRecognizeAnyAsOptional.go.diff + ┣━ 🆕 DynamicPropertyBearer__checks.go + ┣━ 🆕 DynamicPropertyBearer__no_checks.go + ┣━ 📄 DynamicPropertyBearer.go.diff + ┣━ 🆕 DynamicPropertyBearerChild__checks.go + ┣━ 🆕 DynamicPropertyBearerChild__no_checks.go + ┣━ 📄 DynamicPropertyBearerChild.go.diff + ┣━ 🆕 Entropy__checks.go + ┣━ 🆕 Entropy__no_checks.go + ┣━ 📄 Entropy.go.diff + ┣━ 🆕 EraseUndefinedHashValues__checks.go + ┣━ 🆕 EraseUndefinedHashValues__no_checks.go + ┣━ 📄 EraseUndefinedHashValues.go.diff + ┣━ 🆕 ExperimentalClass__checks.go + ┣━ 🆕 ExperimentalClass__no_checks.go + ┣━ 📄 ExperimentalClass.go.diff + ┣━ 🆕 ExportedBaseClass__checks.go + ┣━ 🆕 ExportedBaseClass__no_checks.go + ┣━ 📄 ExportedBaseClass.go.diff + ┣━ 🆕 ExternalClass__checks.go + ┣━ 🆕 ExternalClass__no_checks.go + ┣━ 📄 ExternalClass.go.diff + ┣━ 🆕 GiveMeStructs__checks.go + ┣━ 🆕 GiveMeStructs__no_checks.go + ┣━ 📄 GiveMeStructs.go.diff + ┣━ 🆕 GreetingAugmenter__checks.go + ┣━ 🆕 GreetingAugmenter__no_checks.go + ┣━ 📄 GreetingAugmenter.go.diff + ┣━ 📁 homonymousforwardreferences + ┃ ┣━ 📁 bar + ┃ ┃ ┣━ 🆕 Consumer__checks.go + ┃ ┃ ┣━ 🆕 Consumer__no_checks.go + ┃ ┃ ┗━ 📄 Consumer.go.diff + ┃ ┗━ 📁 foo + ┃ ┣━ 🆕 Consumer__checks.go + ┃ ┣━ 🆕 Consumer__no_checks.go + ┃ ┗━ 📄 Consumer.go.diff + ┣━ 🆕 IAnotherPublicInterface__checks.go + ┣━ 🆕 IAnotherPublicInterface__no_checks.go + ┣━ 📄 IAnotherPublicInterface.go.diff + ┣━ 🆕 IBellRinger__checks.go + ┣━ 🆕 IBellRinger__no_checks.go + ┣━ 📄 IBellRinger.go.diff + ┣━ 🆕 IConcreteBellRinger__checks.go + ┣━ 🆕 IConcreteBellRinger__no_checks.go + ┣━ 📄 IConcreteBellRinger.go.diff + ┣━ 🆕 IExtendsPrivateInterface__checks.go + ┣━ 🆕 IExtendsPrivateInterface__no_checks.go + ┣━ 📄 IExtendsPrivateInterface.go.diff + ┣━ 🆕 IInterfaceWithOptionalMethodArguments__checks.go + ┣━ 🆕 IInterfaceWithOptionalMethodArguments__no_checks.go + ┣━ 📄 IInterfaceWithOptionalMethodArguments.go.diff + ┣━ 🆕 IInterfaceWithProperties__checks.go + ┣━ 🆕 IInterfaceWithProperties__no_checks.go + ┣━ 📄 IInterfaceWithProperties.go.diff + ┣━ 🆕 IInterfaceWithPropertiesExtension__checks.go + ┣━ 🆕 IInterfaceWithPropertiesExtension__no_checks.go + ┣━ 📄 IInterfaceWithPropertiesExtension.go.diff + ┣━ 🆕 ImplementInternalInterface__checks.go + ┣━ 🆕 ImplementInternalInterface__no_checks.go + ┣━ 📄 ImplementInternalInterface.go.diff + ┣━ 🆕 ImplementsPrivateInterface__checks.go + ┣━ 🆕 ImplementsPrivateInterface__no_checks.go + ┣━ 📄 ImplementsPrivateInterface.go.diff + ┣━ 🆕 IMutableObjectLiteral__checks.go + ┣━ 🆕 IMutableObjectLiteral__no_checks.go + ┣━ 📄 IMutableObjectLiteral.go.diff + ┣━ 🆕 INonInternalInterface__checks.go + ┣━ 🆕 INonInternalInterface__no_checks.go + ┣━ 📄 INonInternalInterface.go.diff + ┣━ 🆕 InterfacesMaker__checks.go + ┣━ 🆕 InterfacesMaker__no_checks.go + ┣━ 📄 InterfacesMaker.go.diff + ┣━ 🆕 IObjectWithProperty__checks.go + ┣━ 🆕 IObjectWithProperty__no_checks.go + ┣━ 📄 IObjectWithProperty.go.diff + ┣━ 🆕 JavaReservedWords__checks.go + ┣━ 🆕 JavaReservedWords__no_checks.go + ┣━ 📄 JavaReservedWords.go.diff + ┣━ 📁 jsii3656 + ┃ ┣━ 🆕 OverrideMe__checks.go + ┃ ┣━ 🆕 OverrideMe__no_checks.go + ┃ ┗━ 📄 OverrideMe.go.diff + ┣━ 🆕 JSII417Derived__checks.go + ┣━ 🆕 JSII417Derived__no_checks.go + ┣━ 📄 JSII417Derived.go.diff + ┣━ 🆕 JSObjectLiteralToNativeClass__checks.go + ┣━ 🆕 JSObjectLiteralToNativeClass__no_checks.go + ┣━ 📄 JSObjectLiteralToNativeClass.go.diff + ┣━ 🆕 LevelOne__checks.go + ┣━ 🆕 LevelOne__no_checks.go + ┣━ 📄 LevelOne.go.diff + ┣━ 📁 module2530 + ┃ ┣━ 🆕 MyClass__checks.go + ┃ ┣━ 🆕 MyClass__no_checks.go + ┃ ┗━ 📄 MyClass.go.diff + ┣━ 📁 module2647 + ┃ ┣━ 🆕 ExtendAndImplement__checks.go + ┃ ┣━ 🆕 ExtendAndImplement__no_checks.go + ┃ ┗━ 📄 ExtendAndImplement.go.diff + ┣━ 📁 module2689 + ┃ ┗━ 📁 methods + ┃ ┣━ 🆕 MyClass__checks.go + ┃ ┣━ 🆕 MyClass__no_checks.go + ┃ ┗━ 📄 MyClass.go.diff + ┣━ 🆕 Multiply__checks.go + ┣━ 🆕 Multiply__no_checks.go + ┣━ 📄 Multiply.go.diff + ┣━ 🆕 Negate__checks.go + ┣━ 🆕 Negate__no_checks.go + ┣━ 📄 Negate.go.diff + ┣━ 🆕 NullShouldBeTreatedAsUndefined__checks.go + ┣━ 🆕 NullShouldBeTreatedAsUndefined__no_checks.go + ┣━ 📄 NullShouldBeTreatedAsUndefined.go.diff + ┣━ 🆕 NumberGenerator__checks.go + ┣━ 🆕 NumberGenerator__no_checks.go + ┣━ 📄 NumberGenerator.go.diff + ┣━ 🆕 ObjectRefsInCollections__checks.go + ┣━ 🆕 ObjectRefsInCollections__no_checks.go + ┣━ 📄 ObjectRefsInCollections.go.diff + ┣━ 🆕 OptionalArgumentInvoker__checks.go + ┣━ 🆕 OptionalArgumentInvoker__no_checks.go + ┣━ 📄 OptionalArgumentInvoker.go.diff + ┣━ 🆕 OptionalConstructorArgument__checks.go + ┣━ 🆕 OptionalConstructorArgument__no_checks.go + ┣━ 📄 OptionalConstructorArgument.go.diff + ┣━ 🆕 OptionalStructConsumer__checks.go + ┣━ 🆕 OptionalStructConsumer__no_checks.go + ┣━ 📄 OptionalStructConsumer.go.diff + ┣━ 🆕 OverridableProtectedMember__checks.go + ┣━ 🆕 OverridableProtectedMember__no_checks.go + ┣━ 📄 OverridableProtectedMember.go.diff + ┣━ 🆕 OverrideReturnsObject__checks.go + ┣━ 🆕 OverrideReturnsObject__no_checks.go + ┣━ 📄 OverrideReturnsObject.go.diff + ┣━ 🆕 ParamShadowsBuiltins__checks.go + ┣━ 🆕 ParamShadowsBuiltins__no_checks.go + ┣━ 📄 ParamShadowsBuiltins.go.diff + ┣━ 🆕 ParamShadowsScope__checks.go + ┣━ 🆕 ParamShadowsScope__no_checks.go + ┣━ 📄 ParamShadowsScope.go.diff + ┣━ 🆕 PartiallyInitializedThisConsumer__checks.go + ┣━ 🆕 PartiallyInitializedThisConsumer__no_checks.go + ┣━ 📄 PartiallyInitializedThisConsumer.go.diff + ┣━ 🆕 Polymorphism__checks.go + ┣━ 🆕 Polymorphism__no_checks.go + ┣━ 📄 Polymorphism.go.diff + ┣━ 🆕 Power__checks.go + ┣━ 🆕 Power__no_checks.go + ┣━ 📄 Power.go.diff + ┣━ 📁 pythonself + ┃ ┣━ 🆕 ClassWithSelf__checks.go + ┃ ┣━ 🆕 ClassWithSelf__no_checks.go + ┃ ┣━ 📄 ClassWithSelf.go.diff + ┃ ┣━ 🆕 ClassWithSelfKwarg__checks.go + ┃ ┣━ 🆕 ClassWithSelfKwarg__no_checks.go + ┃ ┣━ 📄 ClassWithSelfKwarg.go.diff + ┃ ┣━ 🆕 IInterfaceWithSelf__checks.go + ┃ ┣━ 🆕 IInterfaceWithSelf__no_checks.go + ┃ ┗━ 📄 IInterfaceWithSelf.go.diff + ┣━ 🆕 ReferenceEnumFromScopedPackage__checks.go + ┣━ 🆕 ReferenceEnumFromScopedPackage__no_checks.go + ┣━ 📄 ReferenceEnumFromScopedPackage.go.diff + ┣━ 🆕 RootStructValidator__checks.go + ┣━ 🆕 RootStructValidator__no_checks.go + ┣━ 📄 RootStructValidator.go.diff + ┣━ 🆕 RuntimeTypeChecking__checks.go + ┣━ 🆕 RuntimeTypeChecking__no_checks.go + ┣━ 📄 RuntimeTypeChecking.go.diff + ┣━ 🆕 SingletonInt__checks.go + ┣━ 🆕 SingletonInt__no_checks.go + ┣━ 📄 SingletonInt.go.diff + ┣━ 🆕 SingletonString__checks.go + ┣━ 🆕 SingletonString__no_checks.go + ┣━ 📄 SingletonString.go.diff + ┣━ 🆕 StableClass__checks.go + ┣━ 🆕 StableClass__no_checks.go + ┣━ 📄 StableClass.go.diff + ┣━ 🆕 StaticContext__checks.go + ┣━ 🆕 StaticContext__no_checks.go + ┣━ 📄 StaticContext.go.diff + ┣━ 🆕 Statics__checks.go + ┣━ 🆕 Statics__no_checks.go + ┣━ 📄 Statics.go.diff + ┣━ 🆕 StripInternal__checks.go + ┣━ 🆕 StripInternal__no_checks.go + ┣━ 📄 StripInternal.go.diff + ┣━ 🆕 StructPassing__checks.go + ┣━ 🆕 StructPassing__no_checks.go + ┣━ 📄 StructPassing.go.diff + ┣━ 🆕 StructUnionConsumer__checks.go + ┣━ 🆕 StructUnionConsumer__no_checks.go + ┣━ 📄 StructUnionConsumer.go.diff + ┣━ 📁 submodule + ┃ ┣━ 📁 isolated + ┃ ┃ ┣━ 🆕 Kwargs__checks.go + ┃ ┃ ┣━ 🆕 Kwargs__no_checks.go + ┃ ┃ ┗━ 📄 Kwargs.go.diff + ┃ ┣━ 🆕 MyClass__checks.go + ┃ ┣━ 🆕 MyClass__no_checks.go + ┃ ┗━ 📄 MyClass.go.diff + ┣━ 🆕 Sum__checks.go + ┣━ 🆕 Sum__no_checks.go + ┣━ 📄 Sum.go.diff + ┣━ 🆕 SupportsNiceJavaBuilder__checks.go + ┣━ 🆕 SupportsNiceJavaBuilder__no_checks.go + ┣━ 📄 SupportsNiceJavaBuilder.go.diff + ┣━ 🆕 SupportsNiceJavaBuilderWithRequiredProps__checks.go + ┣━ 🆕 SupportsNiceJavaBuilderWithRequiredProps__no_checks.go + ┣━ 📄 SupportsNiceJavaBuilderWithRequiredProps.go.diff + ┣━ 🆕 SyncVirtualMethods__checks.go + ┣━ 🆕 SyncVirtualMethods__no_checks.go + ┣━ 📄 SyncVirtualMethods.go.diff + ┣━ 🆕 TestStructWithEnum__checks.go + ┣━ 🆕 TestStructWithEnum__no_checks.go + ┣━ 📄 TestStructWithEnum.go.diff + ┣━ 🆕 UnaryOperation__checks.go + ┣━ 🆕 UnaryOperation__no_checks.go + ┣━ 📁 union + ┃ ┣━ 🆕 ConsumesUnion__checks.go + ┃ ┣━ 🆕 ConsumesUnion__no_checks.go + ┃ ┗━ 📄 ConsumesUnion.go.diff + ┣━ 🆕 UpcasingReflectable__checks.go + ┣━ 🆕 UpcasingReflectable__no_checks.go + ┣━ 📄 UpcasingReflectable.go.diff + ┣━ 🆕 UsesInterfaceWithProperties__checks.go + ┣━ 🆕 UsesInterfaceWithProperties__no_checks.go + ┣━ 📄 UsesInterfaceWithProperties.go.diff + ┣━ 🆕 VariadicInvoker__checks.go + ┣━ 🆕 VariadicInvoker__no_checks.go + ┣━ 📄 VariadicInvoker.go.diff + ┣━ 🆕 VariadicMethod__checks.go + ┣━ 🆕 VariadicMethod__no_checks.go + ┣━ 📄 VariadicMethod.go.diff + ┣━ 🆕 VariadicTypeUnion__checks.go + ┣━ 🆕 VariadicTypeUnion__no_checks.go + ┣━ 📄 VariadicTypeUnion.go.diff + ┣━ 🆕 VirtualMethodPlayground__checks.go + ┣━ 🆕 VirtualMethodPlayground__no_checks.go + ┗━ 📄 VirtualMethodPlayground.go.diff +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/AbstractClass.go.diff 1`] = ` +--- go/jsiicalc/AbstractClass.go --no-runtime-type-checking ++++ go/jsiicalc/AbstractClass.go --runtime-type-checking @@ -51,10 +51,13 @@ a, ) @@ -26010,49 +25280,49 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j "abstractMethod", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AbstractClass__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AbstractClass__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AbstractClass__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/AbstractClass__checks.go.diff 1`] = ` +--- go/jsiicalc/AbstractClass__checks.go --no-runtime-type-checking ++++ go/jsiicalc/AbstractClass__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) + +func (a *jsiiProxy_AbstractClass) validateAbstractMethodParameters(name *string) error { ++ if name == nil { ++ return fmt.Errorf("parameter name is required, but nil was provided") ++ } ++ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AbstractClass__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AbstractClass__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AbstractClass__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/AbstractClass__no_checks.go.diff 1`] = ` +--- go/jsiicalc/AbstractClass__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/AbstractClass__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+import ( -+ "fmt" -+) ++// Building without runtime type checking enabled, so all the below just return nil + +func (a *jsiiProxy_AbstractClass) validateAbstractMethodParameters(name *string) error { -+ if name == nil { -+ return fmt.Errorf("parameter name is required, but nil was provided") -+ } -+ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AbstractSuite.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AbstractSuite.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AbstractSuite.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/AbstractSuite.go.diff 1`] = ` +--- go/jsiicalc/AbstractSuite.go --no-runtime-type-checking ++++ go/jsiicalc/AbstractSuite.go --runtime-type-checking @@ -40,18 +40,24 @@ a, ) @@ -26094,73 +25364,73 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j "workItAll", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AbstractSuite__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AbstractSuite__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AbstractSuite__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,19 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/AbstractSuite__checks.go.diff 1`] = ` +--- go/jsiicalc/AbstractSuite__checks.go --no-runtime-type-checking ++++ go/jsiicalc/AbstractSuite__checks.go --runtime-type-checking +@@ -0,0 +1,33 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) + +func (a *jsiiProxy_AbstractSuite) validateSomeMethodParameters(str *string) error { ++ if str == nil { ++ return fmt.Errorf("parameter str is required, but nil was provided") ++ } ++ + return nil +} + +func (a *jsiiProxy_AbstractSuite) validateWorkItAllParameters(seed *string) error { ++ if seed == nil { ++ return fmt.Errorf("parameter seed is required, but nil was provided") ++ } ++ + return nil +} + +func (j *jsiiProxy_AbstractSuite) validateSetPropertyParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AbstractSuite__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AbstractSuite__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AbstractSuite__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,33 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/AbstractSuite__no_checks.go.diff 1`] = ` +--- go/jsiicalc/AbstractSuite__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/AbstractSuite__no_checks.go --runtime-type-checking +@@ -0,0 +1,19 @@ ++//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+import ( -+ "fmt" -+) ++// Building without runtime type checking enabled, so all the below just return nil + +func (a *jsiiProxy_AbstractSuite) validateSomeMethodParameters(str *string) error { -+ if str == nil { -+ return fmt.Errorf("parameter str is required, but nil was provided") -+ } -+ + return nil +} + +func (a *jsiiProxy_AbstractSuite) validateWorkItAllParameters(seed *string) error { -+ if seed == nil { -+ return fmt.Errorf("parameter seed is required, but nil was provided") -+ } -+ + return nil +} + +func (j *jsiiProxy_AbstractSuite) validateSetPropertyParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } -+ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Add.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Add.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Add.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/Add.go.diff 1`] = ` +--- go/jsiicalc/Add.go --no-runtime-type-checking ++++ go/jsiicalc/Add.go --runtime-type-checking @@ -63,10 +63,13 @@ // Creates a BinaryOperation. @@ -26177,26 +25447,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j []interface{}{lhs, rhs}, `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Add__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Add__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Add__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateNewAddParameters(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Add__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Add__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Add__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/Add__checks.go.diff 1`] = ` +--- go/jsiicalc/Add__checks.go --no-runtime-type-checking ++++ go/jsiicalc/Add__checks.go --runtime-type-checking @@ -0,0 +1,23 @@ +//go:build !no_runtime_type_checking + @@ -26223,9 +25476,26 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AllTypes.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AllTypes.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AllTypes.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/Add__no_checks.go.diff 1`] = ` +--- go/jsiicalc/Add__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/Add__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateNewAddParameters(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/AllTypes.go.diff 1`] = ` +--- go/jsiicalc/AllTypes.go --no-runtime-type-checking ++++ go/jsiicalc/AllTypes.go --runtime-type-checking @@ -276,82 +276,112 @@ a, ) @@ -26446,98 +25716,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j "enumMethod", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AllTypes__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AllTypes__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AllTypes__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,83 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (a *jsiiProxy_AllTypes) validateAnyInParameters(inp interface{}) error { -+ return nil -+} -+ -+func (a *jsiiProxy_AllTypes) validateEnumMethodParameters(value StringEnum) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetAnyArrayPropertyParameters(val *[]interface{}) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetAnyMapPropertyParameters(val *map[string]interface{}) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetAnyPropertyParameters(val interface{}) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetArrayPropertyParameters(val *[]*string) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetBooleanPropertyParameters(val *bool) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetDatePropertyParameters(val *time.Time) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetEnumPropertyParameters(val AllTypesEnum) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetJsonPropertyParameters(val *map[string]interface{}) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetMapPropertyParameters(val *map[string]scopejsiicalclib.Number) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetNumberPropertyParameters(val *float64) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetStringPropertyParameters(val *string) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetUnionArrayPropertyParameters(val *[]interface{}) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetUnionMapPropertyParameters(val *map[string]interface{}) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetUnionPropertyParameters(val interface{}) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetUnknownArrayPropertyParameters(val *[]interface{}) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetUnknownMapPropertyParameters(val *map[string]interface{}) error { -+ return nil -+} -+ -+func (j *jsiiProxy_AllTypes) validateSetUnknownPropertyParameters(val interface{}) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AllTypes__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AllTypes__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AllTypes__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/AllTypes__checks.go.diff 1`] = ` +--- go/jsiicalc/AllTypes__checks.go --no-runtime-type-checking ++++ go/jsiicalc/AllTypes__checks.go --runtime-type-checking @@ -0,0 +1,336 @@ +//go:build !no_runtime_type_checking + @@ -26877,9 +26058,98 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AllowedMethodNames.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AllowedMethodNames.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AllowedMethodNames.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/AllTypes__no_checks.go.diff 1`] = ` +--- go/jsiicalc/AllTypes__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/AllTypes__no_checks.go --runtime-type-checking +@@ -0,0 +1,83 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (a *jsiiProxy_AllTypes) validateAnyInParameters(inp interface{}) error { ++ return nil ++} ++ ++func (a *jsiiProxy_AllTypes) validateEnumMethodParameters(value StringEnum) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetAnyArrayPropertyParameters(val *[]interface{}) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetAnyMapPropertyParameters(val *map[string]interface{}) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetAnyPropertyParameters(val interface{}) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetArrayPropertyParameters(val *[]*string) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetBooleanPropertyParameters(val *bool) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetDatePropertyParameters(val *time.Time) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetEnumPropertyParameters(val AllTypesEnum) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetJsonPropertyParameters(val *map[string]interface{}) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetMapPropertyParameters(val *map[string]scopejsiicalclib.Number) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetNumberPropertyParameters(val *float64) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetStringPropertyParameters(val *string) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetUnionArrayPropertyParameters(val *[]interface{}) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetUnionMapPropertyParameters(val *map[string]interface{}) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetUnionPropertyParameters(val interface{}) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetUnknownArrayPropertyParameters(val *[]interface{}) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetUnknownMapPropertyParameters(val *map[string]interface{}) error { ++ return nil ++} ++ ++func (j *jsiiProxy_AllTypes) validateSetUnknownPropertyParameters(val interface{}) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/AllowedMethodNames.go.diff 1`] = ` +--- go/jsiicalc/AllowedMethodNames.go --no-runtime-type-checking ++++ go/jsiicalc/AllowedMethodNames.go --runtime-type-checking @@ -43,18 +43,24 @@ a, ) @@ -26932,38 +26202,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AllowedMethodNames__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AllowedMethodNames__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AllowedMethodNames__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,23 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (a *jsiiProxy_AllowedMethodNames) validateGetBarParameters(_p1 *string, _p2 *float64) error { -+ return nil -+} -+ -+func (a *jsiiProxy_AllowedMethodNames) validateGetFooParameters(withParam *string) error { -+ return nil -+} -+ -+func (a *jsiiProxy_AllowedMethodNames) validateSetBarParameters(_x *string, _y *float64, _z *bool) error { -+ return nil -+} -+ -+func (a *jsiiProxy_AllowedMethodNames) validateSetFooParameters(_x *string, _y *float64) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AllowedMethodNames__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AllowedMethodNames__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AllowedMethodNames__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/AllowedMethodNames__checks.go.diff 1`] = ` +--- go/jsiicalc/AllowedMethodNames__checks.go --no-runtime-type-checking ++++ go/jsiicalc/AllowedMethodNames__checks.go --runtime-type-checking @@ -0,0 +1,57 @@ +//go:build !no_runtime_type_checking + @@ -27024,9 +26265,38 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AmbiguousParameters.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AmbiguousParameters.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AmbiguousParameters.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/AllowedMethodNames__no_checks.go.diff 1`] = ` +--- go/jsiicalc/AllowedMethodNames__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/AllowedMethodNames__no_checks.go --runtime-type-checking +@@ -0,0 +1,23 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (a *jsiiProxy_AllowedMethodNames) validateGetBarParameters(_p1 *string, _p2 *float64) error { ++ return nil ++} ++ ++func (a *jsiiProxy_AllowedMethodNames) validateGetFooParameters(withParam *string) error { ++ return nil ++} ++ ++func (a *jsiiProxy_AllowedMethodNames) validateSetBarParameters(_x *string, _y *float64, _z *bool) error { ++ return nil ++} ++ ++func (a *jsiiProxy_AllowedMethodNames) validateSetFooParameters(_x *string, _y *float64) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/AmbiguousParameters.go.diff 1`] = ` +--- go/jsiicalc/AmbiguousParameters.go --no-runtime-type-checking ++++ go/jsiicalc/AmbiguousParameters.go --runtime-type-checking @@ -38,10 +38,13 @@ @@ -27043,26 +26313,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j []interface{}{scope, props}, `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AmbiguousParameters__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AmbiguousParameters__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AmbiguousParameters__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateNewAmbiguousParametersParameters(scope Bell, props *StructParameterType) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AmbiguousParameters__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AmbiguousParameters__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AmbiguousParameters__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/AmbiguousParameters__checks.go.diff 1`] = ` +--- go/jsiicalc/AmbiguousParameters__checks.go --no-runtime-type-checking ++++ go/jsiicalc/AmbiguousParameters__checks.go --runtime-type-checking @@ -0,0 +1,26 @@ +//go:build !no_runtime_type_checking + @@ -27092,9 +26345,26 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AsyncVirtualMethods.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AsyncVirtualMethods.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AsyncVirtualMethods.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/AmbiguousParameters__no_checks.go.diff 1`] = ` +--- go/jsiicalc/AmbiguousParameters__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/AmbiguousParameters__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateNewAmbiguousParametersParameters(scope Bell, props *StructParameterType) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/AsyncVirtualMethods.go.diff 1`] = ` +--- go/jsiicalc/AsyncVirtualMethods.go --no-runtime-type-checking ++++ go/jsiicalc/AsyncVirtualMethods.go --runtime-type-checking @@ -101,10 +101,13 @@ return returns @@ -27111,49 +26381,49 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j "overrideMe", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AsyncVirtualMethods__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AsyncVirtualMethods__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AsyncVirtualMethods__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/AsyncVirtualMethods__checks.go.diff 1`] = ` +--- go/jsiicalc/AsyncVirtualMethods__checks.go --no-runtime-type-checking ++++ go/jsiicalc/AsyncVirtualMethods__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) + +func (a *jsiiProxy_AsyncVirtualMethods) validateOverrideMeParameters(mult *float64) error { ++ if mult == nil { ++ return fmt.Errorf("parameter mult is required, but nil was provided") ++ } ++ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_AsyncVirtualMethods__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_AsyncVirtualMethods__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_AsyncVirtualMethods__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/AsyncVirtualMethods__no_checks.go.diff 1`] = ` +--- go/jsiicalc/AsyncVirtualMethods__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/AsyncVirtualMethods__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+import ( -+ "fmt" -+) ++// Building without runtime type checking enabled, so all the below just return nil + +func (a *jsiiProxy_AsyncVirtualMethods) validateOverrideMeParameters(mult *float64) error { -+ if mult == nil { -+ return fmt.Errorf("parameter mult is required, but nil was provided") -+ } -+ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Bell.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Bell.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Bell.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/Bell.go.diff 1`] = ` +--- go/jsiicalc/Bell.go --no-runtime-type-checking ++++ go/jsiicalc/Bell.go --runtime-type-checking @@ -52,10 +52,13 @@ b, ) @@ -27170,26 +26440,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Bell__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Bell__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Bell__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (j *jsiiProxy_Bell) validateSetRungParameters(val *bool) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Bell__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Bell__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Bell__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/Bell__checks.go.diff 1`] = ` +--- go/jsiicalc/Bell__checks.go --no-runtime-type-checking ++++ go/jsiicalc/Bell__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -27210,9 +26463,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_BinaryOperation__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_BinaryOperation__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_BinaryOperation__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/Bell__no_checks.go.diff 1`] = ` +--- go/jsiicalc/Bell__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/Bell__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -27221,15 +26474,15 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewBinaryOperationParameters(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) error { ++func (j *jsiiProxy_Bell) validateSetRungParameters(val *bool) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_BinaryOperation__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_BinaryOperation__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_BinaryOperation__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/BinaryOperation__checks.go.diff 1`] = ` +--- go/jsiicalc/BinaryOperation__checks.go --no-runtime-type-checking ++++ go/jsiicalc/BinaryOperation__checks.go --runtime-type-checking @@ -0,0 +1,23 @@ +//go:build !no_runtime_type_checking + @@ -27256,9 +26509,26 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_BurriedAnonymousObject.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_BurriedAnonymousObject.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_BurriedAnonymousObject.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/BinaryOperation__no_checks.go.diff 1`] = ` +--- go/jsiicalc/BinaryOperation__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/BinaryOperation__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateNewBinaryOperationParameters(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/BurriedAnonymousObject.go.diff 1`] = ` +--- go/jsiicalc/BurriedAnonymousObject.go --no-runtime-type-checking ++++ go/jsiicalc/BurriedAnonymousObject.go --runtime-type-checking @@ -42,10 +42,13 @@ return returns @@ -27275,49 +26545,49 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j "giveItBack", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_BurriedAnonymousObject__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_BurriedAnonymousObject__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_BurriedAnonymousObject__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/BurriedAnonymousObject__checks.go.diff 1`] = ` +--- go/jsiicalc/BurriedAnonymousObject__checks.go --no-runtime-type-checking ++++ go/jsiicalc/BurriedAnonymousObject__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) + +func (b *jsiiProxy_BurriedAnonymousObject) validateGiveItBackParameters(value interface{}) error { ++ if value == nil { ++ return fmt.Errorf("parameter value is required, but nil was provided") ++ } ++ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_BurriedAnonymousObject__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_BurriedAnonymousObject__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_BurriedAnonymousObject__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/BurriedAnonymousObject__no_checks.go.diff 1`] = ` +--- go/jsiicalc/BurriedAnonymousObject__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/BurriedAnonymousObject__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+import ( -+ "fmt" -+) ++// Building without runtime type checking enabled, so all the below just return nil + +func (b *jsiiProxy_BurriedAnonymousObject) validateGiveItBackParameters(value interface{}) error { -+ if value == nil { -+ return fmt.Errorf("parameter value is required, but nil was provided") -+ } -+ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Calculator.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Calculator.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Calculator.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/Calculator.go.diff 1`] = ` +--- go/jsiicalc/Calculator.go --no-runtime-type-checking ++++ go/jsiicalc/Calculator.go --runtime-type-checking @@ -181,10 +181,13 @@ // Creates a Calculator object. @@ -27431,58 +26701,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Calculator__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Calculator__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Calculator__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,43 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (c *jsiiProxy_Calculator) validateAddParameters(value *float64) error { -+ return nil -+} -+ -+func (c *jsiiProxy_Calculator) validateMulParameters(value *float64) error { -+ return nil -+} -+ -+func (c *jsiiProxy_Calculator) validatePowParameters(value *float64) error { -+ return nil -+} -+ -+func (j *jsiiProxy_Calculator) validateSetCurrParameters(val scopejsiicalclib.NumericValue) error { -+ return nil -+} -+ -+func (j *jsiiProxy_Calculator) validateSetDecorationPostfixesParameters(val *[]*string) error { -+ return nil -+} -+ -+func (j *jsiiProxy_Calculator) validateSetDecorationPrefixesParameters(val *[]*string) error { -+ return nil -+} -+ -+func (j *jsiiProxy_Calculator) validateSetStringStyleParameters(val composition.CompositeOperation_CompositionStringStyle) error { -+ return nil -+} -+ -+func (j *jsiiProxy_Calculator) validateSetUnionPropertyParameters(val interface{}) error { -+ return nil -+} -+ -+func validateNewCalculatorParameters(props *CalculatorProps) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Calculator__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Calculator__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Calculator__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/Calculator__checks.go.diff 1`] = ` +--- go/jsiicalc/Calculator__checks.go --no-runtime-type-checking ++++ go/jsiicalc/Calculator__checks.go --runtime-type-checking @@ -0,0 +1,95 @@ +//go:build !no_runtime_type_checking + @@ -27581,9 +26802,58 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassThatImplementsTheInternalInterface.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassThatImplementsTheInternalInterface.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassThatImplementsTheInternalInterface.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/Calculator__no_checks.go.diff 1`] = ` +--- go/jsiicalc/Calculator__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/Calculator__no_checks.go --runtime-type-checking +@@ -0,0 +1,43 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (c *jsiiProxy_Calculator) validateAddParameters(value *float64) error { ++ return nil ++} ++ ++func (c *jsiiProxy_Calculator) validateMulParameters(value *float64) error { ++ return nil ++} ++ ++func (c *jsiiProxy_Calculator) validatePowParameters(value *float64) error { ++ return nil ++} ++ ++func (j *jsiiProxy_Calculator) validateSetCurrParameters(val scopejsiicalclib.NumericValue) error { ++ return nil ++} ++ ++func (j *jsiiProxy_Calculator) validateSetDecorationPostfixesParameters(val *[]*string) error { ++ return nil ++} ++ ++func (j *jsiiProxy_Calculator) validateSetDecorationPrefixesParameters(val *[]*string) error { ++ return nil ++} ++ ++func (j *jsiiProxy_Calculator) validateSetStringStyleParameters(val composition.CompositeOperation_CompositionStringStyle) error { ++ return nil ++} ++ ++func (j *jsiiProxy_Calculator) validateSetUnionPropertyParameters(val interface{}) error { ++ return nil ++} ++ ++func validateNewCalculatorParameters(props *CalculatorProps) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassThatImplementsTheInternalInterface.go.diff 1`] = ` +--- go/jsiicalc/ClassThatImplementsTheInternalInterface.go --no-runtime-type-checking ++++ go/jsiicalc/ClassThatImplementsTheInternalInterface.go --runtime-type-checking @@ -87,34 +87,46 @@ c, ) @@ -27633,38 +26903,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassThatImplementsTheInternalInterface__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassThatImplementsTheInternalInterface__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassThatImplementsTheInternalInterface__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,23 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) validateSetAParameters(val *string) error { -+ return nil -+} -+ -+func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) validateSetBParameters(val *string) error { -+ return nil -+} -+ -+func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) validateSetCParameters(val *string) error { -+ return nil -+} -+ -+func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) validateSetDParameters(val *string) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassThatImplementsTheInternalInterface__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassThatImplementsTheInternalInterface__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassThatImplementsTheInternalInterface__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassThatImplementsTheInternalInterface__checks.go.diff 1`] = ` +--- go/jsiicalc/ClassThatImplementsTheInternalInterface__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassThatImplementsTheInternalInterface__checks.go --runtime-type-checking @@ -0,0 +1,41 @@ +//go:build !no_runtime_type_checking + @@ -27709,9 +26950,38 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassThatImplementsThePrivateInterface.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassThatImplementsThePrivateInterface.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassThatImplementsThePrivateInterface.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassThatImplementsTheInternalInterface__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ClassThatImplementsTheInternalInterface__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassThatImplementsTheInternalInterface__no_checks.go --runtime-type-checking +@@ -0,0 +1,23 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) validateSetAParameters(val *string) error { ++ return nil ++} ++ ++func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) validateSetBParameters(val *string) error { ++ return nil ++} ++ ++func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) validateSetCParameters(val *string) error { ++ return nil ++} ++ ++func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) validateSetDParameters(val *string) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassThatImplementsThePrivateInterface.go.diff 1`] = ` +--- go/jsiicalc/ClassThatImplementsThePrivateInterface.go --no-runtime-type-checking ++++ go/jsiicalc/ClassThatImplementsThePrivateInterface.go --runtime-type-checking @@ -87,34 +87,46 @@ c, ) @@ -27761,85 +27031,85 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassThatImplementsThePrivateInterface__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassThatImplementsThePrivateInterface__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassThatImplementsThePrivateInterface__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,23 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassThatImplementsThePrivateInterface__checks.go.diff 1`] = ` +--- go/jsiicalc/ClassThatImplementsThePrivateInterface__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassThatImplementsThePrivateInterface__checks.go --runtime-type-checking +@@ -0,0 +1,41 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) + +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) validateSetAParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ + return nil +} + +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) validateSetBParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ + return nil +} + +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) validateSetCParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ + return nil +} + +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) validateSetEParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassThatImplementsThePrivateInterface__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassThatImplementsThePrivateInterface__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassThatImplementsThePrivateInterface__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,41 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassThatImplementsThePrivateInterface__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ClassThatImplementsThePrivateInterface__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassThatImplementsThePrivateInterface__no_checks.go --runtime-type-checking +@@ -0,0 +1,23 @@ ++//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+import ( -+ "fmt" -+) ++// Building without runtime type checking enabled, so all the below just return nil + +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) validateSetAParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } -+ + return nil +} + +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) validateSetBParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } -+ + return nil +} + +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) validateSetCParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } -+ + return nil +} + +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) validateSetEParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } -+ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithCollectionOfUnions.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithCollectionOfUnions.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithCollectionOfUnions.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithCollectionOfUnions.go.diff 1`] = ` +--- go/jsiicalc/ClassWithCollectionOfUnions.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithCollectionOfUnions.go --runtime-type-checking @@ -28,10 +28,13 @@ @@ -27870,30 +27140,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithCollectionOfUnions__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithCollectionOfUnions__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithCollectionOfUnions__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,15 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (j *jsiiProxy_ClassWithCollectionOfUnions) validateSetUnionPropertyParameters(val *[]*map[string]interface{}) error { -+ return nil -+} -+ -+func validateNewClassWithCollectionOfUnionsParameters(unionProperty *[]*map[string]interface{}) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithCollectionOfUnions__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithCollectionOfUnions__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithCollectionOfUnions__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithCollectionOfUnions__checks.go.diff 1`] = ` +--- go/jsiicalc/ClassWithCollectionOfUnions__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithCollectionOfUnions__checks.go --runtime-type-checking @@ -0,0 +1,91 @@ +//go:build !no_runtime_type_checking + @@ -27988,9 +27237,30 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithCollections.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithCollections.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithCollections.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithCollectionOfUnions__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ClassWithCollectionOfUnions__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithCollectionOfUnions__no_checks.go --runtime-type-checking +@@ -0,0 +1,15 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (j *jsiiProxy_ClassWithCollectionOfUnions) validateSetUnionPropertyParameters(val *[]*map[string]interface{}) error { ++ return nil ++} ++ ++func validateNewClassWithCollectionOfUnionsParameters(unionProperty *[]*map[string]interface{}) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithCollections.go.diff 1`] = ` +--- go/jsiicalc/ClassWithCollections.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithCollections.go --runtime-type-checking @@ -40,10 +40,13 @@ @@ -28060,42 +27330,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithCollections__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithCollections__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithCollections__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,27 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (j *jsiiProxy_ClassWithCollections) validateSetArrayParameters(val *[]*string) error { -+ return nil -+} -+ -+func (j *jsiiProxy_ClassWithCollections) validateSetMapParameters(val *map[string]*string) error { -+ return nil -+} -+ -+func validateClassWithCollections_SetStaticArrayParameters(val *[]*string) error { -+ return nil -+} -+ -+func validateClassWithCollections_SetStaticMapParameters(val *map[string]*string) error { -+ return nil -+} -+ -+func validateNewClassWithCollectionsParameters(map_ *map[string]*string, array *[]*string) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithCollections__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithCollections__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithCollections__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithCollections__checks.go.diff 1`] = ` +--- go/jsiicalc/ClassWithCollections__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithCollections__checks.go --runtime-type-checking @@ -0,0 +1,53 @@ +//go:build !no_runtime_type_checking + @@ -28152,9 +27389,42 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithContainerTypes.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithContainerTypes.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithContainerTypes.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithCollections__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ClassWithCollections__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithCollections__no_checks.go --runtime-type-checking +@@ -0,0 +1,27 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (j *jsiiProxy_ClassWithCollections) validateSetArrayParameters(val *[]*string) error { ++ return nil ++} ++ ++func (j *jsiiProxy_ClassWithCollections) validateSetMapParameters(val *map[string]*string) error { ++ return nil ++} ++ ++func validateClassWithCollections_SetStaticArrayParameters(val *[]*string) error { ++ return nil ++} ++ ++func validateClassWithCollections_SetStaticMapParameters(val *map[string]*string) error { ++ return nil ++} ++ ++func validateNewClassWithCollectionsParameters(map_ *map[string]*string, array *[]*string) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithContainerTypes.go.diff 1`] = ` +--- go/jsiicalc/ClassWithContainerTypes.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithContainerTypes.go --runtime-type-checking @@ -60,10 +60,13 @@ @@ -28171,26 +27441,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j []interface{}{array, record, obj, props}, `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithContainerTypes__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithContainerTypes__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithContainerTypes__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateNewClassWithContainerTypesParameters(array *[]*DummyObj, record *map[string]*DummyObj, obj *map[string]*DummyObj, props *ContainerProps) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithContainerTypes__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithContainerTypes__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithContainerTypes__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithContainerTypes__checks.go.diff 1`] = ` +--- go/jsiicalc/ClassWithContainerTypes__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithContainerTypes__checks.go --runtime-type-checking @@ -0,0 +1,46 @@ +//go:build !no_runtime_type_checking + @@ -28240,9 +27493,26 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithJavaReservedWords.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithJavaReservedWords.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithJavaReservedWords.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithContainerTypes__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ClassWithContainerTypes__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithContainerTypes__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateNewClassWithContainerTypesParameters(array *[]*DummyObj, record *map[string]*DummyObj, obj *map[string]*DummyObj, props *ContainerProps) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithJavaReservedWords.go.diff 1`] = ` +--- go/jsiicalc/ClassWithJavaReservedWords.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithJavaReservedWords.go --runtime-type-checking @@ -28,10 +28,13 @@ @@ -28273,61 +27543,61 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j "import", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithJavaReservedWords__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithJavaReservedWords__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithJavaReservedWords__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,15 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithJavaReservedWords__checks.go.diff 1`] = ` +--- go/jsiicalc/ClassWithJavaReservedWords__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithJavaReservedWords__checks.go --runtime-type-checking +@@ -0,0 +1,25 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) + +func (c *jsiiProxy_ClassWithJavaReservedWords) validateImportParameters(assert *string) error { ++ if assert == nil { ++ return fmt.Errorf("parameter assert is required, but nil was provided") ++ } ++ + return nil +} + +func validateNewClassWithJavaReservedWordsParameters(int *string) error { ++ if int == nil { ++ return fmt.Errorf("parameter int is required, but nil was provided") ++ } ++ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithJavaReservedWords__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithJavaReservedWords__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithJavaReservedWords__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,25 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithJavaReservedWords__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ClassWithJavaReservedWords__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithJavaReservedWords__no_checks.go --runtime-type-checking +@@ -0,0 +1,15 @@ ++//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+import ( -+ "fmt" -+) ++// Building without runtime type checking enabled, so all the below just return nil + +func (c *jsiiProxy_ClassWithJavaReservedWords) validateImportParameters(assert *string) error { -+ if assert == nil { -+ return fmt.Errorf("parameter assert is required, but nil was provided") -+ } -+ + return nil +} + +func validateNewClassWithJavaReservedWordsParameters(int *string) error { -+ if int == nil { -+ return fmt.Errorf("parameter int is required, but nil was provided") -+ } -+ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithMutableObjectLiteralProperty.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithMutableObjectLiteralProperty.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithMutableObjectLiteralProperty.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithMutableObjectLiteralProperty.go.diff 1`] = ` +--- go/jsiicalc/ClassWithMutableObjectLiteralProperty.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithMutableObjectLiteralProperty.go --runtime-type-checking @@ -50,10 +50,13 @@ c, ) @@ -28344,49 +27614,49 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithMutableObjectLiteralProperty__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithMutableObjectLiteralProperty__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithMutableObjectLiteralProperty__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithMutableObjectLiteralProperty__checks.go.diff 1`] = ` +--- go/jsiicalc/ClassWithMutableObjectLiteralProperty__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithMutableObjectLiteralProperty__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) + +func (j *jsiiProxy_ClassWithMutableObjectLiteralProperty) validateSetMutableObjectParameters(val IMutableObjectLiteral) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithMutableObjectLiteralProperty__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithMutableObjectLiteralProperty__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithMutableObjectLiteralProperty__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithMutableObjectLiteralProperty__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ClassWithMutableObjectLiteralProperty__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithMutableObjectLiteralProperty__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+import ( -+ "fmt" -+) ++// Building without runtime type checking enabled, so all the below just return nil + +func (j *jsiiProxy_ClassWithMutableObjectLiteralProperty) validateSetMutableObjectParameters(val IMutableObjectLiteral) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } -+ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithNestedUnion.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithNestedUnion.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithNestedUnion.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithNestedUnion.go.diff 1`] = ` +--- go/jsiicalc/ClassWithNestedUnion.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithNestedUnion.go --runtime-type-checking @@ -28,10 +28,13 @@ @@ -28409,38 +27679,17 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j func (j *jsiiProxy_ClassWithNestedUnion)SetUnionProperty(val *[]interface{}) { + if err := j.validateSetUnionPropertyParameters(val); err != nil { + panic(err) -+ } - _jsii_.Set( - j, - "unionProperty", - val, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithNestedUnion__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithNestedUnion__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithNestedUnion__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,15 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (j *jsiiProxy_ClassWithNestedUnion) validateSetUnionPropertyParameters(val *[]interface{}) error { -+ return nil -+} -+ -+func validateNewClassWithNestedUnionParameters(unionProperty *[]interface{}) error { -+ return nil -+} -+ ++ } + _jsii_.Set( + j, + "unionProperty", + val, + ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithNestedUnion__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithNestedUnion__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithNestedUnion__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithNestedUnion__checks.go.diff 1`] = ` +--- go/jsiicalc/ClassWithNestedUnion__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithNestedUnion__checks.go --runtime-type-checking @@ -0,0 +1,299 @@ +//go:build !no_runtime_type_checking + @@ -28743,41 +27992,638 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties.go --runtime-type-checking -@@ -39,20 +39,26 @@ - return returns +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithNestedUnion__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ClassWithNestedUnion__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithNestedUnion__no_checks.go --runtime-type-checking +@@ -0,0 +1,15 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (j *jsiiProxy_ClassWithNestedUnion) validateSetUnionPropertyParameters(val *[]interface{}) error { ++ return nil ++} ++ ++func validateNewClassWithNestedUnionParameters(unionProperty *[]interface{}) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithPrivateConstructorAndAutomaticProperties.go.diff 1`] = ` +--- go/jsiicalc/ClassWithPrivateConstructorAndAutomaticProperties.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithPrivateConstructorAndAutomaticProperties.go --runtime-type-checking +@@ -39,20 +39,26 @@ + return returns + } + + + func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties)SetReadWriteString(val *string) { ++ if err := j.validateSetReadWriteStringParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "readWriteString", + val, + ) + } + + func ClassWithPrivateConstructorAndAutomaticProperties_Create(readOnlyString *string, readWriteString *string) ClassWithPrivateConstructorAndAutomaticProperties { + _init_.Initialize() + ++ if err := validateClassWithPrivateConstructorAndAutomaticProperties_CreateParameters(readOnlyString, readWriteString); err != nil { ++ panic(err) ++ } + var returns ClassWithPrivateConstructorAndAutomaticProperties + + _jsii_.StaticInvoke( + "jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties", + "create", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithPrivateConstructorAndAutomaticProperties__checks.go.diff 1`] = ` +--- go/jsiicalc/ClassWithPrivateConstructorAndAutomaticProperties__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithPrivateConstructorAndAutomaticProperties__checks.go --runtime-type-checking +@@ -0,0 +1,29 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++import ( ++ "fmt" ++) ++ ++func validateClassWithPrivateConstructorAndAutomaticProperties_CreateParameters(readOnlyString *string, readWriteString *string) error { ++ if readOnlyString == nil { ++ return fmt.Errorf("parameter readOnlyString is required, but nil was provided") ++ } ++ ++ if readWriteString == nil { ++ return fmt.Errorf("parameter readWriteString is required, but nil was provided") ++ } ++ ++ return nil ++} ++ ++func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties) validateSetReadWriteStringParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithPrivateConstructorAndAutomaticProperties__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ClassWithPrivateConstructorAndAutomaticProperties__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ClassWithPrivateConstructorAndAutomaticProperties__no_checks.go --runtime-type-checking +@@ -0,0 +1,15 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateClassWithPrivateConstructorAndAutomaticProperties_CreateParameters(readOnlyString *string, readWriteString *string) error { ++ return nil ++} ++ ++func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties) validateSetReadWriteStringParameters(val *string) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConfusingToJackson.go.diff 1`] = ` +--- go/jsiicalc/ConfusingToJackson.go --no-runtime-type-checking ++++ go/jsiicalc/ConfusingToJackson.go --runtime-type-checking +@@ -29,10 +29,13 @@ + return returns + } + + + func (j *jsiiProxy_ConfusingToJackson)SetUnionProperty(val interface{}) { ++ if err := j.validateSetUnionPropertyParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "unionProperty", + val, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConfusingToJackson__checks.go.diff 1`] = ` +--- go/jsiicalc/ConfusingToJackson__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ConfusingToJackson__checks.go --runtime-type-checking +@@ -0,0 +1,55 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++import ( ++ "fmt" ++ ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++ ++ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ++) ++ ++func (j *jsiiProxy_ConfusingToJackson) validateSetUnionPropertyParameters(val interface{}) error { ++ switch val.(type) { ++ case scopejsiicalclib.IFriendly: ++ // ok ++ case *[]interface{}: ++ val := val.(*[]interface{}) ++ for idx_97dfc6, v := range *val { ++ switch v.(type) { ++ case scopejsiicalclib.IFriendly: ++ // ok ++ case AbstractClass: ++ // ok ++ default: ++ if !_jsii_.IsAnonymousProxy(v) { ++ return fmt.Errorf("parameter val[%#v] must be one of the allowed types: scopejsiicalclib.IFriendly, AbstractClass; received %#v (a %T)", idx_97dfc6, v, v) ++ } ++ } ++ } ++ case []interface{}: ++ val_ := val.([]interface{}) ++ val := &val_ ++ for idx_97dfc6, v := range *val { ++ switch v.(type) { ++ case scopejsiicalclib.IFriendly: ++ // ok ++ case AbstractClass: ++ // ok ++ default: ++ if !_jsii_.IsAnonymousProxy(v) { ++ return fmt.Errorf("parameter val[%#v] must be one of the allowed types: scopejsiicalclib.IFriendly, AbstractClass; received %#v (a %T)", idx_97dfc6, v, v) ++ } ++ } ++ } ++ default: ++ if !_jsii_.IsAnonymousProxy(val) { ++ return fmt.Errorf("parameter val must be one of the allowed types: scopejsiicalclib.IFriendly, *[]interface{}; received %#v (a %T)", val, val) ++ } ++ } ++ ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConfusingToJackson__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ConfusingToJackson__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ConfusingToJackson__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (j *jsiiProxy_ConfusingToJackson) validateSetUnionPropertyParameters(val interface{}) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConstructorPassesThisOut.go.diff 1`] = ` +--- go/jsiicalc/ConstructorPassesThisOut.go --no-runtime-type-checking ++++ go/jsiicalc/ConstructorPassesThisOut.go --runtime-type-checking +@@ -15,10 +15,13 @@ + } + + func NewConstructorPassesThisOut(consumer PartiallyInitializedThisConsumer) ConstructorPassesThisOut { + _init_.Initialize() + ++ if err := validateNewConstructorPassesThisOutParameters(consumer); err != nil { ++ panic(err) ++ } + j := jsiiProxy_ConstructorPassesThisOut{} + + _jsii_.Create( + "jsii-calc.ConstructorPassesThisOut", + []interface{}{consumer}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConstructorPassesThisOut__checks.go.diff 1`] = ` +--- go/jsiicalc/ConstructorPassesThisOut__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ConstructorPassesThisOut__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++import ( ++ "fmt" ++) ++ ++func validateNewConstructorPassesThisOutParameters(consumer PartiallyInitializedThisConsumer) error { ++ if consumer == nil { ++ return fmt.Errorf("parameter consumer is required, but nil was provided") ++ } ++ ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConstructorPassesThisOut__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ConstructorPassesThisOut__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ConstructorPassesThisOut__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateNewConstructorPassesThisOutParameters(consumer PartiallyInitializedThisConsumer) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumePureInterface.go.diff 1`] = ` +--- go/jsiicalc/ConsumePureInterface.go --no-runtime-type-checking ++++ go/jsiicalc/ConsumePureInterface.go --runtime-type-checking +@@ -16,10 +16,13 @@ + } + + func NewConsumePureInterface(delegate IStructReturningDelegate) ConsumePureInterface { + _init_.Initialize() + ++ if err := validateNewConsumePureInterfaceParameters(delegate); err != nil { ++ panic(err) ++ } + j := jsiiProxy_ConsumePureInterface{} + + _jsii_.Create( + "jsii-calc.ConsumePureInterface", + []interface{}{delegate}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumePureInterface__checks.go.diff 1`] = ` +--- go/jsiicalc/ConsumePureInterface__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ConsumePureInterface__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++import ( ++ "fmt" ++) ++ ++func validateNewConsumePureInterfaceParameters(delegate IStructReturningDelegate) error { ++ if delegate == nil { ++ return fmt.Errorf("parameter delegate is required, but nil was provided") ++ } ++ ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumePureInterface__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ConsumePureInterface__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ConsumePureInterface__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateNewConsumePureInterfaceParameters(delegate IStructReturningDelegate) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumerCanRingBell.go.diff 1`] = ` +--- go/jsiicalc/ConsumerCanRingBell.go --no-runtime-type-checking ++++ go/jsiicalc/ConsumerCanRingBell.go --runtime-type-checking +@@ -62,10 +62,13 @@ + // + // Returns whether the bell was rung. + func ConsumerCanRingBell_StaticImplementedByObjectLiteral(ringer IBellRinger) *bool { + _init_.Initialize() + ++ if err := validateConsumerCanRingBell_StaticImplementedByObjectLiteralParameters(ringer); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.ConsumerCanRingBell", + "staticImplementedByObjectLiteral", +@@ -80,10 +83,13 @@ + // + // Return whether the bell was rung. + func ConsumerCanRingBell_StaticImplementedByPrivateClass(ringer IBellRinger) *bool { + _init_.Initialize() + ++ if err := validateConsumerCanRingBell_StaticImplementedByPrivateClassParameters(ringer); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.ConsumerCanRingBell", + "staticImplementedByPrivateClass", +@@ -98,10 +104,13 @@ + // + // Return whether the bell was rung. + func ConsumerCanRingBell_StaticImplementedByPublicClass(ringer IBellRinger) *bool { + _init_.Initialize() + ++ if err := validateConsumerCanRingBell_StaticImplementedByPublicClassParameters(ringer); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.ConsumerCanRingBell", + "staticImplementedByPublicClass", +@@ -116,10 +125,13 @@ + // + // Return whether the bell was rung. + func ConsumerCanRingBell_StaticWhenTypedAsClass(ringer IConcreteBellRinger) *bool { + _init_.Initialize() + ++ if err := validateConsumerCanRingBell_StaticWhenTypedAsClassParameters(ringer); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.ConsumerCanRingBell", + "staticWhenTypedAsClass", +@@ -129,10 +141,13 @@ + + return returns + } + + func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByObjectLiteral(ringer IBellRinger) *bool { ++ if err := c.validateImplementedByObjectLiteralParameters(ringer); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.Invoke( + c, + "implementedByObjectLiteral", +@@ -142,10 +157,13 @@ + + return returns + } + + func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByPrivateClass(ringer IBellRinger) *bool { ++ if err := c.validateImplementedByPrivateClassParameters(ringer); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.Invoke( + c, + "implementedByPrivateClass", +@@ -155,10 +173,13 @@ + + return returns + } + + func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByPublicClass(ringer IBellRinger) *bool { ++ if err := c.validateImplementedByPublicClassParameters(ringer); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.Invoke( + c, + "implementedByPublicClass", +@@ -168,10 +189,13 @@ + + return returns + } + + func (c *jsiiProxy_ConsumerCanRingBell) WhenTypedAsClass(ringer IConcreteBellRinger) *bool { ++ if err := c.validateWhenTypedAsClassParameters(ringer); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.Invoke( + c, + "whenTypedAsClass", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumerCanRingBell__checks.go.diff 1`] = ` +--- go/jsiicalc/ConsumerCanRingBell__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ConsumerCanRingBell__checks.go --runtime-type-checking +@@ -0,0 +1,73 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++import ( ++ "fmt" ++) ++ ++func (c *jsiiProxy_ConsumerCanRingBell) validateImplementedByObjectLiteralParameters(ringer IBellRinger) error { ++ if ringer == nil { ++ return fmt.Errorf("parameter ringer is required, but nil was provided") ++ } ++ ++ return nil ++} ++ ++func (c *jsiiProxy_ConsumerCanRingBell) validateImplementedByPrivateClassParameters(ringer IBellRinger) error { ++ if ringer == nil { ++ return fmt.Errorf("parameter ringer is required, but nil was provided") ++ } ++ ++ return nil ++} ++ ++func (c *jsiiProxy_ConsumerCanRingBell) validateImplementedByPublicClassParameters(ringer IBellRinger) error { ++ if ringer == nil { ++ return fmt.Errorf("parameter ringer is required, but nil was provided") ++ } ++ ++ return nil ++} ++ ++func (c *jsiiProxy_ConsumerCanRingBell) validateWhenTypedAsClassParameters(ringer IConcreteBellRinger) error { ++ if ringer == nil { ++ return fmt.Errorf("parameter ringer is required, but nil was provided") ++ } ++ ++ return nil ++} ++ ++func validateConsumerCanRingBell_StaticImplementedByObjectLiteralParameters(ringer IBellRinger) error { ++ if ringer == nil { ++ return fmt.Errorf("parameter ringer is required, but nil was provided") ++ } ++ ++ return nil ++} ++ ++func validateConsumerCanRingBell_StaticImplementedByPrivateClassParameters(ringer IBellRinger) error { ++ if ringer == nil { ++ return fmt.Errorf("parameter ringer is required, but nil was provided") ++ } ++ ++ return nil ++} ++ ++func validateConsumerCanRingBell_StaticImplementedByPublicClassParameters(ringer IBellRinger) error { ++ if ringer == nil { ++ return fmt.Errorf("parameter ringer is required, but nil was provided") ++ } ++ ++ return nil ++} ++ ++func validateConsumerCanRingBell_StaticWhenTypedAsClassParameters(ringer IConcreteBellRinger) error { ++ if ringer == nil { ++ return fmt.Errorf("parameter ringer is required, but nil was provided") ++ } ++ ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumerCanRingBell__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ConsumerCanRingBell__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ConsumerCanRingBell__no_checks.go --runtime-type-checking +@@ -0,0 +1,39 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (c *jsiiProxy_ConsumerCanRingBell) validateImplementedByObjectLiteralParameters(ringer IBellRinger) error { ++ return nil ++} ++ ++func (c *jsiiProxy_ConsumerCanRingBell) validateImplementedByPrivateClassParameters(ringer IBellRinger) error { ++ return nil ++} ++ ++func (c *jsiiProxy_ConsumerCanRingBell) validateImplementedByPublicClassParameters(ringer IBellRinger) error { ++ return nil ++} ++ ++func (c *jsiiProxy_ConsumerCanRingBell) validateWhenTypedAsClassParameters(ringer IConcreteBellRinger) error { ++ return nil ++} ++ ++func validateConsumerCanRingBell_StaticImplementedByObjectLiteralParameters(ringer IBellRinger) error { ++ return nil ++} ++ ++func validateConsumerCanRingBell_StaticImplementedByPrivateClassParameters(ringer IBellRinger) error { ++ return nil ++} ++ ++func validateConsumerCanRingBell_StaticImplementedByPublicClassParameters(ringer IBellRinger) error { ++ return nil ++} ++ ++func validateConsumerCanRingBell_StaticWhenTypedAsClassParameters(ringer IConcreteBellRinger) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumersOfThisCrazyTypeSystem.go.diff 1`] = ` +--- go/jsiicalc/ConsumersOfThisCrazyTypeSystem.go --no-runtime-type-checking ++++ go/jsiicalc/ConsumersOfThisCrazyTypeSystem.go --runtime-type-checking +@@ -39,10 +39,13 @@ + c, + ) } - - func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties)SetReadWriteString(val *string) { -+ if err := j.validateSetReadWriteStringParameters(val); err != nil { + func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) ConsumeAnotherPublicInterface(obj IAnotherPublicInterface) *string { ++ if err := c.validateConsumeAnotherPublicInterfaceParameters(obj); err != nil { + panic(err) + } - _jsii_.Set( - j, - "readWriteString", - val, - ) - } + var returns *string - func ClassWithPrivateConstructorAndAutomaticProperties_Create(readOnlyString *string, readWriteString *string) ClassWithPrivateConstructorAndAutomaticProperties { - _init_.Initialize() + _jsii_.Invoke( + c, + "consumeAnotherPublicInterface", +@@ -52,10 +55,13 @@ -+ if err := validateClassWithPrivateConstructorAndAutomaticProperties_CreateParameters(readOnlyString, readWriteString); err != nil { + return returns + } + + func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) ConsumeNonInternalInterface(obj INonInternalInterface) interface{} { ++ if err := c.validateConsumeNonInternalInterfaceParameters(obj); err != nil { + panic(err) + } - var returns ClassWithPrivateConstructorAndAutomaticProperties + var returns interface{} - _jsii_.StaticInvoke( - "jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties", - "create", + _jsii_.Invoke( + c, + "consumeNonInternalInterface", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumersOfThisCrazyTypeSystem__checks.go.diff 1`] = ` +--- go/jsiicalc/ConsumersOfThisCrazyTypeSystem__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ConsumersOfThisCrazyTypeSystem__checks.go --runtime-type-checking +@@ -0,0 +1,25 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++import ( ++ "fmt" ++) ++ ++func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) validateConsumeAnotherPublicInterfaceParameters(obj IAnotherPublicInterface) error { ++ if obj == nil { ++ return fmt.Errorf("parameter obj is required, but nil was provided") ++ } ++ ++ return nil ++} ++ ++func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) validateConsumeNonInternalInterfaceParameters(obj INonInternalInterface) error { ++ if obj == nil { ++ return fmt.Errorf("parameter obj is required, but nil was provided") ++ } ++ ++ return nil ++} ++ `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumersOfThisCrazyTypeSystem__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ConsumersOfThisCrazyTypeSystem__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ConsumersOfThisCrazyTypeSystem__no_checks.go --runtime-type-checking @@ -0,0 +1,15 @@ +//go:build no_runtime_type_checking + @@ -28786,20 +28632,67 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateClassWithPrivateConstructorAndAutomaticProperties_CreateParameters(readOnlyString *string, readWriteString *string) error { ++func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) validateConsumeAnotherPublicInterfaceParameters(obj IAnotherPublicInterface) error { + return nil +} + -+func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties) validateSetReadWriteStringParameters(val *string) error { ++func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) validateConsumeNonInternalInterfaceParameters(obj INonInternalInterface) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,29 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/DataRenderer.go.diff 1`] = ` +--- go/jsiicalc/DataRenderer.go --no-runtime-type-checking ++++ go/jsiicalc/DataRenderer.go --runtime-type-checking +@@ -43,10 +43,13 @@ + d, + ) + } + + func (d *jsiiProxy_DataRenderer) Render(data *scopejsiicalclib.MyFirstStruct) *string { ++ if err := d.validateRenderParameters(data); err != nil { ++ panic(err) ++ } + var returns *string + + _jsii_.Invoke( + d, + "render", +@@ -56,10 +59,13 @@ + + return returns + } + + func (d *jsiiProxy_DataRenderer) RenderArbitrary(data *map[string]interface{}) *string { ++ if err := d.validateRenderArbitraryParameters(data); err != nil { ++ panic(err) ++ } + var returns *string + + _jsii_.Invoke( + d, + "renderArbitrary", +@@ -69,10 +75,13 @@ + + return returns + } + + func (d *jsiiProxy_DataRenderer) RenderMap(map_ *map[string]interface{}) *string { ++ if err := d.validateRenderMapParameters(map_); err != nil { ++ panic(err) ++ } + var returns *string + + _jsii_.Invoke( + d, + "renderMap", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DataRenderer__checks.go.diff 1`] = ` +--- go/jsiicalc/DataRenderer__checks.go --no-runtime-type-checking ++++ go/jsiicalc/DataRenderer__checks.go --runtime-type-checking +@@ -0,0 +1,37 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -28807,23 +28700,31 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" ++ ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++ ++ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + -+func validateClassWithPrivateConstructorAndAutomaticProperties_CreateParameters(readOnlyString *string, readWriteString *string) error { -+ if readOnlyString == nil { -+ return fmt.Errorf("parameter readOnlyString is required, but nil was provided") ++func (d *jsiiProxy_DataRenderer) validateRenderParameters(data *scopejsiicalclib.MyFirstStruct) error { ++ if err := _jsii_.ValidateStruct(data, func() string { return "parameter data" }); err != nil { ++ return err + } + -+ if readWriteString == nil { -+ return fmt.Errorf("parameter readWriteString is required, but nil was provided") ++ return nil ++} ++ ++func (d *jsiiProxy_DataRenderer) validateRenderArbitraryParameters(data *map[string]interface{}) error { ++ if data == nil { ++ return fmt.Errorf("parameter data is required, but nil was provided") + } + + return nil +} + -+func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties) validateSetReadWriteStringParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func (d *jsiiProxy_DataRenderer) validateRenderMapParameters(map_ *map[string]interface{}) error { ++ if map_ == nil { ++ return fmt.Errorf("parameter map_ is required, but nil was provided") + } + + return nil @@ -28831,28 +28732,76 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConfusingToJackson.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConfusingToJackson.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConfusingToJackson.go --runtime-type-checking -@@ -29,10 +29,13 @@ - return returns - } +exports[`Generated code for "jsii-calc": /go/jsiicalc/DataRenderer__no_checks.go.diff 1`] = ` +--- go/jsiicalc/DataRenderer__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/DataRenderer__no_checks.go --runtime-type-checking +@@ -0,0 +1,19 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (d *jsiiProxy_DataRenderer) validateRenderParameters(data *scopejsiicalclib.MyFirstStruct) error { ++ return nil ++} ++ ++func (d *jsiiProxy_DataRenderer) validateRenderArbitraryParameters(data *map[string]interface{}) error { ++ return nil ++} ++ ++func (d *jsiiProxy_DataRenderer) validateRenderMapParameters(map_ *map[string]interface{}) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DeprecatedClass.go.diff 1`] = ` +--- go/jsiicalc/DeprecatedClass.go --no-runtime-type-checking ++++ go/jsiicalc/DeprecatedClass.go --runtime-type-checking +@@ -46,10 +46,13 @@ + // Deprecated: this constructor is "just" okay. + func NewDeprecatedClass(readonlyString *string, mutableNumber *float64) DeprecatedClass { + _init_.Initialize() - func (j *jsiiProxy_ConfusingToJackson)SetUnionProperty(val interface{}) { -+ if err := j.validateSetUnionPropertyParameters(val); err != nil { ++ if err := validateNewDeprecatedClassParameters(readonlyString); err != nil { + panic(err) + } - _jsii_.Set( - j, - "unionProperty", - val, - ) + j := jsiiProxy_DeprecatedClass{} + + _jsii_.Create( + "jsii-calc.DeprecatedClass", + []interface{}{readonlyString, mutableNumber}, `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConfusingToJackson__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConfusingToJackson__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConfusingToJackson__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/DeprecatedClass__checks.go.diff 1`] = ` +--- go/jsiicalc/DeprecatedClass__checks.go --no-runtime-type-checking ++++ go/jsiicalc/DeprecatedClass__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++import ( ++ "fmt" ++) ++ ++func validateNewDeprecatedClassParameters(readonlyString *string) error { ++ if readonlyString == nil { ++ return fmt.Errorf("parameter readonlyString is required, but nil was provided") ++ } ++ ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DeprecatedClass__no_checks.go.diff 1`] = ` +--- go/jsiicalc/DeprecatedClass__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/DeprecatedClass__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -28861,16 +28810,35 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (j *jsiiProxy_ConfusingToJackson) validateSetUnionPropertyParameters(val interface{}) error { ++func validateNewDeprecatedClassParameters(readonlyString *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConfusingToJackson__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConfusingToJackson__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConfusingToJackson__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,55 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/DoNotOverridePrivates.go.diff 1`] = ` +--- go/jsiicalc/DoNotOverridePrivates.go --no-runtime-type-checking ++++ go/jsiicalc/DoNotOverridePrivates.go --runtime-type-checking +@@ -40,10 +40,13 @@ + d, + ) + } + + func (d *jsiiProxy_DoNotOverridePrivates) ChangePrivatePropertyValue(newValue *string) { ++ if err := d.validateChangePrivatePropertyValueParameters(newValue); err != nil { ++ panic(err) ++ } + _jsii_.InvokeVoid( + d, + "changePrivatePropertyValue", + []interface{}{newValue}, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DoNotOverridePrivates__checks.go.diff 1`] = ` +--- go/jsiicalc/DoNotOverridePrivates__checks.go --no-runtime-type-checking ++++ go/jsiicalc/DoNotOverridePrivates__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -28878,49 +28846,11 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" -+ -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" -+ -+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + -+func (j *jsiiProxy_ConfusingToJackson) validateSetUnionPropertyParameters(val interface{}) error { -+ switch val.(type) { -+ case scopejsiicalclib.IFriendly: -+ // ok -+ case *[]interface{}: -+ val := val.(*[]interface{}) -+ for idx_97dfc6, v := range *val { -+ switch v.(type) { -+ case scopejsiicalclib.IFriendly: -+ // ok -+ case AbstractClass: -+ // ok -+ default: -+ if !_jsii_.IsAnonymousProxy(v) { -+ return fmt.Errorf("parameter val[%#v] must be one of the allowed types: scopejsiicalclib.IFriendly, AbstractClass; received %#v (a %T)", idx_97dfc6, v, v) -+ } -+ } -+ } -+ case []interface{}: -+ val_ := val.([]interface{}) -+ val := &val_ -+ for idx_97dfc6, v := range *val { -+ switch v.(type) { -+ case scopejsiicalclib.IFriendly: -+ // ok -+ case AbstractClass: -+ // ok -+ default: -+ if !_jsii_.IsAnonymousProxy(v) { -+ return fmt.Errorf("parameter val[%#v] must be one of the allowed types: scopejsiicalclib.IFriendly, AbstractClass; received %#v (a %T)", idx_97dfc6, v, v) -+ } -+ } -+ } -+ default: -+ if !_jsii_.IsAnonymousProxy(val) { -+ return fmt.Errorf("parameter val must be one of the allowed types: scopejsiicalclib.IFriendly, *[]interface{}; received %#v (a %T)", val, val) -+ } ++func (d *jsiiProxy_DoNotOverridePrivates) validateChangePrivatePropertyValueParameters(newValue *string) error { ++ if newValue == nil { ++ return fmt.Errorf("parameter newValue is required, but nil was provided") + } + + return nil @@ -28928,28 +28858,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConstructorPassesThisOut.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConstructorPassesThisOut.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConstructorPassesThisOut.go --runtime-type-checking -@@ -15,10 +15,13 @@ - } - - func NewConstructorPassesThisOut(consumer PartiallyInitializedThisConsumer) ConstructorPassesThisOut { - _init_.Initialize() - -+ if err := validateNewConstructorPassesThisOutParameters(consumer); err != nil { -+ panic(err) -+ } - j := jsiiProxy_ConstructorPassesThisOut{} - - _jsii_.Create( - "jsii-calc.ConstructorPassesThisOut", - []interface{}{consumer}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConstructorPassesThisOut__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConstructorPassesThisOut__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConstructorPassesThisOut__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/DoNotOverridePrivates__no_checks.go.diff 1`] = ` +--- go/jsiicalc/DoNotOverridePrivates__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/DoNotOverridePrivates__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -28958,15 +28869,34 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewConstructorPassesThisOutParameters(consumer PartiallyInitializedThisConsumer) error { ++func (d *jsiiProxy_DoNotOverridePrivates) validateChangePrivatePropertyValueParameters(newValue *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConstructorPassesThisOut__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConstructorPassesThisOut__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConstructorPassesThisOut__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/DoNotRecognizeAnyAsOptional.go.diff 1`] = ` +--- go/jsiicalc/DoNotRecognizeAnyAsOptional.go --no-runtime-type-checking ++++ go/jsiicalc/DoNotRecognizeAnyAsOptional.go --runtime-type-checking +@@ -39,10 +39,13 @@ + d, + ) + } + + func (d *jsiiProxy_DoNotRecognizeAnyAsOptional) Method(_requiredAny interface{}, _optionalAny interface{}, _optionalString *string) { ++ if err := d.validateMethodParameters(_requiredAny); err != nil { ++ panic(err) ++ } + _jsii_.InvokeVoid( + d, + "method", + []interface{}{_requiredAny, _optionalAny, _optionalString}, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DoNotRecognizeAnyAsOptional__checks.go.diff 1`] = ` +--- go/jsiicalc/DoNotRecognizeAnyAsOptional__checks.go --no-runtime-type-checking ++++ go/jsiicalc/DoNotRecognizeAnyAsOptional__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -28977,9 +28907,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func validateNewConstructorPassesThisOutParameters(consumer PartiallyInitializedThisConsumer) error { -+ if consumer == nil { -+ return fmt.Errorf("parameter consumer is required, but nil was provided") ++func (d *jsiiProxy_DoNotRecognizeAnyAsOptional) validateMethodParameters(_requiredAny interface{}) error { ++ if _requiredAny == nil { ++ return fmt.Errorf("parameter _requiredAny is required, but nil was provided") + } + + return nil @@ -28987,28 +28917,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConsumePureInterface.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConsumePureInterface.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConsumePureInterface.go --runtime-type-checking -@@ -16,10 +16,13 @@ - } - - func NewConsumePureInterface(delegate IStructReturningDelegate) ConsumePureInterface { - _init_.Initialize() - -+ if err := validateNewConsumePureInterfaceParameters(delegate); err != nil { -+ panic(err) -+ } - j := jsiiProxy_ConsumePureInterface{} - - _jsii_.Create( - "jsii-calc.ConsumePureInterface", - []interface{}{delegate}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConsumePureInterface__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConsumePureInterface__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConsumePureInterface__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/DoNotRecognizeAnyAsOptional__no_checks.go.diff 1`] = ` +--- go/jsiicalc/DoNotRecognizeAnyAsOptional__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/DoNotRecognizeAnyAsOptional__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -29017,15 +28928,34 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewConsumePureInterfaceParameters(delegate IStructReturningDelegate) error { ++func (d *jsiiProxy_DoNotRecognizeAnyAsOptional) validateMethodParameters(_requiredAny interface{}) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConsumePureInterface__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConsumePureInterface__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConsumePureInterface__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/DocumentedClass.go.diff 1`] = ` +--- go/jsiicalc/DocumentedClass.go --no-runtime-type-checking ++++ go/jsiicalc/DocumentedClass.go --runtime-type-checking +@@ -60,10 +60,13 @@ + d, + ) + } + + func (d *jsiiProxy_DocumentedClass) Greet(greetee *Greetee) *float64 { ++ if err := d.validateGreetParameters(greetee); err != nil { ++ panic(err) ++ } + var returns *float64 + + _jsii_.Invoke( + d, + "greet", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DocumentedClass__checks.go.diff 1`] = ` +--- go/jsiicalc/DocumentedClass__checks.go --no-runtime-type-checking ++++ go/jsiicalc/DocumentedClass__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -29033,12 +28963,12 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j +package jsiicalc + +import ( -+ "fmt" ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func validateNewConsumePureInterfaceParameters(delegate IStructReturningDelegate) error { -+ if delegate == nil { -+ return fmt.Errorf("parameter delegate is required, but nil was provided") ++func (d *jsiiProxy_DocumentedClass) validateGreetParameters(greetee *Greetee) error { ++ if err := _jsii_.ValidateStruct(greetee, func() string { return "parameter greetee" }); err != nil { ++ return err + } + + return nil @@ -29046,172 +28976,190 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConsumerCanRingBell.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConsumerCanRingBell.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConsumerCanRingBell.go --runtime-type-checking -@@ -62,10 +62,13 @@ - // - // Returns whether the bell was rung. - func ConsumerCanRingBell_StaticImplementedByObjectLiteral(ringer IBellRinger) *bool { - _init_.Initialize() - -+ if err := validateConsumerCanRingBell_StaticImplementedByObjectLiteralParameters(ringer); err != nil { -+ panic(err) -+ } - var returns *bool - - _jsii_.StaticInvoke( - "jsii-calc.ConsumerCanRingBell", - "staticImplementedByObjectLiteral", -@@ -80,10 +83,13 @@ - // - // Return whether the bell was rung. - func ConsumerCanRingBell_StaticImplementedByPrivateClass(ringer IBellRinger) *bool { - _init_.Initialize() - -+ if err := validateConsumerCanRingBell_StaticImplementedByPrivateClassParameters(ringer); err != nil { -+ panic(err) -+ } - var returns *bool - - _jsii_.StaticInvoke( - "jsii-calc.ConsumerCanRingBell", - "staticImplementedByPrivateClass", -@@ -98,10 +104,13 @@ - // - // Return whether the bell was rung. - func ConsumerCanRingBell_StaticImplementedByPublicClass(ringer IBellRinger) *bool { - _init_.Initialize() +exports[`Generated code for "jsii-calc": /go/jsiicalc/DocumentedClass__no_checks.go.diff 1`] = ` +--- go/jsiicalc/DocumentedClass__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/DocumentedClass__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (d *jsiiProxy_DocumentedClass) validateGreetParameters(greetee *Greetee) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DynamicPropertyBearer.go.diff 1`] = ` +--- go/jsiicalc/DynamicPropertyBearer.go --no-runtime-type-checking ++++ go/jsiicalc/DynamicPropertyBearer.go --runtime-type-checking +@@ -41,10 +41,13 @@ -+ if err := validateConsumerCanRingBell_StaticImplementedByPublicClassParameters(ringer); err != nil { -+ panic(err) -+ } - var returns *bool - _jsii_.StaticInvoke( - "jsii-calc.ConsumerCanRingBell", - "staticImplementedByPublicClass", -@@ -116,10 +125,13 @@ - // - // Return whether the bell was rung. - func ConsumerCanRingBell_StaticWhenTypedAsClass(ringer IConcreteBellRinger) *bool { + func NewDynamicPropertyBearer(valueStore *string) DynamicPropertyBearer { _init_.Initialize() -+ if err := validateConsumerCanRingBell_StaticWhenTypedAsClassParameters(ringer); err != nil { -+ panic(err) -+ } - var returns *bool - - _jsii_.StaticInvoke( - "jsii-calc.ConsumerCanRingBell", - "staticWhenTypedAsClass", -@@ -129,10 +141,13 @@ - - return returns - } - - func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByObjectLiteral(ringer IBellRinger) *bool { -+ if err := c.validateImplementedByObjectLiteralParameters(ringer); err != nil { -+ panic(err) -+ } - var returns *bool - - _jsii_.Invoke( - c, - "implementedByObjectLiteral", -@@ -142,10 +157,13 @@ - - return returns - } - - func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByPrivateClass(ringer IBellRinger) *bool { -+ if err := c.validateImplementedByPrivateClassParameters(ringer); err != nil { ++ if err := validateNewDynamicPropertyBearerParameters(valueStore); err != nil { + panic(err) + } - var returns *bool - - _jsii_.Invoke( - c, - "implementedByPrivateClass", -@@ -155,10 +173,13 @@ + j := jsiiProxy_DynamicPropertyBearer{} - return returns + _jsii_.Create( + "jsii-calc.DynamicPropertyBearer", + []interface{}{valueStore}, +@@ -63,18 +66,24 @@ + d, + ) } - func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByPublicClass(ringer IBellRinger) *bool { -+ if err := c.validateImplementedByPublicClassParameters(ringer); err != nil { + func (j *jsiiProxy_DynamicPropertyBearer)SetDynamicProperty(val *string) { ++ if err := j.validateSetDynamicPropertyParameters(val); err != nil { + panic(err) + } - var returns *bool - - _jsii_.Invoke( - c, - "implementedByPublicClass", -@@ -168,10 +189,13 @@ - - return returns + _jsii_.Set( + j, + "dynamicProperty", + val, + ) } - func (c *jsiiProxy_ConsumerCanRingBell) WhenTypedAsClass(ringer IConcreteBellRinger) *bool { -+ if err := c.validateWhenTypedAsClassParameters(ringer); err != nil { + func (j *jsiiProxy_DynamicPropertyBearer)SetValueStore(val *string) { ++ if err := j.validateSetValueStoreParameters(val); err != nil { + panic(err) + } - var returns *bool - - _jsii_.Invoke( - c, - "whenTypedAsClass", + _jsii_.Set( + j, + "valueStore", + val, + ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConsumerCanRingBell__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConsumerCanRingBell__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConsumerCanRingBell__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,39 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/DynamicPropertyBearer__checks.go.diff 1`] = ` +--- go/jsiicalc/DynamicPropertyBearer__checks.go --no-runtime-type-checking ++++ go/jsiicalc/DynamicPropertyBearer__checks.go --runtime-type-checking +@@ -0,0 +1,33 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) ++ ++func (j *jsiiProxy_DynamicPropertyBearer) validateSetDynamicPropertyParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } + -+func (c *jsiiProxy_ConsumerCanRingBell) validateImplementedByObjectLiteralParameters(ringer IBellRinger) error { + return nil +} + -+func (c *jsiiProxy_ConsumerCanRingBell) validateImplementedByPrivateClassParameters(ringer IBellRinger) error { ++func (j *jsiiProxy_DynamicPropertyBearer) validateSetValueStoreParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ + return nil +} + -+func (c *jsiiProxy_ConsumerCanRingBell) validateImplementedByPublicClassParameters(ringer IBellRinger) error { -+ return nil -+} ++func validateNewDynamicPropertyBearerParameters(valueStore *string) error { ++ if valueStore == nil { ++ return fmt.Errorf("parameter valueStore is required, but nil was provided") ++ } + -+func (c *jsiiProxy_ConsumerCanRingBell) validateWhenTypedAsClassParameters(ringer IConcreteBellRinger) error { + return nil +} + -+func validateConsumerCanRingBell_StaticImplementedByObjectLiteralParameters(ringer IBellRinger) error { -+ return nil -+} +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DynamicPropertyBearer__no_checks.go.diff 1`] = ` +--- go/jsiicalc/DynamicPropertyBearer__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/DynamicPropertyBearer__no_checks.go --runtime-type-checking +@@ -0,0 +1,19 @@ ++//go:build no_runtime_type_checking + -+func validateConsumerCanRingBell_StaticImplementedByPrivateClassParameters(ringer IBellRinger) error { ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (j *jsiiProxy_DynamicPropertyBearer) validateSetDynamicPropertyParameters(val *string) error { + return nil +} + -+func validateConsumerCanRingBell_StaticImplementedByPublicClassParameters(ringer IBellRinger) error { ++func (j *jsiiProxy_DynamicPropertyBearer) validateSetValueStoreParameters(val *string) error { + return nil +} + -+func validateConsumerCanRingBell_StaticWhenTypedAsClassParameters(ringer IConcreteBellRinger) error { ++func validateNewDynamicPropertyBearerParameters(valueStore *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConsumerCanRingBell__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConsumerCanRingBell__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConsumerCanRingBell__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,73 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/DynamicPropertyBearerChild.go.diff 1`] = ` +--- go/jsiicalc/DynamicPropertyBearerChild.go --no-runtime-type-checking ++++ go/jsiicalc/DynamicPropertyBearerChild.go --runtime-type-checking +@@ -56,10 +56,13 @@ + + + func NewDynamicPropertyBearerChild(originalValue *string) DynamicPropertyBearerChild { + _init_.Initialize() + ++ if err := validateNewDynamicPropertyBearerChildParameters(originalValue); err != nil { ++ panic(err) ++ } + j := jsiiProxy_DynamicPropertyBearerChild{} + + _jsii_.Create( + "jsii-calc.DynamicPropertyBearerChild", + []interface{}{originalValue}, +@@ -78,26 +81,35 @@ + d, + ) + } + + func (j *jsiiProxy_DynamicPropertyBearerChild)SetDynamicProperty(val *string) { ++ if err := j.validateSetDynamicPropertyParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "dynamicProperty", + val, + ) + } + + func (j *jsiiProxy_DynamicPropertyBearerChild)SetValueStore(val *string) { ++ if err := j.validateSetValueStoreParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "valueStore", + val, + ) + } + + func (d *jsiiProxy_DynamicPropertyBearerChild) OverrideValue(newValue *string) *string { ++ if err := d.validateOverrideValueParameters(newValue); err != nil { ++ panic(err) ++ } + var returns *string + + _jsii_.Invoke( + d, + "overrideValue", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DynamicPropertyBearerChild__checks.go.diff 1`] = ` +--- go/jsiicalc/DynamicPropertyBearerChild__checks.go --no-runtime-type-checking ++++ go/jsiicalc/DynamicPropertyBearerChild__checks.go --runtime-type-checking +@@ -0,0 +1,41 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -29221,129 +29169,91 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (c *jsiiProxy_ConsumerCanRingBell) validateImplementedByObjectLiteralParameters(ringer IBellRinger) error { -+ if ringer == nil { -+ return fmt.Errorf("parameter ringer is required, but nil was provided") ++func (d *jsiiProxy_DynamicPropertyBearerChild) validateOverrideValueParameters(newValue *string) error { ++ if newValue == nil { ++ return fmt.Errorf("parameter newValue is required, but nil was provided") + } + + return nil +} + -+func (c *jsiiProxy_ConsumerCanRingBell) validateImplementedByPrivateClassParameters(ringer IBellRinger) error { -+ if ringer == nil { -+ return fmt.Errorf("parameter ringer is required, but nil was provided") ++func (j *jsiiProxy_DynamicPropertyBearerChild) validateSetDynamicPropertyParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil +} + -+func (c *jsiiProxy_ConsumerCanRingBell) validateImplementedByPublicClassParameters(ringer IBellRinger) error { -+ if ringer == nil { -+ return fmt.Errorf("parameter ringer is required, but nil was provided") ++func (j *jsiiProxy_DynamicPropertyBearerChild) validateSetValueStoreParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil +} + -+func (c *jsiiProxy_ConsumerCanRingBell) validateWhenTypedAsClassParameters(ringer IConcreteBellRinger) error { -+ if ringer == nil { -+ return fmt.Errorf("parameter ringer is required, but nil was provided") ++func validateNewDynamicPropertyBearerChildParameters(originalValue *string) error { ++ if originalValue == nil { ++ return fmt.Errorf("parameter originalValue is required, but nil was provided") + } + + return nil +} + -+func validateConsumerCanRingBell_StaticImplementedByObjectLiteralParameters(ringer IBellRinger) error { -+ if ringer == nil { -+ return fmt.Errorf("parameter ringer is required, but nil was provided") -+ } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/DynamicPropertyBearerChild__no_checks.go.diff 1`] = ` +--- go/jsiicalc/DynamicPropertyBearerChild__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/DynamicPropertyBearerChild__no_checks.go --runtime-type-checking +@@ -0,0 +1,23 @@ ++//go:build no_runtime_type_checking + -+ return nil -+} ++// A simple calcuator built on JSII. ++package jsiicalc + -+func validateConsumerCanRingBell_StaticImplementedByPrivateClassParameters(ringer IBellRinger) error { -+ if ringer == nil { -+ return fmt.Errorf("parameter ringer is required, but nil was provided") -+ } ++// Building without runtime type checking enabled, so all the below just return nil + ++func (d *jsiiProxy_DynamicPropertyBearerChild) validateOverrideValueParameters(newValue *string) error { + return nil +} + -+func validateConsumerCanRingBell_StaticImplementedByPublicClassParameters(ringer IBellRinger) error { -+ if ringer == nil { -+ return fmt.Errorf("parameter ringer is required, but nil was provided") -+ } -+ ++func (j *jsiiProxy_DynamicPropertyBearerChild) validateSetDynamicPropertyParameters(val *string) error { + return nil +} + -+func validateConsumerCanRingBell_StaticWhenTypedAsClassParameters(ringer IConcreteBellRinger) error { -+ if ringer == nil { -+ return fmt.Errorf("parameter ringer is required, but nil was provided") -+ } ++func (j *jsiiProxy_DynamicPropertyBearerChild) validateSetValueStoreParameters(val *string) error { ++ return nil ++} + ++func validateNewDynamicPropertyBearerChildParameters(originalValue *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConsumersOfThisCrazyTypeSystem.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConsumersOfThisCrazyTypeSystem.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConsumersOfThisCrazyTypeSystem.go --runtime-type-checking -@@ -39,10 +39,13 @@ - c, - ) - } - - func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) ConsumeAnotherPublicInterface(obj IAnotherPublicInterface) *string { -+ if err := c.validateConsumeAnotherPublicInterfaceParameters(obj); err != nil { -+ panic(err) -+ } - var returns *string - - _jsii_.Invoke( - c, - "consumeAnotherPublicInterface", -@@ -52,10 +55,13 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/Entropy.go.diff 1`] = ` +--- go/jsiicalc/Entropy.go --no-runtime-type-checking ++++ go/jsiicalc/Entropy.go --runtime-type-checking +@@ -46,10 +46,13 @@ return returns } - func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) ConsumeNonInternalInterface(obj INonInternalInterface) interface{} { -+ if err := c.validateConsumeNonInternalInterfaceParameters(obj); err != nil { + func (e *jsiiProxy_Entropy) Repeat(word *string) *string { ++ if err := e.validateRepeatParameters(word); err != nil { + panic(err) + } - var returns interface{} + var returns *string _jsii_.Invoke( - c, - "consumeNonInternalInterface", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConsumersOfThisCrazyTypeSystem__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConsumersOfThisCrazyTypeSystem__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConsumersOfThisCrazyTypeSystem__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,15 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) validateConsumeAnotherPublicInterfaceParameters(obj IAnotherPublicInterface) error { -+ return nil -+} -+ -+func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) validateConsumeNonInternalInterfaceParameters(obj INonInternalInterface) error { -+ return nil -+} -+ + e, + "repeat", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ConsumersOfThisCrazyTypeSystem__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ConsumersOfThisCrazyTypeSystem__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ConsumersOfThisCrazyTypeSystem__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/Entropy__checks.go.diff 1`] = ` +--- go/jsiicalc/Entropy__checks.go --no-runtime-type-checking ++++ go/jsiicalc/Entropy__checks.go --runtime-type-checking @@ -0,0 +1,25 @@ +//go:build !no_runtime_type_checking + @@ -29354,17 +29264,17 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) validateConsumeAnotherPublicInterfaceParameters(obj IAnotherPublicInterface) error { -+ if obj == nil { -+ return fmt.Errorf("parameter obj is required, but nil was provided") ++func (e *jsiiProxy_Entropy) validateRepeatParameters(word *string) error { ++ if word == nil { ++ return fmt.Errorf("parameter word is required, but nil was provided") + } + + return nil +} + -+func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) validateConsumeNonInternalInterfaceParameters(obj INonInternalInterface) error { -+ if obj == nil { -+ return fmt.Errorf("parameter obj is required, but nil was provided") ++func validateNewEntropyParameters(clock IWallClock) error { ++ if clock == nil { ++ return fmt.Errorf("parameter clock is required, but nil was provided") + } + + return nil @@ -29372,57 +29282,10 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DataRenderer.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DataRenderer.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DataRenderer.go --runtime-type-checking -@@ -43,10 +43,13 @@ - d, - ) - } - - func (d *jsiiProxy_DataRenderer) Render(data *scopejsiicalclib.MyFirstStruct) *string { -+ if err := d.validateRenderParameters(data); err != nil { -+ panic(err) -+ } - var returns *string - - _jsii_.Invoke( - d, - "render", -@@ -56,10 +59,13 @@ - - return returns - } - - func (d *jsiiProxy_DataRenderer) RenderArbitrary(data *map[string]interface{}) *string { -+ if err := d.validateRenderArbitraryParameters(data); err != nil { -+ panic(err) -+ } - var returns *string - - _jsii_.Invoke( - d, - "renderArbitrary", -@@ -69,10 +75,13 @@ - - return returns - } - - func (d *jsiiProxy_DataRenderer) RenderMap(map_ *map[string]interface{}) *string { -+ if err := d.validateRenderMapParameters(map_); err != nil { -+ panic(err) -+ } - var returns *string - - _jsii_.Invoke( - d, - "renderMap", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DataRenderer__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DataRenderer__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DataRenderer__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,19 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/Entropy__no_checks.go.diff 1`] = ` +--- go/jsiicalc/Entropy__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/Entropy__no_checks.go --runtime-type-checking +@@ -0,0 +1,15 @@ +//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -29430,24 +29293,39 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (d *jsiiProxy_DataRenderer) validateRenderParameters(data *scopejsiicalclib.MyFirstStruct) error { -+ return nil -+} -+ -+func (d *jsiiProxy_DataRenderer) validateRenderArbitraryParameters(data *map[string]interface{}) error { ++func (e *jsiiProxy_Entropy) validateRepeatParameters(word *string) error { + return nil +} + -+func (d *jsiiProxy_DataRenderer) validateRenderMapParameters(map_ *map[string]interface{}) error { ++func validateNewEntropyParameters(clock IWallClock) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DataRenderer__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DataRenderer__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DataRenderer__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,37 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/EraseUndefinedHashValues.go.diff 1`] = ` +--- go/jsiicalc/EraseUndefinedHashValues.go --no-runtime-type-checking ++++ go/jsiicalc/EraseUndefinedHashValues.go --runtime-type-checking +@@ -43,10 +43,13 @@ + // Used to check that undefined/null hash values + // are being erased when sending values from native code to JS. + func EraseUndefinedHashValues_DoesKeyExist(opts *EraseUndefinedHashValuesOptions, key *string) *bool { + _init_.Initialize() + ++ if err := validateEraseUndefinedHashValues_DoesKeyExistParameters(opts, key); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.EraseUndefinedHashValues", + "doesKeyExist", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/EraseUndefinedHashValues__checks.go.diff 1`] = ` +--- go/jsiicalc/EraseUndefinedHashValues__checks.go --no-runtime-type-checking ++++ go/jsiicalc/EraseUndefinedHashValues__checks.go --runtime-type-checking +@@ -0,0 +1,26 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -29457,75 +29335,64 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" -+ -+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + -+func (d *jsiiProxy_DataRenderer) validateRenderParameters(data *scopejsiicalclib.MyFirstStruct) error { -+ if err := _jsii_.ValidateStruct(data, func() string { return "parameter data" }); err != nil { ++func validateEraseUndefinedHashValues_DoesKeyExistParameters(opts *EraseUndefinedHashValuesOptions, key *string) error { ++ if opts == nil { ++ return fmt.Errorf("parameter opts is required, but nil was provided") ++ } ++ if err := _jsii_.ValidateStruct(opts, func() string { return "parameter opts" }); err != nil { + return err + } + -+ return nil -+} -+ -+func (d *jsiiProxy_DataRenderer) validateRenderArbitraryParameters(data *map[string]interface{}) error { -+ if data == nil { -+ return fmt.Errorf("parameter data is required, but nil was provided") ++ if key == nil { ++ return fmt.Errorf("parameter key is required, but nil was provided") + } + + return nil +} + -+func (d *jsiiProxy_DataRenderer) validateRenderMapParameters(map_ *map[string]interface{}) error { -+ if map_ == nil { -+ return fmt.Errorf("parameter map_ is required, but nil was provided") -+ } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/EraseUndefinedHashValues__no_checks.go.diff 1`] = ` +--- go/jsiicalc/EraseUndefinedHashValues__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/EraseUndefinedHashValues__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil + ++func validateEraseUndefinedHashValues_DoesKeyExistParameters(opts *EraseUndefinedHashValuesOptions, key *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DeprecatedClass.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DeprecatedClass.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DeprecatedClass.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExperimentalClass.go.diff 1`] = ` +--- go/jsiicalc/ExperimentalClass.go --no-runtime-type-checking ++++ go/jsiicalc/ExperimentalClass.go --runtime-type-checking @@ -46,10 +46,13 @@ - // Deprecated: this constructor is "just" okay. - func NewDeprecatedClass(readonlyString *string, mutableNumber *float64) DeprecatedClass { + // Experimental. + func NewExperimentalClass(readonlyString *string, mutableNumber *float64) ExperimentalClass { _init_.Initialize() -+ if err := validateNewDeprecatedClassParameters(readonlyString); err != nil { ++ if err := validateNewExperimentalClassParameters(readonlyString); err != nil { + panic(err) + } - j := jsiiProxy_DeprecatedClass{} + j := jsiiProxy_ExperimentalClass{} _jsii_.Create( - "jsii-calc.DeprecatedClass", + "jsii-calc.ExperimentalClass", []interface{}{readonlyString, mutableNumber}, `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DeprecatedClass__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DeprecatedClass__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DeprecatedClass__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateNewDeprecatedClassParameters(readonlyString *string) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DeprecatedClass__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DeprecatedClass__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DeprecatedClass__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExperimentalClass__checks.go.diff 1`] = ` +--- go/jsiicalc/ExperimentalClass__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ExperimentalClass__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -29536,7 +29403,7 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func validateNewDeprecatedClassParameters(readonlyString *string) error { ++func validateNewExperimentalClassParameters(readonlyString *string) error { + if readonlyString == nil { + return fmt.Errorf("parameter readonlyString is required, but nil was provided") + } @@ -29546,28 +29413,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DoNotOverridePrivates.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DoNotOverridePrivates.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DoNotOverridePrivates.go --runtime-type-checking -@@ -40,10 +40,13 @@ - d, - ) - } - - func (d *jsiiProxy_DoNotOverridePrivates) ChangePrivatePropertyValue(newValue *string) { -+ if err := d.validateChangePrivatePropertyValueParameters(newValue); err != nil { -+ panic(err) -+ } - _jsii_.InvokeVoid( - d, - "changePrivatePropertyValue", - []interface{}{newValue}, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DoNotOverridePrivates__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DoNotOverridePrivates__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DoNotOverridePrivates__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExperimentalClass__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ExperimentalClass__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ExperimentalClass__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -29576,15 +29424,34 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (d *jsiiProxy_DoNotOverridePrivates) validateChangePrivatePropertyValueParameters(newValue *string) error { ++func validateNewExperimentalClassParameters(readonlyString *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DoNotOverridePrivates__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DoNotOverridePrivates__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DoNotOverridePrivates__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExportedBaseClass.go.diff 1`] = ` +--- go/jsiicalc/ExportedBaseClass.go --no-runtime-type-checking ++++ go/jsiicalc/ExportedBaseClass.go --runtime-type-checking +@@ -27,10 +27,13 @@ + + + func NewExportedBaseClass(success *bool) ExportedBaseClass { + _init_.Initialize() + ++ if err := validateNewExportedBaseClassParameters(success); err != nil { ++ panic(err) ++ } + j := jsiiProxy_ExportedBaseClass{} + + _jsii_.Create( + "jsii-calc.ExportedBaseClass", + []interface{}{success}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExportedBaseClass__checks.go.diff 1`] = ` +--- go/jsiicalc/ExportedBaseClass__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ExportedBaseClass__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -29595,9 +29462,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (d *jsiiProxy_DoNotOverridePrivates) validateChangePrivatePropertyValueParameters(newValue *string) error { -+ if newValue == nil { -+ return fmt.Errorf("parameter newValue is required, but nil was provided") ++func validateNewExportedBaseClassParameters(success *bool) error { ++ if success == nil { ++ return fmt.Errorf("parameter success is required, but nil was provided") + } + + return nil @@ -29605,28 +29472,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DoNotRecognizeAnyAsOptional.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DoNotRecognizeAnyAsOptional.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DoNotRecognizeAnyAsOptional.go --runtime-type-checking -@@ -39,10 +39,13 @@ - d, - ) - } - - func (d *jsiiProxy_DoNotRecognizeAnyAsOptional) Method(_requiredAny interface{}, _optionalAny interface{}, _optionalString *string) { -+ if err := d.validateMethodParameters(_requiredAny); err != nil { -+ panic(err) -+ } - _jsii_.InvokeVoid( - d, - "method", - []interface{}{_requiredAny, _optionalAny, _optionalString}, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DoNotRecognizeAnyAsOptional__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DoNotRecognizeAnyAsOptional__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DoNotRecognizeAnyAsOptional__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExportedBaseClass__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ExportedBaseClass__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ExportedBaseClass__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -29635,15 +29483,34 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (d *jsiiProxy_DoNotRecognizeAnyAsOptional) validateMethodParameters(_requiredAny interface{}) error { ++func validateNewExportedBaseClassParameters(success *bool) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DoNotRecognizeAnyAsOptional__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DoNotRecognizeAnyAsOptional__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DoNotRecognizeAnyAsOptional__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExternalClass.go.diff 1`] = ` +--- go/jsiicalc/ExternalClass.go --no-runtime-type-checking ++++ go/jsiicalc/ExternalClass.go --runtime-type-checking +@@ -40,10 +40,13 @@ + + + func NewExternalClass(readonlyString *string, mutableNumber *float64) ExternalClass { + _init_.Initialize() + ++ if err := validateNewExternalClassParameters(readonlyString); err != nil { ++ panic(err) ++ } + j := jsiiProxy_ExternalClass{} + + _jsii_.Create( + "jsii-calc.ExternalClass", + []interface{}{readonlyString, mutableNumber}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExternalClass__checks.go.diff 1`] = ` +--- go/jsiicalc/ExternalClass__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ExternalClass__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -29654,9 +29521,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (d *jsiiProxy_DoNotRecognizeAnyAsOptional) validateMethodParameters(_requiredAny interface{}) error { -+ if _requiredAny == nil { -+ return fmt.Errorf("parameter _requiredAny is required, but nil was provided") ++func validateNewExternalClassParameters(readonlyString *string) error { ++ if readonlyString == nil { ++ return fmt.Errorf("parameter readonlyString is required, but nil was provided") + } + + return nil @@ -29664,28 +29531,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DocumentedClass.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DocumentedClass.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DocumentedClass.go --runtime-type-checking -@@ -62,10 +62,13 @@ - d, - ) - } - - func (d *jsiiProxy_DocumentedClass) Greet(greetee *Greetee) *float64 { -+ if err := d.validateGreetParameters(greetee); err != nil { -+ panic(err) -+ } - var returns *float64 - - _jsii_.Invoke( - d, - "greet", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DocumentedClass__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DocumentedClass__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DocumentedClass__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ExternalClass__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ExternalClass__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ExternalClass__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -29694,82 +29542,114 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (d *jsiiProxy_DocumentedClass) validateGreetParameters(greetee *Greetee) error { ++func validateNewExternalClassParameters(readonlyString *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DocumentedClass__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DocumentedClass__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DocumentedClass__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/GiveMeStructs.go.diff 1`] = ` +--- go/jsiicalc/GiveMeStructs.go --no-runtime-type-checking ++++ go/jsiicalc/GiveMeStructs.go --runtime-type-checking +@@ -57,10 +57,13 @@ + g, + ) + } + + func (g *jsiiProxy_GiveMeStructs) DerivedToFirst(derived *DerivedStruct) *scopejsiicalclib.MyFirstStruct { ++ if err := g.validateDerivedToFirstParameters(derived); err != nil { ++ panic(err) ++ } + var returns *scopejsiicalclib.MyFirstStruct + + _jsii_.Invoke( + g, + "derivedToFirst", +@@ -70,10 +73,13 @@ + + return returns + } + + func (g *jsiiProxy_GiveMeStructs) ReadDerivedNonPrimitive(derived *DerivedStruct) DoubleTrouble { ++ if err := g.validateReadDerivedNonPrimitiveParameters(derived); err != nil { ++ panic(err) ++ } + var returns DoubleTrouble + + _jsii_.Invoke( + g, + "readDerivedNonPrimitive", +@@ -83,10 +89,13 @@ + + return returns + } + + func (g *jsiiProxy_GiveMeStructs) ReadFirstNumber(first *scopejsiicalclib.MyFirstStruct) *float64 { ++ if err := g.validateReadFirstNumberParameters(first); err != nil { ++ panic(err) ++ } + var returns *float64 + + _jsii_.Invoke( + g, + "readFirstNumber", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/GiveMeStructs__checks.go.diff 1`] = ` +--- go/jsiicalc/GiveMeStructs__checks.go --no-runtime-type-checking ++++ go/jsiicalc/GiveMeStructs__checks.go --runtime-type-checking +@@ -0,0 +1,46 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + +import ( ++ "fmt" ++ + _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++ ++ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + -+func (d *jsiiProxy_DocumentedClass) validateGreetParameters(greetee *Greetee) error { -+ if err := _jsii_.ValidateStruct(greetee, func() string { return "parameter greetee" }); err != nil { ++func (g *jsiiProxy_GiveMeStructs) validateDerivedToFirstParameters(derived *DerivedStruct) error { ++ if derived == nil { ++ return fmt.Errorf("parameter derived is required, but nil was provided") ++ } ++ if err := _jsii_.ValidateStruct(derived, func() string { return "parameter derived" }); err != nil { + return err + } + + return nil +} + -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DynamicPropertyBearer.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DynamicPropertyBearer.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DynamicPropertyBearer.go --runtime-type-checking -@@ -41,10 +41,13 @@ - - - func NewDynamicPropertyBearer(valueStore *string) DynamicPropertyBearer { - _init_.Initialize() - -+ if err := validateNewDynamicPropertyBearerParameters(valueStore); err != nil { -+ panic(err) ++func (g *jsiiProxy_GiveMeStructs) validateReadDerivedNonPrimitiveParameters(derived *DerivedStruct) error { ++ if derived == nil { ++ return fmt.Errorf("parameter derived is required, but nil was provided") + } - j := jsiiProxy_DynamicPropertyBearer{} - - _jsii_.Create( - "jsii-calc.DynamicPropertyBearer", - []interface{}{valueStore}, -@@ -63,18 +66,24 @@ - d, - ) - } - - func (j *jsiiProxy_DynamicPropertyBearer)SetDynamicProperty(val *string) { -+ if err := j.validateSetDynamicPropertyParameters(val); err != nil { -+ panic(err) ++ if err := _jsii_.ValidateStruct(derived, func() string { return "parameter derived" }); err != nil { ++ return err ++ } ++ ++ return nil ++} ++ ++func (g *jsiiProxy_GiveMeStructs) validateReadFirstNumberParameters(first *scopejsiicalclib.MyFirstStruct) error { ++ if first == nil { ++ return fmt.Errorf("parameter first is required, but nil was provided") + } - _jsii_.Set( - j, - "dynamicProperty", - val, - ) - } - - func (j *jsiiProxy_DynamicPropertyBearer)SetValueStore(val *string) { -+ if err := j.validateSetValueStoreParameters(val); err != nil { -+ panic(err) ++ if err := _jsii_.ValidateStruct(first, func() string { return "parameter first" }); err != nil { ++ return err + } - _jsii_.Set( - j, - "valueStore", - val, - ) ++ ++ return nil ++} ++ `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DynamicPropertyBearer__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DynamicPropertyBearer__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DynamicPropertyBearer__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/GiveMeStructs__no_checks.go.diff 1`] = ` +--- go/jsiicalc/GiveMeStructs__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/GiveMeStructs__no_checks.go --runtime-type-checking @@ -0,0 +1,19 @@ +//go:build no_runtime_type_checking + @@ -29778,24 +29658,43 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (j *jsiiProxy_DynamicPropertyBearer) validateSetDynamicPropertyParameters(val *string) error { ++func (g *jsiiProxy_GiveMeStructs) validateDerivedToFirstParameters(derived *DerivedStruct) error { + return nil +} + -+func (j *jsiiProxy_DynamicPropertyBearer) validateSetValueStoreParameters(val *string) error { ++func (g *jsiiProxy_GiveMeStructs) validateReadDerivedNonPrimitiveParameters(derived *DerivedStruct) error { + return nil +} + -+func validateNewDynamicPropertyBearerParameters(valueStore *string) error { ++func (g *jsiiProxy_GiveMeStructs) validateReadFirstNumberParameters(first *scopejsiicalclib.MyFirstStruct) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DynamicPropertyBearer__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DynamicPropertyBearer__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DynamicPropertyBearer__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,33 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/GreetingAugmenter.go.diff 1`] = ` +--- go/jsiicalc/GreetingAugmenter.go --no-runtime-type-checking ++++ go/jsiicalc/GreetingAugmenter.go --runtime-type-checking +@@ -40,10 +40,13 @@ + g, + ) + } + + func (g *jsiiProxy_GreetingAugmenter) BetterGreeting(friendly scopejsiicalclib.IFriendly) *string { ++ if err := g.validateBetterGreetingParameters(friendly); err != nil { ++ panic(err) ++ } + var returns *string + + _jsii_.Invoke( + g, + "betterGreeting", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/GreetingAugmenter__checks.go.diff 1`] = ` +--- go/jsiicalc/GreetingAugmenter__checks.go --no-runtime-type-checking ++++ go/jsiicalc/GreetingAugmenter__checks.go --runtime-type-checking +@@ -0,0 +1,19 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -29803,122 +29702,119 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" ++ ++ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + -+func (j *jsiiProxy_DynamicPropertyBearer) validateSetDynamicPropertyParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func (g *jsiiProxy_GreetingAugmenter) validateBetterGreetingParameters(friendly scopejsiicalclib.IFriendly) error { ++ if friendly == nil { ++ return fmt.Errorf("parameter friendly is required, but nil was provided") + } + + return nil +} + -+func (j *jsiiProxy_DynamicPropertyBearer) validateSetValueStoreParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/GreetingAugmenter__no_checks.go.diff 1`] = ` +--- go/jsiicalc/GreetingAugmenter__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/GreetingAugmenter__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking + -+ return nil -+} ++// A simple calcuator built on JSII. ++package jsiicalc + -+func validateNewDynamicPropertyBearerParameters(valueStore *string) error { -+ if valueStore == nil { -+ return fmt.Errorf("parameter valueStore is required, but nil was provided") -+ } ++// Building without runtime type checking enabled, so all the below just return nil + ++func (g *jsiiProxy_GreetingAugmenter) validateBetterGreetingParameters(friendly scopejsiicalclib.IFriendly) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DynamicPropertyBearerChild.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DynamicPropertyBearerChild.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DynamicPropertyBearerChild.go --runtime-type-checking -@@ -56,10 +56,13 @@ - - - func NewDynamicPropertyBearerChild(originalValue *string) DynamicPropertyBearerChild { - _init_.Initialize() - -+ if err := validateNewDynamicPropertyBearerChildParameters(originalValue); err != nil { -+ panic(err) -+ } - j := jsiiProxy_DynamicPropertyBearerChild{} - - _jsii_.Create( - "jsii-calc.DynamicPropertyBearerChild", - []interface{}{originalValue}, -@@ -78,26 +81,35 @@ - d, - ) - } - - func (j *jsiiProxy_DynamicPropertyBearerChild)SetDynamicProperty(val *string) { -+ if err := j.validateSetDynamicPropertyParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "dynamicProperty", - val, +exports[`Generated code for "jsii-calc": /go/jsiicalc/IAnotherPublicInterface.go.diff 1`] = ` +--- go/jsiicalc/IAnotherPublicInterface.go --no-runtime-type-checking ++++ go/jsiicalc/IAnotherPublicInterface.go --runtime-type-checking +@@ -24,10 +24,13 @@ ) + return returns } - func (j *jsiiProxy_DynamicPropertyBearerChild)SetValueStore(val *string) { -+ if err := j.validateSetValueStoreParameters(val); err != nil { + func (j *jsiiProxy_IAnotherPublicInterface)SetA(val *string) { ++ if err := j.validateSetAParameters(val); err != nil { + panic(err) + } _jsii_.Set( j, - "valueStore", + "a", val, ) - } - - func (d *jsiiProxy_DynamicPropertyBearerChild) OverrideValue(newValue *string) *string { -+ if err := d.validateOverrideValueParameters(newValue); err != nil { -+ panic(err) -+ } - var returns *string - - _jsii_.Invoke( - d, - "overrideValue", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DynamicPropertyBearerChild__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DynamicPropertyBearerChild__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DynamicPropertyBearerChild__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,23 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/IAnotherPublicInterface__checks.go.diff 1`] = ` +--- go/jsiicalc/IAnotherPublicInterface__checks.go --no-runtime-type-checking ++++ go/jsiicalc/IAnotherPublicInterface__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) + -+func (d *jsiiProxy_DynamicPropertyBearerChild) validateOverrideValueParameters(newValue *string) error { -+ return nil -+} ++func (j *jsiiProxy_IAnotherPublicInterface) validateSetAParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } + -+func (j *jsiiProxy_DynamicPropertyBearerChild) validateSetDynamicPropertyParameters(val *string) error { + return nil +} + -+func (j *jsiiProxy_DynamicPropertyBearerChild) validateSetValueStoreParameters(val *string) error { -+ return nil -+} +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IAnotherPublicInterface__no_checks.go.diff 1`] = ` +--- go/jsiicalc/IAnotherPublicInterface__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/IAnotherPublicInterface__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking + -+func validateNewDynamicPropertyBearerChildParameters(originalValue *string) error { ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (j *jsiiProxy_IAnotherPublicInterface) validateSetAParameters(val *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DynamicPropertyBearerChild__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_DynamicPropertyBearerChild__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_DynamicPropertyBearerChild__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,41 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/IBellRinger.go.diff 1`] = ` +--- go/jsiicalc/IBellRinger.go --no-runtime-type-checking ++++ go/jsiicalc/IBellRinger.go --runtime-type-checking +@@ -14,10 +14,13 @@ + type jsiiProxy_IBellRinger struct { + _ byte // padding + } + + func (i *jsiiProxy_IBellRinger) YourTurn(bell IBell) { ++ if err := i.validateYourTurnParameters(bell); err != nil { ++ panic(err) ++ } + _jsii_.InvokeVoid( + i, + "yourTurn", + []interface{}{bell}, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IBellRinger__checks.go.diff 1`] = ` +--- go/jsiicalc/IBellRinger__checks.go --no-runtime-type-checking ++++ go/jsiicalc/IBellRinger__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -29928,84 +29824,115 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (d *jsiiProxy_DynamicPropertyBearerChild) validateOverrideValueParameters(newValue *string) error { -+ if newValue == nil { -+ return fmt.Errorf("parameter newValue is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -+func (j *jsiiProxy_DynamicPropertyBearerChild) validateSetDynamicPropertyParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func (i *jsiiProxy_IBellRinger) validateYourTurnParameters(bell IBell) error { ++ if bell == nil { ++ return fmt.Errorf("parameter bell is required, but nil was provided") + } + + return nil +} + -+func (j *jsiiProxy_DynamicPropertyBearerChild) validateSetValueStoreParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IBellRinger__no_checks.go.diff 1`] = ` +--- go/jsiicalc/IBellRinger__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/IBellRinger__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking + -+ return nil -+} ++// A simple calcuator built on JSII. ++package jsiicalc + -+func validateNewDynamicPropertyBearerChildParameters(originalValue *string) error { -+ if originalValue == nil { -+ return fmt.Errorf("parameter originalValue is required, but nil was provided") -+ } ++// Building without runtime type checking enabled, so all the below just return nil + ++func (i *jsiiProxy_IBellRinger) validateYourTurnParameters(bell IBell) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Entropy.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Entropy.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Entropy.go --runtime-type-checking -@@ -46,10 +46,13 @@ - - return returns +exports[`Generated code for "jsii-calc": /go/jsiicalc/IConcreteBellRinger.go.diff 1`] = ` +--- go/jsiicalc/IConcreteBellRinger.go --no-runtime-type-checking ++++ go/jsiicalc/IConcreteBellRinger.go --runtime-type-checking +@@ -14,10 +14,13 @@ + type jsiiProxy_IConcreteBellRinger struct { + _ byte // padding } - func (e *jsiiProxy_Entropy) Repeat(word *string) *string { -+ if err := e.validateRepeatParameters(word); err != nil { + func (i *jsiiProxy_IConcreteBellRinger) YourTurn(bell Bell) { ++ if err := i.validateYourTurnParameters(bell); err != nil { + panic(err) + } - var returns *string - - _jsii_.Invoke( - e, - "repeat", + _jsii_.InvokeVoid( + i, + "yourTurn", + []interface{}{bell}, + ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Entropy__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Entropy__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Entropy__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,15 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/IConcreteBellRinger__checks.go.diff 1`] = ` +--- go/jsiicalc/IConcreteBellRinger__checks.go --no-runtime-type-checking ++++ go/jsiicalc/IConcreteBellRinger__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) ++ ++func (i *jsiiProxy_IConcreteBellRinger) validateYourTurnParameters(bell Bell) error { ++ if bell == nil { ++ return fmt.Errorf("parameter bell is required, but nil was provided") ++ } + -+func (e *jsiiProxy_Entropy) validateRepeatParameters(word *string) error { + return nil +} + -+func validateNewEntropyParameters(clock IWallClock) error { +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IConcreteBellRinger__no_checks.go.diff 1`] = ` +--- go/jsiicalc/IConcreteBellRinger__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/IConcreteBellRinger__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (i *jsiiProxy_IConcreteBellRinger) validateYourTurnParameters(bell Bell) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Entropy__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Entropy__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Entropy__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,25 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/IExtendsPrivateInterface.go.diff 1`] = ` +--- go/jsiicalc/IExtendsPrivateInterface.go --no-runtime-type-checking ++++ go/jsiicalc/IExtendsPrivateInterface.go --runtime-type-checking +@@ -35,10 +35,13 @@ + ) + return returns + } + + func (j *jsiiProxy_IExtendsPrivateInterface)SetPrivate(val *string) { ++ if err := j.validateSetPrivateParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "private", + val, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IExtendsPrivateInterface__checks.go.diff 1`] = ` +--- go/jsiicalc/IExtendsPrivateInterface__checks.go --no-runtime-type-checking ++++ go/jsiicalc/IExtendsPrivateInterface__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -30015,17 +29942,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (e *jsiiProxy_Entropy) validateRepeatParameters(word *string) error { -+ if word == nil { -+ return fmt.Errorf("parameter word is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -+func validateNewEntropyParameters(clock IWallClock) error { -+ if clock == nil { -+ return fmt.Errorf("parameter clock is required, but nil was provided") ++func (j *jsiiProxy_IExtendsPrivateInterface) validateSetPrivateParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil @@ -30033,28 +29952,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_EraseUndefinedHashValues.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_EraseUndefinedHashValues.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_EraseUndefinedHashValues.go --runtime-type-checking -@@ -43,10 +43,13 @@ - // Used to check that undefined/null hash values - // are being erased when sending values from native code to JS. - func EraseUndefinedHashValues_DoesKeyExist(opts *EraseUndefinedHashValuesOptions, key *string) *bool { - _init_.Initialize() - -+ if err := validateEraseUndefinedHashValues_DoesKeyExistParameters(opts, key); err != nil { -+ panic(err) -+ } - var returns *bool - - _jsii_.StaticInvoke( - "jsii-calc.EraseUndefinedHashValues", - "doesKeyExist", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_EraseUndefinedHashValues__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_EraseUndefinedHashValues__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_EraseUndefinedHashValues__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/IExtendsPrivateInterface__no_checks.go.diff 1`] = ` +--- go/jsiicalc/IExtendsPrivateInterface__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/IExtendsPrivateInterface__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -30063,16 +29963,35 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateEraseUndefinedHashValues_DoesKeyExistParameters(opts *EraseUndefinedHashValuesOptions, key *string) error { ++func (j *jsiiProxy_IExtendsPrivateInterface) validateSetPrivateParameters(val *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_EraseUndefinedHashValues__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_EraseUndefinedHashValues__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_EraseUndefinedHashValues__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,26 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceWithOptionalMethodArguments.go.diff 1`] = ` +--- go/jsiicalc/IInterfaceWithOptionalMethodArguments.go --no-runtime-type-checking ++++ go/jsiicalc/IInterfaceWithOptionalMethodArguments.go --runtime-type-checking +@@ -14,10 +14,13 @@ + type jsiiProxy_IInterfaceWithOptionalMethodArguments struct { + _ byte // padding + } + + func (i *jsiiProxy_IInterfaceWithOptionalMethodArguments) Hello(arg1 *string, arg2 *float64) { ++ if err := i.validateHelloParameters(arg1); err != nil { ++ panic(err) ++ } + _jsii_.InvokeVoid( + i, + "hello", + []interface{}{arg1, arg2}, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceWithOptionalMethodArguments__checks.go.diff 1`] = ` +--- go/jsiicalc/IInterfaceWithOptionalMethodArguments__checks.go --no-runtime-type-checking ++++ go/jsiicalc/IInterfaceWithOptionalMethodArguments__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -30080,20 +29999,11 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" -+ -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func validateEraseUndefinedHashValues_DoesKeyExistParameters(opts *EraseUndefinedHashValuesOptions, key *string) error { -+ if opts == nil { -+ return fmt.Errorf("parameter opts is required, but nil was provided") -+ } -+ if err := _jsii_.ValidateStruct(opts, func() string { return "parameter opts" }); err != nil { -+ return err -+ } -+ -+ if key == nil { -+ return fmt.Errorf("parameter key is required, but nil was provided") ++func (i *jsiiProxy_IInterfaceWithOptionalMethodArguments) validateHelloParameters(arg1 *string) error { ++ if arg1 == nil { ++ return fmt.Errorf("parameter arg1 is required, but nil was provided") + } + + return nil @@ -30101,28 +30011,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExperimentalClass.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ExperimentalClass.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ExperimentalClass.go --runtime-type-checking -@@ -46,10 +46,13 @@ - - // Experimental. - func NewExperimentalClass(readonlyString *string, mutableNumber *float64) ExperimentalClass { - _init_.Initialize() - -+ if err := validateNewExperimentalClassParameters(readonlyString); err != nil { -+ panic(err) -+ } - j := jsiiProxy_ExperimentalClass{} - - _jsii_.Create( - "jsii-calc.ExperimentalClass", - []interface{}{readonlyString, mutableNumber}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExperimentalClass__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ExperimentalClass__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ExperimentalClass__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceWithOptionalMethodArguments__no_checks.go.diff 1`] = ` +--- go/jsiicalc/IInterfaceWithOptionalMethodArguments__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/IInterfaceWithOptionalMethodArguments__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -30131,15 +30022,34 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewExperimentalClassParameters(readonlyString *string) error { ++func (i *jsiiProxy_IInterfaceWithOptionalMethodArguments) validateHelloParameters(arg1 *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExperimentalClass__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ExperimentalClass__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ExperimentalClass__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceWithProperties.go.diff 1`] = ` +--- go/jsiicalc/IInterfaceWithProperties.go --no-runtime-type-checking ++++ go/jsiicalc/IInterfaceWithProperties.go --runtime-type-checking +@@ -35,10 +35,13 @@ + ) + return returns + } + + func (j *jsiiProxy_IInterfaceWithProperties)SetReadWriteString(val *string) { ++ if err := j.validateSetReadWriteStringParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "readWriteString", + val, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceWithProperties__checks.go.diff 1`] = ` +--- go/jsiicalc/IInterfaceWithProperties__checks.go --no-runtime-type-checking ++++ go/jsiicalc/IInterfaceWithProperties__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -30150,9 +30060,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func validateNewExperimentalClassParameters(readonlyString *string) error { -+ if readonlyString == nil { -+ return fmt.Errorf("parameter readonlyString is required, but nil was provided") ++func (j *jsiiProxy_IInterfaceWithProperties) validateSetReadWriteStringParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil @@ -30160,28 +30070,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExportedBaseClass.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ExportedBaseClass.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ExportedBaseClass.go --runtime-type-checking -@@ -27,10 +27,13 @@ - - - func NewExportedBaseClass(success *bool) ExportedBaseClass { - _init_.Initialize() - -+ if err := validateNewExportedBaseClassParameters(success); err != nil { -+ panic(err) -+ } - j := jsiiProxy_ExportedBaseClass{} - - _jsii_.Create( - "jsii-calc.ExportedBaseClass", - []interface{}{success}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExportedBaseClass__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ExportedBaseClass__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ExportedBaseClass__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceWithProperties__no_checks.go.diff 1`] = ` +--- go/jsiicalc/IInterfaceWithProperties__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/IInterfaceWithProperties__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -30190,15 +30081,34 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewExportedBaseClassParameters(success *bool) error { ++func (j *jsiiProxy_IInterfaceWithProperties) validateSetReadWriteStringParameters(val *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExportedBaseClass__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ExportedBaseClass__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ExportedBaseClass__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceWithPropertiesExtension.go.diff 1`] = ` +--- go/jsiicalc/IInterfaceWithPropertiesExtension.go --no-runtime-type-checking ++++ go/jsiicalc/IInterfaceWithPropertiesExtension.go --runtime-type-checking +@@ -25,10 +25,13 @@ + ) + return returns + } + + func (j *jsiiProxy_IInterfaceWithPropertiesExtension)SetFoo(val *float64) { ++ if err := j.validateSetFooParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "foo", + val, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceWithPropertiesExtension__checks.go.diff 1`] = ` +--- go/jsiicalc/IInterfaceWithPropertiesExtension__checks.go --no-runtime-type-checking ++++ go/jsiicalc/IInterfaceWithPropertiesExtension__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -30209,9 +30119,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func validateNewExportedBaseClassParameters(success *bool) error { -+ if success == nil { -+ return fmt.Errorf("parameter success is required, but nil was provided") ++func (j *jsiiProxy_IInterfaceWithPropertiesExtension) validateSetFooParameters(val *float64) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil @@ -30219,28 +30129,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExternalClass.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ExternalClass.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ExternalClass.go --runtime-type-checking -@@ -40,10 +40,13 @@ - - - func NewExternalClass(readonlyString *string, mutableNumber *float64) ExternalClass { - _init_.Initialize() - -+ if err := validateNewExternalClassParameters(readonlyString); err != nil { -+ panic(err) -+ } - j := jsiiProxy_ExternalClass{} - - _jsii_.Create( - "jsii-calc.ExternalClass", - []interface{}{readonlyString, mutableNumber}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExternalClass__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ExternalClass__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ExternalClass__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/IInterfaceWithPropertiesExtension__no_checks.go.diff 1`] = ` +--- go/jsiicalc/IInterfaceWithPropertiesExtension__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/IInterfaceWithPropertiesExtension__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -30249,15 +30140,34 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewExternalClassParameters(readonlyString *string) error { ++func (j *jsiiProxy_IInterfaceWithPropertiesExtension) validateSetFooParameters(val *float64) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ExternalClass__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ExternalClass__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ExternalClass__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/IMutableObjectLiteral.go.diff 1`] = ` +--- go/jsiicalc/IMutableObjectLiteral.go --no-runtime-type-checking ++++ go/jsiicalc/IMutableObjectLiteral.go --runtime-type-checking +@@ -24,10 +24,13 @@ + ) + return returns + } + + func (j *jsiiProxy_IMutableObjectLiteral)SetValue(val *string) { ++ if err := j.validateSetValueParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "value", + val, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IMutableObjectLiteral__checks.go.diff 1`] = ` +--- go/jsiicalc/IMutableObjectLiteral__checks.go --no-runtime-type-checking ++++ go/jsiicalc/IMutableObjectLiteral__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -30268,9 +30178,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func validateNewExternalClassParameters(readonlyString *string) error { -+ if readonlyString == nil { -+ return fmt.Errorf("parameter readonlyString is required, but nil was provided") ++func (j *jsiiProxy_IMutableObjectLiteral) validateSetValueParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil @@ -30278,57 +30188,91 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_GiveMeStructs.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_GiveMeStructs.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_GiveMeStructs.go --runtime-type-checking -@@ -57,10 +57,13 @@ - g, +exports[`Generated code for "jsii-calc": /go/jsiicalc/IMutableObjectLiteral__no_checks.go.diff 1`] = ` +--- go/jsiicalc/IMutableObjectLiteral__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/IMutableObjectLiteral__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (j *jsiiProxy_IMutableObjectLiteral) validateSetValueParameters(val *string) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/INonInternalInterface.go.diff 1`] = ` +--- go/jsiicalc/INonInternalInterface.go --no-runtime-type-checking ++++ go/jsiicalc/INonInternalInterface.go --runtime-type-checking +@@ -27,10 +27,13 @@ ) - } - - func (g *jsiiProxy_GiveMeStructs) DerivedToFirst(derived *DerivedStruct) *scopejsiicalclib.MyFirstStruct { -+ if err := g.validateDerivedToFirstParameters(derived); err != nil { -+ panic(err) -+ } - var returns *scopejsiicalclib.MyFirstStruct - - _jsii_.Invoke( - g, - "derivedToFirst", -@@ -70,10 +73,13 @@ - return returns } - func (g *jsiiProxy_GiveMeStructs) ReadDerivedNonPrimitive(derived *DerivedStruct) DoubleTrouble { -+ if err := g.validateReadDerivedNonPrimitiveParameters(derived); err != nil { + func (j *jsiiProxy_INonInternalInterface)SetB(val *string) { ++ if err := j.validateSetBParameters(val); err != nil { + panic(err) + } - var returns DoubleTrouble - - _jsii_.Invoke( - g, - "readDerivedNonPrimitive", -@@ -83,10 +89,13 @@ - + _jsii_.Set( + j, + "b", + val, + ) +@@ -45,10 +48,13 @@ + ) return returns } - func (g *jsiiProxy_GiveMeStructs) ReadFirstNumber(first *scopejsiicalclib.MyFirstStruct) *float64 { -+ if err := g.validateReadFirstNumberParameters(first); err != nil { + func (j *jsiiProxy_INonInternalInterface)SetC(val *string) { ++ if err := j.validateSetCParameters(val); err != nil { + panic(err) + } - var returns *float64 - - _jsii_.Invoke( - g, - "readFirstNumber", + _jsii_.Set( + j, + "c", + val, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/INonInternalInterface__checks.go.diff 1`] = ` +--- go/jsiicalc/INonInternalInterface__checks.go --no-runtime-type-checking ++++ go/jsiicalc/INonInternalInterface__checks.go --runtime-type-checking +@@ -0,0 +1,25 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++import ( ++ "fmt" ++) ++ ++func (j *jsiiProxy_INonInternalInterface) validateSetBParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ ++ return nil ++} ++ ++func (j *jsiiProxy_INonInternalInterface) validateSetCParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ ++ return nil ++} ++ `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_GiveMeStructs__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_GiveMeStructs__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_GiveMeStructs__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,19 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/INonInternalInterface__no_checks.go.diff 1`] = ` +--- go/jsiicalc/INonInternalInterface__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/INonInternalInterface__no_checks.go --runtime-type-checking +@@ -0,0 +1,15 @@ +//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -30336,24 +30280,39 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (g *jsiiProxy_GiveMeStructs) validateDerivedToFirstParameters(derived *DerivedStruct) error { -+ return nil -+} -+ -+func (g *jsiiProxy_GiveMeStructs) validateReadDerivedNonPrimitiveParameters(derived *DerivedStruct) error { ++func (j *jsiiProxy_INonInternalInterface) validateSetBParameters(val *string) error { + return nil +} + -+func (g *jsiiProxy_GiveMeStructs) validateReadFirstNumberParameters(first *scopejsiicalclib.MyFirstStruct) error { ++func (j *jsiiProxy_INonInternalInterface) validateSetCParameters(val *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_GiveMeStructs__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_GiveMeStructs__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_GiveMeStructs__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,46 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/IObjectWithProperty.go.diff 1`] = ` +--- go/jsiicalc/IObjectWithProperty.go --no-runtime-type-checking ++++ go/jsiicalc/IObjectWithProperty.go --runtime-type-checking +@@ -39,10 +39,13 @@ + ) + return returns + } + + func (j *jsiiProxy_IObjectWithProperty)SetProperty(val *string) { ++ if err := j.validateSetPropertyParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "property", + val, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IObjectWithProperty__checks.go.diff 1`] = ` +--- go/jsiicalc/IObjectWithProperty__checks.go --no-runtime-type-checking ++++ go/jsiicalc/IObjectWithProperty__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -30361,130 +30320,139 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" -+ -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" -+ -+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + -+func (g *jsiiProxy_GiveMeStructs) validateDerivedToFirstParameters(derived *DerivedStruct) error { -+ if derived == nil { -+ return fmt.Errorf("parameter derived is required, but nil was provided") -+ } -+ if err := _jsii_.ValidateStruct(derived, func() string { return "parameter derived" }); err != nil { -+ return err ++func (j *jsiiProxy_IObjectWithProperty) validateSetPropertyParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil +} + -+func (g *jsiiProxy_GiveMeStructs) validateReadDerivedNonPrimitiveParameters(derived *DerivedStruct) error { -+ if derived == nil { -+ return fmt.Errorf("parameter derived is required, but nil was provided") -+ } -+ if err := _jsii_.ValidateStruct(derived, func() string { return "parameter derived" }); err != nil { -+ return err -+ } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/IObjectWithProperty__no_checks.go.diff 1`] = ` +--- go/jsiicalc/IObjectWithProperty__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/IObjectWithProperty__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking + -+ return nil -+} ++// A simple calcuator built on JSII. ++package jsiicalc + -+func (g *jsiiProxy_GiveMeStructs) validateReadFirstNumberParameters(first *scopejsiicalclib.MyFirstStruct) error { -+ if first == nil { -+ return fmt.Errorf("parameter first is required, but nil was provided") -+ } -+ if err := _jsii_.ValidateStruct(first, func() string { return "parameter first" }); err != nil { -+ return err -+ } ++// Building without runtime type checking enabled, so all the below just return nil + ++func (j *jsiiProxy_IObjectWithProperty) validateSetPropertyParameters(val *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_GreetingAugmenter.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_GreetingAugmenter.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_GreetingAugmenter.go --runtime-type-checking -@@ -40,10 +40,13 @@ - g, +exports[`Generated code for "jsii-calc": /go/jsiicalc/ImplementInternalInterface.go.diff 1`] = ` +--- go/jsiicalc/ImplementInternalInterface.go --no-runtime-type-checking ++++ go/jsiicalc/ImplementInternalInterface.go --runtime-type-checking +@@ -50,10 +50,13 @@ + i, ) } - func (g *jsiiProxy_GreetingAugmenter) BetterGreeting(friendly scopejsiicalclib.IFriendly) *string { -+ if err := g.validateBetterGreetingParameters(friendly); err != nil { + func (j *jsiiProxy_ImplementInternalInterface)SetProp(val *string) { ++ if err := j.validateSetPropParameters(val); err != nil { + panic(err) + } - var returns *string - - _jsii_.Invoke( - g, - "betterGreeting", + _jsii_.Set( + j, + "prop", + val, + ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_GreetingAugmenter__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_GreetingAugmenter__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_GreetingAugmenter__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ImplementInternalInterface__checks.go.diff 1`] = ` +--- go/jsiicalc/ImplementInternalInterface__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ImplementInternalInterface__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) ++ ++func (j *jsiiProxy_ImplementInternalInterface) validateSetPropParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } + -+func (g *jsiiProxy_GreetingAugmenter) validateBetterGreetingParameters(friendly scopejsiicalclib.IFriendly) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_GreetingAugmenter__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_GreetingAugmenter__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_GreetingAugmenter__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,19 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ImplementInternalInterface__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ImplementInternalInterface__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ImplementInternalInterface__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+import ( -+ "fmt" -+ -+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" -+) -+ -+func (g *jsiiProxy_GreetingAugmenter) validateBetterGreetingParameters(friendly scopejsiicalclib.IFriendly) error { -+ if friendly == nil { -+ return fmt.Errorf("parameter friendly is required, but nil was provided") -+ } ++// Building without runtime type checking enabled, so all the below just return nil + ++func (j *jsiiProxy_ImplementInternalInterface) validateSetPropParameters(val *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IAnotherPublicInterface.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IAnotherPublicInterface.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IAnotherPublicInterface.go --runtime-type-checking -@@ -24,10 +24,13 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/ImplementsPrivateInterface.go.diff 1`] = ` +--- go/jsiicalc/ImplementsPrivateInterface.go --no-runtime-type-checking ++++ go/jsiicalc/ImplementsPrivateInterface.go --runtime-type-checking +@@ -50,10 +50,13 @@ + i, ) - return returns } - func (j *jsiiProxy_IAnotherPublicInterface)SetA(val *string) { -+ if err := j.validateSetAParameters(val); err != nil { + func (j *jsiiProxy_ImplementsPrivateInterface)SetPrivate(val *string) { ++ if err := j.validateSetPrivateParameters(val); err != nil { + panic(err) + } _jsii_.Set( j, - "a", + "private", val, ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IAnotherPublicInterface__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IAnotherPublicInterface__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IAnotherPublicInterface__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ImplementsPrivateInterface__checks.go.diff 1`] = ` +--- go/jsiicalc/ImplementsPrivateInterface__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ImplementsPrivateInterface__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++import ( ++ "fmt" ++) ++ ++func (j *jsiiProxy_ImplementsPrivateInterface) validateSetPrivateParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ImplementsPrivateInterface__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ImplementsPrivateInterface__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ImplementsPrivateInterface__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -30493,15 +30461,34 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (j *jsiiProxy_IAnotherPublicInterface) validateSetAParameters(val *string) error { ++func (j *jsiiProxy_ImplementsPrivateInterface) validateSetPrivateParameters(val *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IAnotherPublicInterface__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IAnotherPublicInterface__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IAnotherPublicInterface__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/InterfacesMaker.go.diff 1`] = ` +--- go/jsiicalc/InterfacesMaker.go --no-runtime-type-checking ++++ go/jsiicalc/InterfacesMaker.go --runtime-type-checking +@@ -18,10 +18,13 @@ + } + + func InterfacesMaker_MakeInterfaces(count *float64) *[]scopejsiicalclib.IDoublable { + _init_.Initialize() + ++ if err := validateInterfacesMaker_MakeInterfacesParameters(count); err != nil { ++ panic(err) ++ } + var returns *[]scopejsiicalclib.IDoublable + + _jsii_.StaticInvoke( + "jsii-calc.InterfacesMaker", + "makeInterfaces", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/InterfacesMaker__checks.go.diff 1`] = ` +--- go/jsiicalc/InterfacesMaker__checks.go --no-runtime-type-checking ++++ go/jsiicalc/InterfacesMaker__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -30512,9 +30499,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (j *jsiiProxy_IAnotherPublicInterface) validateSetAParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func validateInterfacesMaker_MakeInterfacesParameters(count *float64) error { ++ if count == nil { ++ return fmt.Errorf("parameter count is required, but nil was provided") + } + + return nil @@ -30522,28 +30509,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IBellRinger.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IBellRinger.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IBellRinger.go --runtime-type-checking -@@ -14,10 +14,13 @@ - type jsiiProxy_IBellRinger struct { - _ byte // padding - } - - func (i *jsiiProxy_IBellRinger) YourTurn(bell IBell) { -+ if err := i.validateYourTurnParameters(bell); err != nil { -+ panic(err) -+ } - _jsii_.InvokeVoid( - i, - "yourTurn", - []interface{}{bell}, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IBellRinger__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IBellRinger__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IBellRinger__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/InterfacesMaker__no_checks.go.diff 1`] = ` +--- go/jsiicalc/InterfacesMaker__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/InterfacesMaker__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -30552,15 +30520,34 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (i *jsiiProxy_IBellRinger) validateYourTurnParameters(bell IBell) error { ++func validateInterfacesMaker_MakeInterfacesParameters(count *float64) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IBellRinger__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IBellRinger__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IBellRinger__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/JSII417Derived.go.diff 1`] = ` +--- go/jsiicalc/JSII417Derived.go --no-runtime-type-checking ++++ go/jsiicalc/JSII417Derived.go --runtime-type-checking +@@ -42,10 +42,13 @@ + + + func NewJSII417Derived(property *string) JSII417Derived { + _init_.Initialize() + ++ if err := validateNewJSII417DerivedParameters(property); err != nil { ++ panic(err) ++ } + j := jsiiProxy_JSII417Derived{} + + _jsii_.Create( + "jsii-calc.JSII417Derived", + []interface{}{property}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/JSII417Derived__checks.go.diff 1`] = ` +--- go/jsiicalc/JSII417Derived__checks.go --no-runtime-type-checking ++++ go/jsiicalc/JSII417Derived__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -30571,9 +30558,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (i *jsiiProxy_IBellRinger) validateYourTurnParameters(bell IBell) error { -+ if bell == nil { -+ return fmt.Errorf("parameter bell is required, but nil was provided") ++func validateNewJSII417DerivedParameters(property *string) error { ++ if property == nil { ++ return fmt.Errorf("parameter property is required, but nil was provided") + } + + return nil @@ -30581,28 +30568,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IConcreteBellRinger.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IConcreteBellRinger.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IConcreteBellRinger.go --runtime-type-checking -@@ -14,10 +14,13 @@ - type jsiiProxy_IConcreteBellRinger struct { - _ byte // padding - } - - func (i *jsiiProxy_IConcreteBellRinger) YourTurn(bell Bell) { -+ if err := i.validateYourTurnParameters(bell); err != nil { -+ panic(err) -+ } - _jsii_.InvokeVoid( - i, - "yourTurn", - []interface{}{bell}, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IConcreteBellRinger__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IConcreteBellRinger__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IConcreteBellRinger__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/JSII417Derived__no_checks.go.diff 1`] = ` +--- go/jsiicalc/JSII417Derived__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/JSII417Derived__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -30611,16 +30579,46 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (i *jsiiProxy_IConcreteBellRinger) validateYourTurnParameters(bell Bell) error { ++func validateNewJSII417DerivedParameters(property *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IConcreteBellRinger__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IConcreteBellRinger__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IConcreteBellRinger__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/JSObjectLiteralToNativeClass.go.diff 1`] = ` +--- go/jsiicalc/JSObjectLiteralToNativeClass.go --no-runtime-type-checking ++++ go/jsiicalc/JSObjectLiteralToNativeClass.go --runtime-type-checking +@@ -62,18 +62,24 @@ + j, + ) + } + + func (j *jsiiProxy_JSObjectLiteralToNativeClass)SetPropA(val *string) { ++ if err := j.validateSetPropAParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "propA", + val, + ) + } + + func (j *jsiiProxy_JSObjectLiteralToNativeClass)SetPropB(val *float64) { ++ if err := j.validateSetPropBParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "propB", + val, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/JSObjectLiteralToNativeClass__checks.go.diff 1`] = ` +--- go/jsiicalc/JSObjectLiteralToNativeClass__checks.go --no-runtime-type-checking ++++ go/jsiicalc/JSObjectLiteralToNativeClass__checks.go --runtime-type-checking +@@ -0,0 +1,25 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -30630,9 +30628,17 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (i *jsiiProxy_IConcreteBellRinger) validateYourTurnParameters(bell Bell) error { -+ if bell == nil { -+ return fmt.Errorf("parameter bell is required, but nil was provided") ++func (j *jsiiProxy_JSObjectLiteralToNativeClass) validateSetPropAParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ ++ return nil ++} ++ ++func (j *jsiiProxy_JSObjectLiteralToNativeClass) validateSetPropBParameters(val *float64) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil @@ -30640,28 +30646,72 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IExtendsPrivateInterface.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IExtendsPrivateInterface.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IExtendsPrivateInterface.go --runtime-type-checking -@@ -35,10 +35,13 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/JSObjectLiteralToNativeClass__no_checks.go.diff 1`] = ` +--- go/jsiicalc/JSObjectLiteralToNativeClass__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/JSObjectLiteralToNativeClass__no_checks.go --runtime-type-checking +@@ -0,0 +1,15 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (j *jsiiProxy_JSObjectLiteralToNativeClass) validateSetPropAParameters(val *string) error { ++ return nil ++} ++ ++func (j *jsiiProxy_JSObjectLiteralToNativeClass) validateSetPropBParameters(val *float64) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/JavaReservedWords.go.diff 1`] = ` +--- go/jsiicalc/JavaReservedWords.go --no-runtime-type-checking ++++ go/jsiicalc/JavaReservedWords.go --runtime-type-checking +@@ -102,10 +102,13 @@ + j, ) - return returns } - func (j *jsiiProxy_IExtendsPrivateInterface)SetPrivate(val *string) { -+ if err := j.validateSetPrivateParameters(val); err != nil { + func (j *jsiiProxy_JavaReservedWords)SetWhile(val *string) { ++ if err := j.validateSetWhileParameters(val); err != nil { + panic(err) + } _jsii_.Set( j, - "private", + "while", val, ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IExtendsPrivateInterface__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IExtendsPrivateInterface__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IExtendsPrivateInterface__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/JavaReservedWords__checks.go.diff 1`] = ` +--- go/jsiicalc/JavaReservedWords__checks.go --no-runtime-type-checking ++++ go/jsiicalc/JavaReservedWords__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++import ( ++ "fmt" ++) ++ ++func (j *jsiiProxy_JavaReservedWords) validateSetWhileParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/JavaReservedWords__no_checks.go.diff 1`] = ` +--- go/jsiicalc/JavaReservedWords__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/JavaReservedWords__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -30670,16 +30720,35 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (j *jsiiProxy_IExtendsPrivateInterface) validateSetPrivateParameters(val *string) error { ++func (j *jsiiProxy_JavaReservedWords) validateSetWhileParameters(val *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IExtendsPrivateInterface__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IExtendsPrivateInterface__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IExtendsPrivateInterface__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/LevelOne.go.diff 1`] = ` +--- go/jsiicalc/LevelOne.go --no-runtime-type-checking ++++ go/jsiicalc/LevelOne.go --runtime-type-checking +@@ -28,10 +28,13 @@ + + + func NewLevelOne(props *LevelOneProps) LevelOne { + _init_.Initialize() + ++ if err := validateNewLevelOneParameters(props); err != nil { ++ panic(err) ++ } + j := jsiiProxy_LevelOne{} + + _jsii_.Create( + "jsii-calc.LevelOne", + []interface{}{props}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/LevelOne__checks.go.diff 1`] = ` +--- go/jsiicalc/LevelOne__checks.go --no-runtime-type-checking ++++ go/jsiicalc/LevelOne__checks.go --runtime-type-checking +@@ -0,0 +1,22 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -30687,11 +30756,16 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" ++ ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func (j *jsiiProxy_IExtendsPrivateInterface) validateSetPrivateParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func validateNewLevelOneParameters(props *LevelOneProps) error { ++ if props == nil { ++ return fmt.Errorf("parameter props is required, but nil was provided") ++ } ++ if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { ++ return err + } + + return nil @@ -30699,28 +30773,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceWithOptionalMethodArguments.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IInterfaceWithOptionalMethodArguments.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IInterfaceWithOptionalMethodArguments.go --runtime-type-checking -@@ -14,10 +14,13 @@ - type jsiiProxy_IInterfaceWithOptionalMethodArguments struct { - _ byte // padding - } - - func (i *jsiiProxy_IInterfaceWithOptionalMethodArguments) Hello(arg1 *string, arg2 *float64) { -+ if err := i.validateHelloParameters(arg1); err != nil { -+ panic(err) -+ } - _jsii_.InvokeVoid( - i, - "hello", - []interface{}{arg1, arg2}, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceWithOptionalMethodArguments__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IInterfaceWithOptionalMethodArguments__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IInterfaceWithOptionalMethodArguments__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/LevelOne__no_checks.go.diff 1`] = ` +--- go/jsiicalc/LevelOne__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/LevelOne__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -30729,16 +30784,35 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (i *jsiiProxy_IInterfaceWithOptionalMethodArguments) validateHelloParameters(arg1 *string) error { ++func validateNewLevelOneParameters(props *LevelOneProps) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceWithOptionalMethodArguments__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IInterfaceWithOptionalMethodArguments__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IInterfaceWithOptionalMethodArguments__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/Multiply.go.diff 1`] = ` +--- go/jsiicalc/Multiply.go --no-runtime-type-checking ++++ go/jsiicalc/Multiply.go --runtime-type-checking +@@ -73,10 +73,13 @@ + + // Creates a BinaryOperation. + func NewMultiply(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) Multiply { + _init_.Initialize() + ++ if err := validateNewMultiplyParameters(lhs, rhs); err != nil { ++ panic(err) ++ } + j := jsiiProxy_Multiply{} + + _jsii_.Create( + "jsii-calc.Multiply", + []interface{}{lhs, rhs}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/Multiply__checks.go.diff 1`] = ` +--- go/jsiicalc/Multiply__checks.go --no-runtime-type-checking ++++ go/jsiicalc/Multiply__checks.go --runtime-type-checking +@@ -0,0 +1,23 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -30746,11 +30820,17 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" ++ ++ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + -+func (i *jsiiProxy_IInterfaceWithOptionalMethodArguments) validateHelloParameters(arg1 *string) error { -+ if arg1 == nil { -+ return fmt.Errorf("parameter arg1 is required, but nil was provided") ++func validateNewMultiplyParameters(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) error { ++ if lhs == nil { ++ return fmt.Errorf("parameter lhs is required, but nil was provided") ++ } ++ ++ if rhs == nil { ++ return fmt.Errorf("parameter rhs is required, but nil was provided") + } + + return nil @@ -30758,28 +30838,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceWithProperties.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IInterfaceWithProperties.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IInterfaceWithProperties.go --runtime-type-checking -@@ -35,10 +35,13 @@ - ) - return returns - } - - func (j *jsiiProxy_IInterfaceWithProperties)SetReadWriteString(val *string) { -+ if err := j.validateSetReadWriteStringParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "readWriteString", - val, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceWithProperties__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IInterfaceWithProperties__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IInterfaceWithProperties__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/Multiply__no_checks.go.diff 1`] = ` +--- go/jsiicalc/Multiply__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/Multiply__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -30788,16 +30849,35 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (j *jsiiProxy_IInterfaceWithProperties) validateSetReadWriteStringParameters(val *string) error { ++func validateNewMultiplyParameters(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceWithProperties__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IInterfaceWithProperties__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IInterfaceWithProperties__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/Negate.go.diff 1`] = ` +--- go/jsiicalc/Negate.go --no-runtime-type-checking ++++ go/jsiicalc/Negate.go --runtime-type-checking +@@ -55,10 +55,13 @@ + + + func NewNegate(operand scopejsiicalclib.NumericValue) Negate { + _init_.Initialize() + ++ if err := validateNewNegateParameters(operand); err != nil { ++ panic(err) ++ } + j := jsiiProxy_Negate{} + + _jsii_.Create( + "jsii-calc.Negate", + []interface{}{operand}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/Negate__checks.go.diff 1`] = ` +--- go/jsiicalc/Negate__checks.go --no-runtime-type-checking ++++ go/jsiicalc/Negate__checks.go --runtime-type-checking +@@ -0,0 +1,19 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -30805,11 +30885,13 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" ++ ++ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + -+func (j *jsiiProxy_IInterfaceWithProperties) validateSetReadWriteStringParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func validateNewNegateParameters(operand scopejsiicalclib.NumericValue) error { ++ if operand == nil { ++ return fmt.Errorf("parameter operand is required, but nil was provided") + } + + return nil @@ -30817,28 +30899,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceWithPropertiesExtension.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IInterfaceWithPropertiesExtension.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IInterfaceWithPropertiesExtension.go --runtime-type-checking -@@ -25,10 +25,13 @@ - ) - return returns - } - - func (j *jsiiProxy_IInterfaceWithPropertiesExtension)SetFoo(val *float64) { -+ if err := j.validateSetFooParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "foo", - val, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceWithPropertiesExtension__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IInterfaceWithPropertiesExtension__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IInterfaceWithPropertiesExtension__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/Negate__no_checks.go.diff 1`] = ` +--- go/jsiicalc/Negate__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/Negate__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -30847,16 +30910,49 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (j *jsiiProxy_IInterfaceWithPropertiesExtension) validateSetFooParameters(val *float64) error { ++func validateNewNegateParameters(operand scopejsiicalclib.NumericValue) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IInterfaceWithPropertiesExtension__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IInterfaceWithPropertiesExtension__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IInterfaceWithPropertiesExtension__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/NullShouldBeTreatedAsUndefined.go.diff 1`] = ` +--- go/jsiicalc/NullShouldBeTreatedAsUndefined.go --no-runtime-type-checking ++++ go/jsiicalc/NullShouldBeTreatedAsUndefined.go --runtime-type-checking +@@ -32,10 +32,13 @@ + + + func NewNullShouldBeTreatedAsUndefined(_param1 *string, optional interface{}) NullShouldBeTreatedAsUndefined { + _init_.Initialize() + ++ if err := validateNewNullShouldBeTreatedAsUndefinedParameters(_param1); err != nil { ++ panic(err) ++ } + j := jsiiProxy_NullShouldBeTreatedAsUndefined{} + + _jsii_.Create( + "jsii-calc.NullShouldBeTreatedAsUndefined", + []interface{}{_param1, optional}, +@@ -70,10 +73,13 @@ + []interface{}{value}, + ) + } + + func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) GiveMeUndefinedInsideAnObject(input *NullShouldBeTreatedAsUndefinedData) { ++ if err := n.validateGiveMeUndefinedInsideAnObjectParameters(input); err != nil { ++ panic(err) ++ } + _jsii_.InvokeVoid( + n, + "giveMeUndefinedInsideAnObject", + []interface{}{input}, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/NullShouldBeTreatedAsUndefined__checks.go.diff 1`] = ` +--- go/jsiicalc/NullShouldBeTreatedAsUndefined__checks.go --no-runtime-type-checking ++++ go/jsiicalc/NullShouldBeTreatedAsUndefined__checks.go --runtime-type-checking +@@ -0,0 +1,30 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -30864,135 +30960,100 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" ++ ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func (j *jsiiProxy_IInterfaceWithPropertiesExtension) validateSetFooParameters(val *float64) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) validateGiveMeUndefinedInsideAnObjectParameters(input *NullShouldBeTreatedAsUndefinedData) error { ++ if input == nil { ++ return fmt.Errorf("parameter input is required, but nil was provided") ++ } ++ if err := _jsii_.ValidateStruct(input, func() string { return "parameter input" }); err != nil { ++ return err + } + + return nil +} + -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IMutableObjectLiteral.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IMutableObjectLiteral.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IMutableObjectLiteral.go --runtime-type-checking -@@ -24,10 +24,13 @@ - ) - return returns - } - - func (j *jsiiProxy_IMutableObjectLiteral)SetValue(val *string) { -+ if err := j.validateSetValueParameters(val); err != nil { -+ panic(err) ++func validateNewNullShouldBeTreatedAsUndefinedParameters(_param1 *string) error { ++ if _param1 == nil { ++ return fmt.Errorf("parameter _param1 is required, but nil was provided") + } - _jsii_.Set( - j, - "value", - val, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IMutableObjectLiteral__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IMutableObjectLiteral__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IMutableObjectLiteral__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil + -+func (j *jsiiProxy_IMutableObjectLiteral) validateSetValueParameters(val *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IMutableObjectLiteral__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IMutableObjectLiteral__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IMutableObjectLiteral__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/NullShouldBeTreatedAsUndefined__no_checks.go.diff 1`] = ` +--- go/jsiicalc/NullShouldBeTreatedAsUndefined__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/NullShouldBeTreatedAsUndefined__no_checks.go --runtime-type-checking +@@ -0,0 +1,15 @@ ++//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+import ( -+ "fmt" -+) ++// Building without runtime type checking enabled, so all the below just return nil + -+func (j *jsiiProxy_IMutableObjectLiteral) validateSetValueParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } ++func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) validateGiveMeUndefinedInsideAnObjectParameters(input *NullShouldBeTreatedAsUndefinedData) error { ++ return nil ++} + ++func validateNewNullShouldBeTreatedAsUndefinedParameters(_param1 *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_INonInternalInterface.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_INonInternalInterface.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_INonInternalInterface.go --runtime-type-checking -@@ -27,10 +27,13 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/NumberGenerator.go.diff 1`] = ` +--- go/jsiicalc/NumberGenerator.go --no-runtime-type-checking ++++ go/jsiicalc/NumberGenerator.go --runtime-type-checking +@@ -31,10 +31,13 @@ + + + func NewNumberGenerator(generator IRandomNumberGenerator) NumberGenerator { + _init_.Initialize() + ++ if err := validateNewNumberGeneratorParameters(generator); err != nil { ++ panic(err) ++ } + j := jsiiProxy_NumberGenerator{} + + _jsii_.Create( + "jsii-calc.NumberGenerator", + []interface{}{generator}, +@@ -53,18 +56,24 @@ + n, ) - return returns } - func (j *jsiiProxy_INonInternalInterface)SetB(val *string) { -+ if err := j.validateSetBParameters(val); err != nil { + func (j *jsiiProxy_NumberGenerator)SetGenerator(val IRandomNumberGenerator) { ++ if err := j.validateSetGeneratorParameters(val); err != nil { + panic(err) + } _jsii_.Set( j, - "b", + "generator", val, ) -@@ -45,10 +48,13 @@ - ) - return returns } - func (j *jsiiProxy_INonInternalInterface)SetC(val *string) { -+ if err := j.validateSetCParameters(val); err != nil { + func (n *jsiiProxy_NumberGenerator) IsSameGenerator(gen IRandomNumberGenerator) *bool { ++ if err := n.validateIsSameGeneratorParameters(gen); err != nil { + panic(err) + } - _jsii_.Set( - j, - "c", - val, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_INonInternalInterface__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_INonInternalInterface__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_INonInternalInterface__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,15 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (j *jsiiProxy_INonInternalInterface) validateSetBParameters(val *string) error { -+ return nil -+} -+ -+func (j *jsiiProxy_INonInternalInterface) validateSetCParameters(val *string) error { -+ return nil -+} -+ + var returns *bool + + _jsii_.Invoke( + n, + "isSameGenerator", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_INonInternalInterface__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_INonInternalInterface__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_INonInternalInterface__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,25 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/NumberGenerator__checks.go.diff 1`] = ` +--- go/jsiicalc/NumberGenerator__checks.go --no-runtime-type-checking ++++ go/jsiicalc/NumberGenerator__checks.go --runtime-type-checking +@@ -0,0 +1,33 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -31002,15 +31063,15 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (j *jsiiProxy_INonInternalInterface) validateSetBParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func (n *jsiiProxy_NumberGenerator) validateIsSameGeneratorParameters(gen IRandomNumberGenerator) error { ++ if gen == nil { ++ return fmt.Errorf("parameter gen is required, but nil was provided") + } + + return nil +} + -+func (j *jsiiProxy_INonInternalInterface) validateSetCParameters(val *string) error { ++func (j *jsiiProxy_NumberGenerator) validateSetGeneratorParameters(val IRandomNumberGenerator) error { + if val == nil { + return fmt.Errorf("parameter val is required, but nil was provided") + } @@ -31018,31 +31079,20 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + return nil +} + -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IObjectWithProperty.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IObjectWithProperty.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IObjectWithProperty.go --runtime-type-checking -@@ -39,10 +39,13 @@ - ) - return returns - } - - func (j *jsiiProxy_IObjectWithProperty)SetProperty(val *string) { -+ if err := j.validateSetPropertyParameters(val); err != nil { -+ panic(err) ++func validateNewNumberGeneratorParameters(generator IRandomNumberGenerator) error { ++ if generator == nil { ++ return fmt.Errorf("parameter generator is required, but nil was provided") + } - _jsii_.Set( - j, - "property", - val, - ) ++ ++ return nil ++} ++ `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IObjectWithProperty__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IObjectWithProperty__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IObjectWithProperty__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/NumberGenerator__no_checks.go.diff 1`] = ` +--- go/jsiicalc/NumberGenerator__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/NumberGenerator__no_checks.go --runtime-type-checking +@@ -0,0 +1,19 @@ +//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -31050,16 +31100,57 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (j *jsiiProxy_IObjectWithProperty) validateSetPropertyParameters(val *string) error { ++func (n *jsiiProxy_NumberGenerator) validateIsSameGeneratorParameters(gen IRandomNumberGenerator) error { ++ return nil ++} ++ ++func (j *jsiiProxy_NumberGenerator) validateSetGeneratorParameters(val IRandomNumberGenerator) error { ++ return nil ++} ++ ++func validateNewNumberGeneratorParameters(generator IRandomNumberGenerator) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IObjectWithProperty__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_IObjectWithProperty__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_IObjectWithProperty__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/ObjectRefsInCollections.go.diff 1`] = ` +--- go/jsiicalc/ObjectRefsInCollections.go --no-runtime-type-checking ++++ go/jsiicalc/ObjectRefsInCollections.go --runtime-type-checking +@@ -44,10 +44,13 @@ + o, + ) + } + + func (o *jsiiProxy_ObjectRefsInCollections) SumFromArray(values *[]scopejsiicalclib.NumericValue) *float64 { ++ if err := o.validateSumFromArrayParameters(values); err != nil { ++ panic(err) ++ } + var returns *float64 + + _jsii_.Invoke( + o, + "sumFromArray", +@@ -57,10 +60,13 @@ + + return returns + } + + func (o *jsiiProxy_ObjectRefsInCollections) SumFromMap(values *map[string]scopejsiicalclib.NumericValue) *float64 { ++ if err := o.validateSumFromMapParameters(values); err != nil { ++ panic(err) ++ } + var returns *float64 + + _jsii_.Invoke( + o, + "sumFromMap", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ObjectRefsInCollections__checks.go.diff 1`] = ` +--- go/jsiicalc/ObjectRefsInCollections__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ObjectRefsInCollections__checks.go --runtime-type-checking +@@ -0,0 +1,27 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -31067,41 +31158,32 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" ++ ++ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + -+func (j *jsiiProxy_IObjectWithProperty) validateSetPropertyParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func (o *jsiiProxy_ObjectRefsInCollections) validateSumFromArrayParameters(values *[]scopejsiicalclib.NumericValue) error { ++ if values == nil { ++ return fmt.Errorf("parameter values is required, but nil was provided") + } + + return nil +} + -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ImplementInternalInterface.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ImplementInternalInterface.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ImplementInternalInterface.go --runtime-type-checking -@@ -50,10 +50,13 @@ - i, - ) - } - - func (j *jsiiProxy_ImplementInternalInterface)SetProp(val *string) { -+ if err := j.validateSetPropParameters(val); err != nil { -+ panic(err) ++func (o *jsiiProxy_ObjectRefsInCollections) validateSumFromMapParameters(values *map[string]scopejsiicalclib.NumericValue) error { ++ if values == nil { ++ return fmt.Errorf("parameter values is required, but nil was provided") + } - _jsii_.Set( - j, - "prop", - val, - ) ++ ++ return nil ++} ++ `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ImplementInternalInterface__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ImplementInternalInterface__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ImplementInternalInterface__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/ObjectRefsInCollections__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ObjectRefsInCollections__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ObjectRefsInCollections__no_checks.go --runtime-type-checking +@@ -0,0 +1,15 @@ +//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -31109,15 +31191,38 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (j *jsiiProxy_ImplementInternalInterface) validateSetPropParameters(val *string) error { ++func (o *jsiiProxy_ObjectRefsInCollections) validateSumFromArrayParameters(values *[]scopejsiicalclib.NumericValue) error { ++ return nil ++} ++ ++func (o *jsiiProxy_ObjectRefsInCollections) validateSumFromMapParameters(values *map[string]scopejsiicalclib.NumericValue) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ImplementInternalInterface__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ImplementInternalInterface__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ImplementInternalInterface__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/OptionalArgumentInvoker.go.diff 1`] = ` +--- go/jsiicalc/OptionalArgumentInvoker.go --no-runtime-type-checking ++++ go/jsiicalc/OptionalArgumentInvoker.go --runtime-type-checking +@@ -17,10 +17,13 @@ + } + + func NewOptionalArgumentInvoker(delegate IInterfaceWithOptionalMethodArguments) OptionalArgumentInvoker { + _init_.Initialize() + ++ if err := validateNewOptionalArgumentInvokerParameters(delegate); err != nil { ++ panic(err) ++ } + j := jsiiProxy_OptionalArgumentInvoker{} + + _jsii_.Create( + "jsii-calc.OptionalArgumentInvoker", + []interface{}{delegate}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/OptionalArgumentInvoker__checks.go.diff 1`] = ` +--- go/jsiicalc/OptionalArgumentInvoker__checks.go --no-runtime-type-checking ++++ go/jsiicalc/OptionalArgumentInvoker__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -31128,9 +31233,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (j *jsiiProxy_ImplementInternalInterface) validateSetPropParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func validateNewOptionalArgumentInvokerParameters(delegate IInterfaceWithOptionalMethodArguments) error { ++ if delegate == nil { ++ return fmt.Errorf("parameter delegate is required, but nil was provided") + } + + return nil @@ -31138,28 +31243,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ImplementsPrivateInterface.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ImplementsPrivateInterface.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ImplementsPrivateInterface.go --runtime-type-checking -@@ -50,10 +50,13 @@ - i, - ) - } - - func (j *jsiiProxy_ImplementsPrivateInterface)SetPrivate(val *string) { -+ if err := j.validateSetPrivateParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "private", - val, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ImplementsPrivateInterface__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ImplementsPrivateInterface__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ImplementsPrivateInterface__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/OptionalArgumentInvoker__no_checks.go.diff 1`] = ` +--- go/jsiicalc/OptionalArgumentInvoker__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/OptionalArgumentInvoker__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -31168,16 +31254,35 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (j *jsiiProxy_ImplementsPrivateInterface) validateSetPrivateParameters(val *string) error { ++func validateNewOptionalArgumentInvokerParameters(delegate IInterfaceWithOptionalMethodArguments) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ImplementsPrivateInterface__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ImplementsPrivateInterface__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ImplementsPrivateInterface__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/OptionalConstructorArgument.go.diff 1`] = ` +--- go/jsiicalc/OptionalConstructorArgument.go --no-runtime-type-checking ++++ go/jsiicalc/OptionalConstructorArgument.go --runtime-type-checking +@@ -51,10 +51,13 @@ + + + func NewOptionalConstructorArgument(arg1 *float64, arg2 *string, arg3 *time.Time) OptionalConstructorArgument { + _init_.Initialize() + ++ if err := validateNewOptionalConstructorArgumentParameters(arg1, arg2); err != nil { ++ panic(err) ++ } + j := jsiiProxy_OptionalConstructorArgument{} + + _jsii_.Create( + "jsii-calc.OptionalConstructorArgument", + []interface{}{arg1, arg2, arg3}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/OptionalConstructorArgument__checks.go.diff 1`] = ` +--- go/jsiicalc/OptionalConstructorArgument__checks.go --no-runtime-type-checking ++++ go/jsiicalc/OptionalConstructorArgument__checks.go --runtime-type-checking +@@ -0,0 +1,21 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -31187,9 +31292,13 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (j *jsiiProxy_ImplementsPrivateInterface) validateSetPrivateParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func validateNewOptionalConstructorArgumentParameters(arg1 *float64, arg2 *string) error { ++ if arg1 == nil { ++ return fmt.Errorf("parameter arg1 is required, but nil was provided") ++ } ++ ++ if arg2 == nil { ++ return fmt.Errorf("parameter arg2 is required, but nil was provided") + } + + return nil @@ -31197,28 +31306,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_InterfacesMaker.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_InterfacesMaker.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_InterfacesMaker.go --runtime-type-checking -@@ -18,10 +18,13 @@ - } - - func InterfacesMaker_MakeInterfaces(count *float64) *[]scopejsiicalclib.IDoublable { - _init_.Initialize() - -+ if err := validateInterfacesMaker_MakeInterfacesParameters(count); err != nil { -+ panic(err) -+ } - var returns *[]scopejsiicalclib.IDoublable - - _jsii_.StaticInvoke( - "jsii-calc.InterfacesMaker", - "makeInterfaces", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_InterfacesMaker__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_InterfacesMaker__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_InterfacesMaker__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/OptionalConstructorArgument__no_checks.go.diff 1`] = ` +--- go/jsiicalc/OptionalConstructorArgument__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/OptionalConstructorArgument__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -31227,149 +31317,94 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateInterfacesMaker_MakeInterfacesParameters(count *float64) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_InterfacesMaker__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_InterfacesMaker__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_InterfacesMaker__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+import ( -+ "fmt" -+) -+ -+func validateInterfacesMaker_MakeInterfacesParameters(count *float64) error { -+ if count == nil { -+ return fmt.Errorf("parameter count is required, but nil was provided") -+ } -+ ++func validateNewOptionalConstructorArgumentParameters(arg1 *float64, arg2 *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JSII417Derived.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_JSII417Derived.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_JSII417Derived.go --runtime-type-checking -@@ -42,10 +42,13 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/OptionalStructConsumer.go.diff 1`] = ` +--- go/jsiicalc/OptionalStructConsumer.go --no-runtime-type-checking ++++ go/jsiicalc/OptionalStructConsumer.go --runtime-type-checking +@@ -38,10 +38,13 @@ - func NewJSII417Derived(property *string) JSII417Derived { + func NewOptionalStructConsumer(optionalStruct *OptionalStruct) OptionalStructConsumer { _init_.Initialize() -+ if err := validateNewJSII417DerivedParameters(property); err != nil { ++ if err := validateNewOptionalStructConsumerParameters(optionalStruct); err != nil { + panic(err) + } - j := jsiiProxy_JSII417Derived{} + j := jsiiProxy_OptionalStructConsumer{} _jsii_.Create( - "jsii-calc.JSII417Derived", - []interface{}{property}, + "jsii-calc.OptionalStructConsumer", + []interface{}{optionalStruct}, `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JSII417Derived__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_JSII417Derived__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_JSII417Derived__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/OptionalStructConsumer__checks.go.diff 1`] = ` +--- go/jsiicalc/OptionalStructConsumer__checks.go --no-runtime-type-checking ++++ go/jsiicalc/OptionalStructConsumer__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++) ++ ++func validateNewOptionalStructConsumerParameters(optionalStruct *OptionalStruct) error { ++ if err := _jsii_.ValidateStruct(optionalStruct, func() string { return "parameter optionalStruct" }); err != nil { ++ return err ++ } + -+func validateNewJSII417DerivedParameters(property *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JSII417Derived__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_JSII417Derived__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_JSII417Derived__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/OptionalStructConsumer__no_checks.go.diff 1`] = ` +--- go/jsiicalc/OptionalStructConsumer__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/OptionalStructConsumer__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+import ( -+ "fmt" -+) -+ -+func validateNewJSII417DerivedParameters(property *string) error { -+ if property == nil { -+ return fmt.Errorf("parameter property is required, but nil was provided") -+ } ++// Building without runtime type checking enabled, so all the below just return nil + ++func validateNewOptionalStructConsumerParameters(optionalStruct *OptionalStruct) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JSObjectLiteralToNativeClass.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_JSObjectLiteralToNativeClass.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_JSObjectLiteralToNativeClass.go --runtime-type-checking -@@ -62,18 +62,24 @@ - j, - ) - } - - func (j *jsiiProxy_JSObjectLiteralToNativeClass)SetPropA(val *string) { -+ if err := j.validateSetPropAParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "propA", - val, +exports[`Generated code for "jsii-calc": /go/jsiicalc/OverridableProtectedMember.go.diff 1`] = ` +--- go/jsiicalc/OverridableProtectedMember.go --no-runtime-type-checking ++++ go/jsiicalc/OverridableProtectedMember.go --runtime-type-checking +@@ -66,10 +66,13 @@ + o, ) } - func (j *jsiiProxy_JSObjectLiteralToNativeClass)SetPropB(val *float64) { -+ if err := j.validateSetPropBParameters(val); err != nil { + func (j *jsiiProxy_OverridableProtectedMember)SetOverrideReadWrite(val *string) { ++ if err := j.validateSetOverrideReadWriteParameters(val); err != nil { + panic(err) + } _jsii_.Set( j, - "propB", + "overrideReadWrite", val, ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JSObjectLiteralToNativeClass__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_JSObjectLiteralToNativeClass__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_JSObjectLiteralToNativeClass__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,15 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (j *jsiiProxy_JSObjectLiteralToNativeClass) validateSetPropAParameters(val *string) error { -+ return nil -+} -+ -+func (j *jsiiProxy_JSObjectLiteralToNativeClass) validateSetPropBParameters(val *float64) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JSObjectLiteralToNativeClass__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_JSObjectLiteralToNativeClass__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_JSObjectLiteralToNativeClass__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,25 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/OverridableProtectedMember__checks.go.diff 1`] = ` +--- go/jsiicalc/OverridableProtectedMember__checks.go --no-runtime-type-checking ++++ go/jsiicalc/OverridableProtectedMember__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -31379,15 +31414,7 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (j *jsiiProxy_JSObjectLiteralToNativeClass) validateSetPropAParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } -+ -+ return nil -+} -+ -+func (j *jsiiProxy_JSObjectLiteralToNativeClass) validateSetPropBParameters(val *float64) error { ++func (j *jsiiProxy_OverridableProtectedMember) validateSetOverrideReadWriteParameters(val *string) error { + if val == nil { + return fmt.Errorf("parameter val is required, but nil was provided") + } @@ -31397,28 +31424,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JavaReservedWords.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_JavaReservedWords.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_JavaReservedWords.go --runtime-type-checking -@@ -102,10 +102,13 @@ - j, - ) - } - - func (j *jsiiProxy_JavaReservedWords)SetWhile(val *string) { -+ if err := j.validateSetWhileParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "while", - val, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JavaReservedWords__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_JavaReservedWords__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_JavaReservedWords__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/OverridableProtectedMember__no_checks.go.diff 1`] = ` +--- go/jsiicalc/OverridableProtectedMember__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/OverridableProtectedMember__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -31427,15 +31435,34 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (j *jsiiProxy_JavaReservedWords) validateSetWhileParameters(val *string) error { ++func (j *jsiiProxy_OverridableProtectedMember) validateSetOverrideReadWriteParameters(val *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_JavaReservedWords__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_JavaReservedWords__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_JavaReservedWords__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/OverrideReturnsObject.go.diff 1`] = ` +--- go/jsiicalc/OverrideReturnsObject.go --no-runtime-type-checking ++++ go/jsiicalc/OverrideReturnsObject.go --runtime-type-checking +@@ -38,10 +38,13 @@ + o, + ) + } + + func (o *jsiiProxy_OverrideReturnsObject) Test(obj IReturnsNumber) *float64 { ++ if err := o.validateTestParameters(obj); err != nil { ++ panic(err) ++ } + var returns *float64 + + _jsii_.Invoke( + o, + "test", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/OverrideReturnsObject__checks.go.diff 1`] = ` +--- go/jsiicalc/OverrideReturnsObject__checks.go --no-runtime-type-checking ++++ go/jsiicalc/OverrideReturnsObject__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -31446,9 +31473,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (j *jsiiProxy_JavaReservedWords) validateSetWhileParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func (o *jsiiProxy_OverrideReturnsObject) validateTestParameters(obj IReturnsNumber) error { ++ if obj == nil { ++ return fmt.Errorf("parameter obj is required, but nil was provided") + } + + return nil @@ -31456,28 +31483,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_LevelOne.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_LevelOne.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_LevelOne.go --runtime-type-checking -@@ -28,10 +28,13 @@ - - - func NewLevelOne(props *LevelOneProps) LevelOne { - _init_.Initialize() - -+ if err := validateNewLevelOneParameters(props); err != nil { -+ panic(err) -+ } - j := jsiiProxy_LevelOne{} - - _jsii_.Create( - "jsii-calc.LevelOne", - []interface{}{props}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_LevelOne__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_LevelOne__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_LevelOne__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/OverrideReturnsObject__no_checks.go.diff 1`] = ` +--- go/jsiicalc/OverrideReturnsObject__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/OverrideReturnsObject__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -31486,16 +31494,35 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewLevelOneParameters(props *LevelOneProps) error { ++func (o *jsiiProxy_OverrideReturnsObject) validateTestParameters(obj IReturnsNumber) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_LevelOne__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_LevelOne__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_LevelOne__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,22 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/ParamShadowsBuiltins.go.diff 1`] = ` +--- go/jsiicalc/ParamShadowsBuiltins.go --no-runtime-type-checking ++++ go/jsiicalc/ParamShadowsBuiltins.go --runtime-type-checking +@@ -16,10 +16,13 @@ + } + + func NewParamShadowsBuiltins(builtins *string, str *string, props *ParamShadowsBuiltinsProps) ParamShadowsBuiltins { + _init_.Initialize() + ++ if err := validateNewParamShadowsBuiltinsParameters(builtins, str, props); err != nil { ++ panic(err) ++ } + j := jsiiProxy_ParamShadowsBuiltins{} + + _jsii_.Create( + "jsii-calc.ParamShadowsBuiltins", + []interface{}{builtins, str, props}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ParamShadowsBuiltins__checks.go.diff 1`] = ` +--- go/jsiicalc/ParamShadowsBuiltins__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ParamShadowsBuiltins__checks.go --runtime-type-checking +@@ -0,0 +1,30 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -31507,7 +31534,15 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func validateNewLevelOneParameters(props *LevelOneProps) error { ++func validateNewParamShadowsBuiltinsParameters(builtins *string, str *string, props *ParamShadowsBuiltinsProps) error { ++ if builtins == nil { ++ return fmt.Errorf("parameter builtins is required, but nil was provided") ++ } ++ ++ if str == nil { ++ return fmt.Errorf("parameter str is required, but nil was provided") ++ } ++ + if props == nil { + return fmt.Errorf("parameter props is required, but nil was provided") + } @@ -31520,28 +31555,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Multiply.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Multiply.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Multiply.go --runtime-type-checking -@@ -73,10 +73,13 @@ - - // Creates a BinaryOperation. - func NewMultiply(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) Multiply { - _init_.Initialize() - -+ if err := validateNewMultiplyParameters(lhs, rhs); err != nil { -+ panic(err) -+ } - j := jsiiProxy_Multiply{} - - _jsii_.Create( - "jsii-calc.Multiply", - []interface{}{lhs, rhs}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Multiply__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Multiply__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Multiply__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ParamShadowsBuiltins__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ParamShadowsBuiltins__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ParamShadowsBuiltins__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -31550,16 +31566,35 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewMultiplyParameters(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) error { ++func validateNewParamShadowsBuiltinsParameters(builtins *string, str *string, props *ParamShadowsBuiltinsProps) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Multiply__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Multiply__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Multiply__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,23 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/ParamShadowsScope.go.diff 1`] = ` +--- go/jsiicalc/ParamShadowsScope.go --no-runtime-type-checking ++++ go/jsiicalc/ParamShadowsScope.go --runtime-type-checking +@@ -43,10 +43,13 @@ + p, + ) + } + + func (p *jsiiProxy_ParamShadowsScope) UseScope(scope scopejsiicalclib.Number) scopejsiicalclib.Number { ++ if err := p.validateUseScopeParameters(scope); err != nil { ++ panic(err) ++ } + var returns scopejsiicalclib.Number + + _jsii_.Invoke( + p, + "useScope", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ParamShadowsScope__checks.go.diff 1`] = ` +--- go/jsiicalc/ParamShadowsScope__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ParamShadowsScope__checks.go --runtime-type-checking +@@ -0,0 +1,19 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -31571,13 +31606,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + -+func validateNewMultiplyParameters(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) error { -+ if lhs == nil { -+ return fmt.Errorf("parameter lhs is required, but nil was provided") -+ } -+ -+ if rhs == nil { -+ return fmt.Errorf("parameter rhs is required, but nil was provided") ++func (p *jsiiProxy_ParamShadowsScope) validateUseScopeParameters(scope scopejsiicalclib.Number) error { ++ if scope == nil { ++ return fmt.Errorf("parameter scope is required, but nil was provided") + } + + return nil @@ -31585,28 +31616,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Negate.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Negate.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Negate.go --runtime-type-checking -@@ -55,10 +55,13 @@ - - - func NewNegate(operand scopejsiicalclib.NumericValue) Negate { - _init_.Initialize() - -+ if err := validateNewNegateParameters(operand); err != nil { -+ panic(err) -+ } - j := jsiiProxy_Negate{} - - _jsii_.Create( - "jsii-calc.Negate", - []interface{}{operand}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Negate__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Negate__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Negate__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ParamShadowsScope__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ParamShadowsScope__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ParamShadowsScope__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -31615,16 +31627,35 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewNegateParameters(operand scopejsiicalclib.NumericValue) error { ++func (p *jsiiProxy_ParamShadowsScope) validateUseScopeParameters(scope scopejsiicalclib.Number) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Negate__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Negate__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Negate__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,19 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/PartiallyInitializedThisConsumer.go.diff 1`] = ` +--- go/jsiicalc/PartiallyInitializedThisConsumer.go --no-runtime-type-checking ++++ go/jsiicalc/PartiallyInitializedThisConsumer.go --runtime-type-checking +@@ -26,10 +26,13 @@ + p, + ) + } + + func (p *jsiiProxy_PartiallyInitializedThisConsumer) ConsumePartiallyInitializedThis(obj ConstructorPassesThisOut, dt *time.Time, ev AllTypesEnum) *string { ++ if err := p.validateConsumePartiallyInitializedThisParameters(obj, dt, ev); err != nil { ++ panic(err) ++ } + var returns *string + + _jsii_.Invoke( + p, + "consumePartiallyInitializedThis", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/PartiallyInitializedThisConsumer__checks.go.diff 1`] = ` +--- go/jsiicalc/PartiallyInitializedThisConsumer__checks.go --no-runtime-type-checking ++++ go/jsiicalc/PartiallyInitializedThisConsumer__checks.go --runtime-type-checking +@@ -0,0 +1,26 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -31632,13 +31663,20 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" -+ -+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ++ "time" +) + -+func validateNewNegateParameters(operand scopejsiicalclib.NumericValue) error { -+ if operand == nil { -+ return fmt.Errorf("parameter operand is required, but nil was provided") ++func (p *jsiiProxy_PartiallyInitializedThisConsumer) validateConsumePartiallyInitializedThisParameters(obj ConstructorPassesThisOut, dt *time.Time, ev AllTypesEnum) error { ++ if obj == nil { ++ return fmt.Errorf("parameter obj is required, but nil was provided") ++ } ++ ++ if dt == nil { ++ return fmt.Errorf("parameter dt is required, but nil was provided") ++ } ++ ++ if ev == "" { ++ return fmt.Errorf("parameter ev is required, but nil was provided") + } + + return nil @@ -31646,43 +31684,10 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_NullShouldBeTreatedAsUndefined.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_NullShouldBeTreatedAsUndefined.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_NullShouldBeTreatedAsUndefined.go --runtime-type-checking -@@ -32,10 +32,13 @@ - - - func NewNullShouldBeTreatedAsUndefined(_param1 *string, optional interface{}) NullShouldBeTreatedAsUndefined { - _init_.Initialize() - -+ if err := validateNewNullShouldBeTreatedAsUndefinedParameters(_param1); err != nil { -+ panic(err) -+ } - j := jsiiProxy_NullShouldBeTreatedAsUndefined{} - - _jsii_.Create( - "jsii-calc.NullShouldBeTreatedAsUndefined", - []interface{}{_param1, optional}, -@@ -70,10 +73,13 @@ - []interface{}{value}, - ) - } - - func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) GiveMeUndefinedInsideAnObject(input *NullShouldBeTreatedAsUndefinedData) { -+ if err := n.validateGiveMeUndefinedInsideAnObjectParameters(input); err != nil { -+ panic(err) -+ } - _jsii_.InvokeVoid( - n, - "giveMeUndefinedInsideAnObject", - []interface{}{input}, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_NullShouldBeTreatedAsUndefined__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_NullShouldBeTreatedAsUndefined__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_NullShouldBeTreatedAsUndefined__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,15 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/PartiallyInitializedThisConsumer__no_checks.go.diff 1`] = ` +--- go/jsiicalc/PartiallyInitializedThisConsumer__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/PartiallyInitializedThisConsumer__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -31690,20 +31695,35 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) validateGiveMeUndefinedInsideAnObjectParameters(input *NullShouldBeTreatedAsUndefinedData) error { -+ return nil -+} -+ -+func validateNewNullShouldBeTreatedAsUndefinedParameters(_param1 *string) error { ++func (p *jsiiProxy_PartiallyInitializedThisConsumer) validateConsumePartiallyInitializedThisParameters(obj ConstructorPassesThisOut, dt *time.Time, ev AllTypesEnum) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_NullShouldBeTreatedAsUndefined__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_NullShouldBeTreatedAsUndefined__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_NullShouldBeTreatedAsUndefined__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,30 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/Polymorphism.go.diff 1`] = ` +--- go/jsiicalc/Polymorphism.go --no-runtime-type-checking ++++ go/jsiicalc/Polymorphism.go --runtime-type-checking +@@ -40,10 +40,13 @@ + p, + ) + } + + func (p *jsiiProxy_Polymorphism) SayHello(friendly scopejsiicalclib.IFriendly) *string { ++ if err := p.validateSayHelloParameters(friendly); err != nil { ++ panic(err) ++ } + var returns *string + + _jsii_.Invoke( + p, + "sayHello", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/Polymorphism__checks.go.diff 1`] = ` +--- go/jsiicalc/Polymorphism__checks.go --no-runtime-type-checking ++++ go/jsiicalc/Polymorphism__checks.go --runtime-type-checking +@@ -0,0 +1,19 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -31712,196 +31732,258 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j +import ( + "fmt" + -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + -+func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) validateGiveMeUndefinedInsideAnObjectParameters(input *NullShouldBeTreatedAsUndefinedData) error { -+ if input == nil { -+ return fmt.Errorf("parameter input is required, but nil was provided") -+ } -+ if err := _jsii_.ValidateStruct(input, func() string { return "parameter input" }); err != nil { -+ return err ++func (p *jsiiProxy_Polymorphism) validateSayHelloParameters(friendly scopejsiicalclib.IFriendly) error { ++ if friendly == nil { ++ return fmt.Errorf("parameter friendly is required, but nil was provided") + } + + return nil +} + -+func validateNewNullShouldBeTreatedAsUndefinedParameters(_param1 *string) error { -+ if _param1 == nil { -+ return fmt.Errorf("parameter _param1 is required, but nil was provided") -+ } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/Polymorphism__no_checks.go.diff 1`] = ` +--- go/jsiicalc/Polymorphism__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/Polymorphism__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil + ++func (p *jsiiProxy_Polymorphism) validateSayHelloParameters(friendly scopejsiicalclib.IFriendly) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_NumberGenerator.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_NumberGenerator.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_NumberGenerator.go --runtime-type-checking -@@ -31,10 +31,13 @@ - +exports[`Generated code for "jsii-calc": /go/jsiicalc/Power.go.diff 1`] = ` +--- go/jsiicalc/Power.go --no-runtime-type-checking ++++ go/jsiicalc/Power.go --runtime-type-checking +@@ -116,10 +116,13 @@ - func NewNumberGenerator(generator IRandomNumberGenerator) NumberGenerator { + // Creates a Power operation. + func NewPower(base scopejsiicalclib.NumericValue, pow scopejsiicalclib.NumericValue) Power { _init_.Initialize() -+ if err := validateNewNumberGeneratorParameters(generator); err != nil { ++ if err := validateNewPowerParameters(base, pow); err != nil { + panic(err) + } - j := jsiiProxy_NumberGenerator{} + j := jsiiProxy_Power{} _jsii_.Create( - "jsii-calc.NumberGenerator", - []interface{}{generator}, -@@ -53,18 +56,24 @@ - n, + "jsii-calc.Power", + []interface{}{base, pow}, +@@ -139,26 +142,35 @@ + p, ) } - func (j *jsiiProxy_NumberGenerator)SetGenerator(val IRandomNumberGenerator) { -+ if err := j.validateSetGeneratorParameters(val); err != nil { + func (j *jsiiProxy_Power)SetDecorationPostfixes(val *[]*string) { ++ if err := j.validateSetDecorationPostfixesParameters(val); err != nil { + panic(err) + } _jsii_.Set( j, - "generator", + "decorationPostfixes", val, ) } - func (n *jsiiProxy_NumberGenerator) IsSameGenerator(gen IRandomNumberGenerator) *bool { -+ if err := n.validateIsSameGeneratorParameters(gen); err != nil { + func (j *jsiiProxy_Power)SetDecorationPrefixes(val *[]*string) { ++ if err := j.validateSetDecorationPrefixesParameters(val); err != nil { + panic(err) + } - var returns *bool + _jsii_.Set( + j, + "decorationPrefixes", + val, + ) + } - _jsii_.Invoke( - n, - "isSameGenerator", + func (j *jsiiProxy_Power)SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) { ++ if err := j.validateSetStringStyleParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "stringStyle", + val, + ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_NumberGenerator__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_NumberGenerator__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_NumberGenerator__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,19 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/Power__checks.go.diff 1`] = ` +--- go/jsiicalc/Power__checks.go --no-runtime-type-checking ++++ go/jsiicalc/Power__checks.go --runtime-type-checking +@@ -0,0 +1,48 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++ ++ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition" ++ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ++) ++ ++func (j *jsiiProxy_Power) validateSetDecorationPostfixesParameters(val *[]*string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } + -+func (n *jsiiProxy_NumberGenerator) validateIsSameGeneratorParameters(gen IRandomNumberGenerator) error { + return nil +} + -+func (j *jsiiProxy_NumberGenerator) validateSetGeneratorParameters(val IRandomNumberGenerator) error { ++func (j *jsiiProxy_Power) validateSetDecorationPrefixesParameters(val *[]*string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ + return nil +} + -+func validateNewNumberGeneratorParameters(generator IRandomNumberGenerator) error { ++func (j *jsiiProxy_Power) validateSetStringStyleParameters(val composition.CompositeOperation_CompositionStringStyle) error { ++ if val == "" { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ ++ return nil ++} ++ ++func validateNewPowerParameters(base scopejsiicalclib.NumericValue, pow scopejsiicalclib.NumericValue) error { ++ if base == nil { ++ return fmt.Errorf("parameter base is required, but nil was provided") ++ } ++ ++ if pow == nil { ++ return fmt.Errorf("parameter pow is required, but nil was provided") ++ } ++ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_NumberGenerator__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_NumberGenerator__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_NumberGenerator__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,33 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/Power__no_checks.go.diff 1`] = ` +--- go/jsiicalc/Power__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/Power__no_checks.go --runtime-type-checking +@@ -0,0 +1,23 @@ ++//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+import ( -+ "fmt" -+) -+ -+func (n *jsiiProxy_NumberGenerator) validateIsSameGeneratorParameters(gen IRandomNumberGenerator) error { -+ if gen == nil { -+ return fmt.Errorf("parameter gen is required, but nil was provided") -+ } ++// Building without runtime type checking enabled, so all the below just return nil + ++func (j *jsiiProxy_Power) validateSetDecorationPostfixesParameters(val *[]*string) error { + return nil +} + -+func (j *jsiiProxy_NumberGenerator) validateSetGeneratorParameters(val IRandomNumberGenerator) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } -+ ++func (j *jsiiProxy_Power) validateSetDecorationPrefixesParameters(val *[]*string) error { + return nil +} + -+func validateNewNumberGeneratorParameters(generator IRandomNumberGenerator) error { -+ if generator == nil { -+ return fmt.Errorf("parameter generator is required, but nil was provided") -+ } ++func (j *jsiiProxy_Power) validateSetStringStyleParameters(val composition.CompositeOperation_CompositionStringStyle) error { ++ return nil ++} + ++func validateNewPowerParameters(base scopejsiicalclib.NumericValue, pow scopejsiicalclib.NumericValue) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ObjectRefsInCollections.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ObjectRefsInCollections.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ObjectRefsInCollections.go --runtime-type-checking -@@ -44,10 +44,13 @@ - o, - ) - } - - func (o *jsiiProxy_ObjectRefsInCollections) SumFromArray(values *[]scopejsiicalclib.NumericValue) *float64 { -+ if err := o.validateSumFromArrayParameters(values); err != nil { -+ panic(err) -+ } - var returns *float64 - - _jsii_.Invoke( - o, - "sumFromArray", -@@ -57,10 +60,13 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/ReferenceEnumFromScopedPackage.go.diff 1`] = ` +--- go/jsiicalc/ReferenceEnumFromScopedPackage.go --no-runtime-type-checking ++++ go/jsiicalc/ReferenceEnumFromScopedPackage.go --runtime-type-checking +@@ -76,10 +76,13 @@ return returns } - func (o *jsiiProxy_ObjectRefsInCollections) SumFromMap(values *map[string]scopejsiicalclib.NumericValue) *float64 { -+ if err := o.validateSumFromMapParameters(values); err != nil { + func (r *jsiiProxy_ReferenceEnumFromScopedPackage) SaveFoo(value scopejsiicalclib.EnumFromScopedModule) { ++ if err := r.validateSaveFooParameters(value); err != nil { + panic(err) + } - var returns *float64 - - _jsii_.Invoke( - o, - "sumFromMap", + _jsii_.InvokeVoid( + r, + "saveFoo", + []interface{}{value}, + ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ObjectRefsInCollections__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ObjectRefsInCollections__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ObjectRefsInCollections__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,15 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/ReferenceEnumFromScopedPackage__checks.go.diff 1`] = ` +--- go/jsiicalc/ReferenceEnumFromScopedPackage__checks.go --no-runtime-type-checking ++++ go/jsiicalc/ReferenceEnumFromScopedPackage__checks.go --runtime-type-checking +@@ -0,0 +1,19 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++ ++ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ++) ++ ++func (r *jsiiProxy_ReferenceEnumFromScopedPackage) validateSaveFooParameters(value scopejsiicalclib.EnumFromScopedModule) error { ++ if value == "" { ++ return fmt.Errorf("parameter value is required, but nil was provided") ++ } + -+func (o *jsiiProxy_ObjectRefsInCollections) validateSumFromArrayParameters(values *[]scopejsiicalclib.NumericValue) error { + return nil +} + -+func (o *jsiiProxy_ObjectRefsInCollections) validateSumFromMapParameters(values *map[string]scopejsiicalclib.NumericValue) error { +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ReferenceEnumFromScopedPackage__no_checks.go.diff 1`] = ` +--- go/jsiicalc/ReferenceEnumFromScopedPackage__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/ReferenceEnumFromScopedPackage__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (r *jsiiProxy_ReferenceEnumFromScopedPackage) validateSaveFooParameters(value scopejsiicalclib.EnumFromScopedModule) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ObjectRefsInCollections__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ObjectRefsInCollections__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ObjectRefsInCollections__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,27 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/RootStructValidator.go.diff 1`] = ` +--- go/jsiicalc/RootStructValidator.go --no-runtime-type-checking ++++ go/jsiicalc/RootStructValidator.go --runtime-type-checking +@@ -15,10 +15,13 @@ + } + + func RootStructValidator_Validate(struct_ *RootStruct) { + _init_.Initialize() + ++ if err := validateRootStructValidator_ValidateParameters(struct_); err != nil { ++ panic(err) ++ } + _jsii_.StaticInvokeVoid( + "jsii-calc.RootStructValidator", + "validate", + []interface{}{struct_}, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/RootStructValidator__checks.go.diff 1`] = ` +--- go/jsiicalc/RootStructValidator__checks.go --no-runtime-type-checking ++++ go/jsiicalc/RootStructValidator__checks.go --runtime-type-checking +@@ -0,0 +1,22 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -31910,49 +31992,88 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j +import ( + "fmt" + -+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func (o *jsiiProxy_ObjectRefsInCollections) validateSumFromArrayParameters(values *[]scopejsiicalclib.NumericValue) error { -+ if values == nil { -+ return fmt.Errorf("parameter values is required, but nil was provided") ++func validateRootStructValidator_ValidateParameters(struct_ *RootStruct) error { ++ if struct_ == nil { ++ return fmt.Errorf("parameter struct_ is required, but nil was provided") ++ } ++ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { ++ return err + } + + return nil +} + -+func (o *jsiiProxy_ObjectRefsInCollections) validateSumFromMapParameters(values *map[string]scopejsiicalclib.NumericValue) error { -+ if values == nil { -+ return fmt.Errorf("parameter values is required, but nil was provided") -+ } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/RootStructValidator__no_checks.go.diff 1`] = ` +--- go/jsiicalc/RootStructValidator__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/RootStructValidator__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking + ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateRootStructValidator_ValidateParameters(struct_ *RootStruct) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OptionalArgumentInvoker.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OptionalArgumentInvoker.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OptionalArgumentInvoker.go --runtime-type-checking -@@ -17,10 +17,13 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/RuntimeTypeChecking.go.diff 1`] = ` +--- go/jsiicalc/RuntimeTypeChecking.go --no-runtime-type-checking ++++ go/jsiicalc/RuntimeTypeChecking.go --runtime-type-checking +@@ -59,10 +59,13 @@ + []interface{}{arg}, + ) } - func NewOptionalArgumentInvoker(delegate IInterfaceWithOptionalMethodArguments) OptionalArgumentInvoker { - _init_.Initialize() - -+ if err := validateNewOptionalArgumentInvokerParameters(delegate); err != nil { + func (r *jsiiProxy_RuntimeTypeChecking) MethodWithOptionalArguments(arg1 *float64, arg2 *string, arg3 *time.Time) { ++ if err := r.validateMethodWithOptionalArgumentsParameters(arg1, arg2); err != nil { + panic(err) + } - j := jsiiProxy_OptionalArgumentInvoker{} - - _jsii_.Create( - "jsii-calc.OptionalArgumentInvoker", - []interface{}{delegate}, + _jsii_.InvokeVoid( + r, + "methodWithOptionalArguments", + []interface{}{arg1, arg2, arg3}, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/RuntimeTypeChecking__checks.go.diff 1`] = ` +--- go/jsiicalc/RuntimeTypeChecking__checks.go --no-runtime-type-checking ++++ go/jsiicalc/RuntimeTypeChecking__checks.go --runtime-type-checking +@@ -0,0 +1,21 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++import ( ++ "fmt" ++) ++ ++func (r *jsiiProxy_RuntimeTypeChecking) validateMethodWithOptionalArgumentsParameters(arg1 *float64, arg2 *string) error { ++ if arg1 == nil { ++ return fmt.Errorf("parameter arg1 is required, but nil was provided") ++ } ++ ++ if arg2 == nil { ++ return fmt.Errorf("parameter arg2 is required, but nil was provided") ++ } ++ ++ return nil ++} ++ `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OptionalArgumentInvoker__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OptionalArgumentInvoker__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OptionalArgumentInvoker__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/RuntimeTypeChecking__no_checks.go.diff 1`] = ` +--- go/jsiicalc/RuntimeTypeChecking__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/RuntimeTypeChecking__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -31961,15 +32082,34 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewOptionalArgumentInvokerParameters(delegate IInterfaceWithOptionalMethodArguments) error { ++func (r *jsiiProxy_RuntimeTypeChecking) validateMethodWithOptionalArgumentsParameters(arg1 *float64, arg2 *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OptionalArgumentInvoker__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OptionalArgumentInvoker__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OptionalArgumentInvoker__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/SingletonInt.go.diff 1`] = ` +--- go/jsiicalc/SingletonInt.go --no-runtime-type-checking ++++ go/jsiicalc/SingletonInt.go --runtime-type-checking +@@ -16,10 +16,13 @@ + type jsiiProxy_SingletonInt struct { + _ byte // padding + } + + func (s *jsiiProxy_SingletonInt) IsSingletonInt(value *float64) *bool { ++ if err := s.validateIsSingletonIntParameters(value); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.Invoke( + s, + "isSingletonInt", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/SingletonInt__checks.go.diff 1`] = ` +--- go/jsiicalc/SingletonInt__checks.go --no-runtime-type-checking ++++ go/jsiicalc/SingletonInt__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -31980,9 +32120,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func validateNewOptionalArgumentInvokerParameters(delegate IInterfaceWithOptionalMethodArguments) error { -+ if delegate == nil { -+ return fmt.Errorf("parameter delegate is required, but nil was provided") ++func (s *jsiiProxy_SingletonInt) validateIsSingletonIntParameters(value *float64) error { ++ if value == nil { ++ return fmt.Errorf("parameter value is required, but nil was provided") + } + + return nil @@ -31990,28 +32130,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OptionalConstructorArgument.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OptionalConstructorArgument.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OptionalConstructorArgument.go --runtime-type-checking -@@ -51,10 +51,13 @@ - - - func NewOptionalConstructorArgument(arg1 *float64, arg2 *string, arg3 *time.Time) OptionalConstructorArgument { - _init_.Initialize() - -+ if err := validateNewOptionalConstructorArgumentParameters(arg1, arg2); err != nil { -+ panic(err) -+ } - j := jsiiProxy_OptionalConstructorArgument{} - - _jsii_.Create( - "jsii-calc.OptionalConstructorArgument", - []interface{}{arg1, arg2, arg3}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OptionalConstructorArgument__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OptionalConstructorArgument__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OptionalConstructorArgument__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/SingletonInt__no_checks.go.diff 1`] = ` +--- go/jsiicalc/SingletonInt__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/SingletonInt__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -32020,16 +32141,35 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewOptionalConstructorArgumentParameters(arg1 *float64, arg2 *string) error { ++func (s *jsiiProxy_SingletonInt) validateIsSingletonIntParameters(value *float64) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OptionalConstructorArgument__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OptionalConstructorArgument__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OptionalConstructorArgument__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,21 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/SingletonString.go.diff 1`] = ` +--- go/jsiicalc/SingletonString.go --no-runtime-type-checking ++++ go/jsiicalc/SingletonString.go --runtime-type-checking +@@ -16,10 +16,13 @@ + type jsiiProxy_SingletonString struct { + _ byte // padding + } + + func (s *jsiiProxy_SingletonString) IsSingletonString(value *string) *bool { ++ if err := s.validateIsSingletonStringParameters(value); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.Invoke( + s, + "isSingletonString", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/SingletonString__checks.go.diff 1`] = ` +--- go/jsiicalc/SingletonString__checks.go --no-runtime-type-checking ++++ go/jsiicalc/SingletonString__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -32039,13 +32179,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func validateNewOptionalConstructorArgumentParameters(arg1 *float64, arg2 *string) error { -+ if arg1 == nil { -+ return fmt.Errorf("parameter arg1 is required, but nil was provided") -+ } -+ -+ if arg2 == nil { -+ return fmt.Errorf("parameter arg2 is required, but nil was provided") ++func (s *jsiiProxy_SingletonString) validateIsSingletonStringParameters(value *string) error { ++ if value == nil { ++ return fmt.Errorf("parameter value is required, but nil was provided") + } + + return nil @@ -32053,28 +32189,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OptionalStructConsumer.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OptionalStructConsumer.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OptionalStructConsumer.go --runtime-type-checking -@@ -38,10 +38,13 @@ - - - func NewOptionalStructConsumer(optionalStruct *OptionalStruct) OptionalStructConsumer { - _init_.Initialize() - -+ if err := validateNewOptionalStructConsumerParameters(optionalStruct); err != nil { -+ panic(err) -+ } - j := jsiiProxy_OptionalStructConsumer{} - - _jsii_.Create( - "jsii-calc.OptionalStructConsumer", - []interface{}{optionalStruct}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OptionalStructConsumer__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OptionalStructConsumer__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OptionalStructConsumer__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/SingletonString__no_checks.go.diff 1`] = ` +--- go/jsiicalc/SingletonString__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/SingletonString__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -32083,15 +32200,34 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewOptionalStructConsumerParameters(optionalStruct *OptionalStruct) error { ++func (s *jsiiProxy_SingletonString) validateIsSingletonStringParameters(value *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OptionalStructConsumer__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OptionalStructConsumer__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OptionalStructConsumer__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/StableClass.go.diff 1`] = ` +--- go/jsiicalc/StableClass.go --no-runtime-type-checking ++++ go/jsiicalc/StableClass.go --runtime-type-checking +@@ -40,10 +40,13 @@ + + + func NewStableClass(readonlyString *string, mutableNumber *float64) StableClass { + _init_.Initialize() + ++ if err := validateNewStableClassParameters(readonlyString); err != nil { ++ panic(err) ++ } + j := jsiiProxy_StableClass{} + + _jsii_.Create( + "jsii-calc.StableClass", + []interface{}{readonlyString, mutableNumber}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/StableClass__checks.go.diff 1`] = ` +--- go/jsiicalc/StableClass__checks.go --no-runtime-type-checking ++++ go/jsiicalc/StableClass__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -32099,12 +32235,12 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j +package jsiicalc + +import ( -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++ "fmt" +) + -+func validateNewOptionalStructConsumerParameters(optionalStruct *OptionalStruct) error { -+ if err := _jsii_.ValidateStruct(optionalStruct, func() string { return "parameter optionalStruct" }); err != nil { -+ return err ++func validateNewStableClassParameters(readonlyString *string) error { ++ if readonlyString == nil { ++ return fmt.Errorf("parameter readonlyString is required, but nil was provided") + } + + return nil @@ -32112,28 +32248,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OverridableProtectedMember.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OverridableProtectedMember.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OverridableProtectedMember.go --runtime-type-checking -@@ -66,10 +66,13 @@ - o, - ) - } - - func (j *jsiiProxy_OverridableProtectedMember)SetOverrideReadWrite(val *string) { -+ if err := j.validateSetOverrideReadWriteParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "overrideReadWrite", - val, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OverridableProtectedMember__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OverridableProtectedMember__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OverridableProtectedMember__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/StableClass__no_checks.go.diff 1`] = ` +--- go/jsiicalc/StableClass__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/StableClass__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -32142,15 +32259,34 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (j *jsiiProxy_OverridableProtectedMember) validateSetOverrideReadWriteParameters(val *string) error { ++func validateNewStableClassParameters(readonlyString *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OverridableProtectedMember__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OverridableProtectedMember__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OverridableProtectedMember__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/StaticContext.go.diff 1`] = ` +--- go/jsiicalc/StaticContext.go --no-runtime-type-checking ++++ go/jsiicalc/StaticContext.go --runtime-type-checking +@@ -43,10 +43,13 @@ + return returns + } + + func StaticContext_SetStaticVariable(val *bool) { + _init_.Initialize() ++ if err := validateStaticContext_SetStaticVariableParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.StaticSet( + "jsii-calc.StaticContext", + "staticVariable", + val, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/StaticContext__checks.go.diff 1`] = ` +--- go/jsiicalc/StaticContext__checks.go --no-runtime-type-checking ++++ go/jsiicalc/StaticContext__checks.go --runtime-type-checking @@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + @@ -32161,7 +32297,7 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (j *jsiiProxy_OverridableProtectedMember) validateSetOverrideReadWriteParameters(val *string) error { ++func validateStaticContext_SetStaticVariableParameters(val *bool) error { + if val == nil { + return fmt.Errorf("parameter val is required, but nil was provided") + } @@ -32171,28 +32307,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OverrideReturnsObject.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OverrideReturnsObject.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OverrideReturnsObject.go --runtime-type-checking -@@ -38,10 +38,13 @@ - o, - ) - } - - func (o *jsiiProxy_OverrideReturnsObject) Test(obj IReturnsNumber) *float64 { -+ if err := o.validateTestParameters(obj); err != nil { -+ panic(err) -+ } - var returns *float64 - - _jsii_.Invoke( - o, - "test", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OverrideReturnsObject__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OverrideReturnsObject__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OverrideReturnsObject__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/StaticContext__no_checks.go.diff 1`] = ` +--- go/jsiicalc/StaticContext__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/StaticContext__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -32201,16 +32318,77 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (o *jsiiProxy_OverrideReturnsObject) validateTestParameters(obj IReturnsNumber) error { ++func validateStaticContext_SetStaticVariableParameters(val *bool) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_OverrideReturnsObject__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_OverrideReturnsObject__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_OverrideReturnsObject__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/Statics.go.diff 1`] = ` +--- go/jsiicalc/Statics.go --no-runtime-type-checking ++++ go/jsiicalc/Statics.go --runtime-type-checking +@@ -28,10 +28,13 @@ + + + func NewStatics(value *string) Statics { + _init_.Initialize() + ++ if err := validateNewStaticsParameters(value); err != nil { ++ panic(err) ++ } + j := jsiiProxy_Statics{} + + _jsii_.Create( + "jsii-calc.Statics", + []interface{}{value}, +@@ -53,10 +56,13 @@ + + // Jsdocs for static method. + func Statics_StaticMethod(name *string) *string { + _init_.Initialize() + ++ if err := validateStatics_StaticMethodParameters(name); err != nil { ++ panic(err) ++ } + var returns *string + + _jsii_.StaticInvoke( + "jsii-calc.Statics", + "staticMethod", +@@ -111,10 +117,13 @@ + return returns + } + + func Statics_SetInstance(val Statics) { + _init_.Initialize() ++ if err := validateStatics_SetInstanceParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.StaticSet( + "jsii-calc.Statics", + "instance", + val, + ) +@@ -131,10 +140,13 @@ + return returns + } + + func Statics_SetNonConstStatic(val *float64) { + _init_.Initialize() ++ if err := validateStatics_SetNonConstStaticParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.StaticSet( + "jsii-calc.Statics", + "nonConstStatic", + val, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/Statics__checks.go.diff 1`] = ` +--- go/jsiicalc/Statics__checks.go --no-runtime-type-checking ++++ go/jsiicalc/Statics__checks.go --runtime-type-checking +@@ -0,0 +1,41 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -32220,39 +32398,44 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func (o *jsiiProxy_OverrideReturnsObject) validateTestParameters(obj IReturnsNumber) error { -+ if obj == nil { -+ return fmt.Errorf("parameter obj is required, but nil was provided") ++func validateStatics_StaticMethodParameters(name *string) error { ++ if name == nil { ++ return fmt.Errorf("parameter name is required, but nil was provided") + } + + return nil +} + -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ParamShadowsBuiltins.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ParamShadowsBuiltins.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ParamShadowsBuiltins.go --runtime-type-checking -@@ -16,10 +16,13 @@ - } - - func NewParamShadowsBuiltins(builtins *string, str *string, props *ParamShadowsBuiltinsProps) ParamShadowsBuiltins { - _init_.Initialize() - -+ if err := validateNewParamShadowsBuiltinsParameters(builtins, str, props); err != nil { -+ panic(err) ++func validateStatics_SetInstanceParameters(val Statics) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } - j := jsiiProxy_ParamShadowsBuiltins{} - - _jsii_.Create( - "jsii-calc.ParamShadowsBuiltins", - []interface{}{builtins, str, props}, ++ ++ return nil ++} ++ ++func validateStatics_SetNonConstStaticParameters(val *float64) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } ++ ++ return nil ++} ++ ++func validateNewStaticsParameters(value *string) error { ++ if value == nil { ++ return fmt.Errorf("parameter value is required, but nil was provided") ++ } ++ ++ return nil ++} ++ `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ParamShadowsBuiltins__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ParamShadowsBuiltins__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ParamShadowsBuiltins__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/Statics__no_checks.go.diff 1`] = ` +--- go/jsiicalc/Statics__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/Statics__no_checks.go --runtime-type-checking +@@ -0,0 +1,23 @@ +//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -32260,16 +32443,47 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewParamShadowsBuiltinsParameters(builtins *string, str *string, props *ParamShadowsBuiltinsProps) error { ++func validateStatics_StaticMethodParameters(name *string) error { ++ return nil ++} ++ ++func validateStatics_SetInstanceParameters(val Statics) error { ++ return nil ++} ++ ++func validateStatics_SetNonConstStaticParameters(val *float64) error { ++ return nil ++} ++ ++func validateNewStaticsParameters(value *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ParamShadowsBuiltins__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ParamShadowsBuiltins__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ParamShadowsBuiltins__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,30 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/StripInternal.go.diff 1`] = ` +--- go/jsiicalc/StripInternal.go --no-runtime-type-checking ++++ go/jsiicalc/StripInternal.go --runtime-type-checking +@@ -50,10 +50,13 @@ + s, + ) + } + + func (j *jsiiProxy_StripInternal)SetYouSeeMe(val *string) { ++ if err := j.validateSetYouSeeMeParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "youSeeMe", + val, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/StripInternal__checks.go.diff 1`] = ` +--- go/jsiicalc/StripInternal__checks.go --no-runtime-type-checking ++++ go/jsiicalc/StripInternal__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -32277,24 +32491,11 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" -+ -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func validateNewParamShadowsBuiltinsParameters(builtins *string, str *string, props *ParamShadowsBuiltinsProps) error { -+ if builtins == nil { -+ return fmt.Errorf("parameter builtins is required, but nil was provided") -+ } -+ -+ if str == nil { -+ return fmt.Errorf("parameter str is required, but nil was provided") -+ } -+ -+ if props == nil { -+ return fmt.Errorf("parameter props is required, but nil was provided") -+ } -+ if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { -+ return err ++func (j *jsiiProxy_StripInternal) validateSetYouSeeMeParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil @@ -32302,28 +32503,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ParamShadowsScope.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ParamShadowsScope.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ParamShadowsScope.go --runtime-type-checking -@@ -43,10 +43,13 @@ - p, - ) - } - - func (p *jsiiProxy_ParamShadowsScope) UseScope(scope scopejsiicalclib.Number) scopejsiicalclib.Number { -+ if err := p.validateUseScopeParameters(scope); err != nil { -+ panic(err) -+ } - var returns scopejsiicalclib.Number - - _jsii_.Invoke( - p, - "useScope", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ParamShadowsScope__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ParamShadowsScope__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ParamShadowsScope__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/StripInternal__no_checks.go.diff 1`] = ` +--- go/jsiicalc/StripInternal__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/StripInternal__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -32332,16 +32514,49 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (p *jsiiProxy_ParamShadowsScope) validateUseScopeParameters(scope scopejsiicalclib.Number) error { ++func (j *jsiiProxy_StripInternal) validateSetYouSeeMeParameters(val *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ParamShadowsScope__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ParamShadowsScope__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ParamShadowsScope__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,19 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/StructPassing.go.diff 1`] = ` +--- go/jsiicalc/StructPassing.go --no-runtime-type-checking ++++ go/jsiicalc/StructPassing.go --runtime-type-checking +@@ -40,10 +40,13 @@ + } + + func StructPassing_HowManyVarArgsDidIPass(_positional *float64, inputs ...*TopLevelStruct) *float64 { + _init_.Initialize() + ++ if err := validateStructPassing_HowManyVarArgsDidIPassParameters(_positional, &inputs); err != nil { ++ panic(err) ++ } + args := []interface{}{_positional} + for _, a := range inputs { + args = append(args, a) + } + +@@ -60,10 +63,13 @@ + } + + func StructPassing_RoundTrip(_positional *float64, input *TopLevelStruct) *TopLevelStruct { + _init_.Initialize() + ++ if err := validateStructPassing_RoundTripParameters(_positional, input); err != nil { ++ panic(err) ++ } + var returns *TopLevelStruct + + _jsii_.StaticInvoke( + "jsii-calc.StructPassing", + "roundTrip", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/StructPassing__checks.go.diff 1`] = ` +--- go/jsiicalc/StructPassing__checks.go --no-runtime-type-checking ++++ go/jsiicalc/StructPassing__checks.go --runtime-type-checking +@@ -0,0 +1,40 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -32350,42 +32565,44 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j +import ( + "fmt" + -+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func (p *jsiiProxy_ParamShadowsScope) validateUseScopeParameters(scope scopejsiicalclib.Number) error { -+ if scope == nil { -+ return fmt.Errorf("parameter scope is required, but nil was provided") ++func validateStructPassing_HowManyVarArgsDidIPassParameters(_positional *float64, inputs *[]*TopLevelStruct) error { ++ if _positional == nil { ++ return fmt.Errorf("parameter _positional is required, but nil was provided") ++ } ++ ++ for idx_323815, v := range *inputs { ++ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter inputs[%#v]", idx_323815) }); err != nil { ++ return err ++ } + } + + return nil +} + -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_PartiallyInitializedThisConsumer.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_PartiallyInitializedThisConsumer.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_PartiallyInitializedThisConsumer.go --runtime-type-checking -@@ -26,10 +26,13 @@ - p, - ) - } - - func (p *jsiiProxy_PartiallyInitializedThisConsumer) ConsumePartiallyInitializedThis(obj ConstructorPassesThisOut, dt *time.Time, ev AllTypesEnum) *string { -+ if err := p.validateConsumePartiallyInitializedThisParameters(obj, dt, ev); err != nil { -+ panic(err) ++func validateStructPassing_RoundTripParameters(_positional *float64, input *TopLevelStruct) error { ++ if _positional == nil { ++ return fmt.Errorf("parameter _positional is required, but nil was provided") + } - var returns *string - - _jsii_.Invoke( - p, - "consumePartiallyInitializedThis", ++ ++ if input == nil { ++ return fmt.Errorf("parameter input is required, but nil was provided") ++ } ++ if err := _jsii_.ValidateStruct(input, func() string { return "parameter input" }); err != nil { ++ return err ++ } ++ ++ return nil ++} ++ `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_PartiallyInitializedThisConsumer__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_PartiallyInitializedThisConsumer__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_PartiallyInitializedThisConsumer__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/StructPassing__no_checks.go.diff 1`] = ` +--- go/jsiicalc/StructPassing__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/StructPassing__no_checks.go --runtime-type-checking +@@ -0,0 +1,15 @@ +//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -32393,16 +32610,67 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (p *jsiiProxy_PartiallyInitializedThisConsumer) validateConsumePartiallyInitializedThisParameters(obj ConstructorPassesThisOut, dt *time.Time, ev AllTypesEnum) error { ++func validateStructPassing_HowManyVarArgsDidIPassParameters(_positional *float64, inputs *[]*TopLevelStruct) error { ++ return nil ++} ++ ++func validateStructPassing_RoundTripParameters(_positional *float64, input *TopLevelStruct) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_PartiallyInitializedThisConsumer__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_PartiallyInitializedThisConsumer__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_PartiallyInitializedThisConsumer__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,26 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/StructUnionConsumer.go.diff 1`] = ` +--- go/jsiicalc/StructUnionConsumer.go --no-runtime-type-checking ++++ go/jsiicalc/StructUnionConsumer.go --runtime-type-checking +@@ -15,10 +15,13 @@ + } + + func StructUnionConsumer_IsStructA(struct_ interface{}) *bool { + _init_.Initialize() + ++ if err := validateStructUnionConsumer_IsStructAParameters(struct_); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.StructUnionConsumer", + "isStructA", +@@ -30,10 +33,13 @@ + } + + func StructUnionConsumer_IsStructB(struct_ interface{}) *bool { + _init_.Initialize() + ++ if err := validateStructUnionConsumer_IsStructBParameters(struct_); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.StructUnionConsumer", + "isStructB", +@@ -45,10 +51,13 @@ + } + + func StructUnionConsumer_ProvideStruct(which *string) interface{} { + _init_.Initialize() + ++ if err := validateStructUnionConsumer_ProvideStructParameters(which); err != nil { ++ panic(err) ++ } + var returns interface{} + + _jsii_.StaticInvoke( + "jsii-calc.StructUnionConsumer", + "provideStruct", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/StructUnionConsumer__checks.go.diff 1`] = ` +--- go/jsiicalc/StructUnionConsumer__checks.go --no-runtime-type-checking ++++ go/jsiicalc/StructUnionConsumer__checks.go --runtime-type-checking +@@ -0,0 +1,91 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -32410,111 +32678,126 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" -+ "time" -+) + -+func (p *jsiiProxy_PartiallyInitializedThisConsumer) validateConsumePartiallyInitializedThisParameters(obj ConstructorPassesThisOut, dt *time.Time, ev AllTypesEnum) error { -+ if obj == nil { -+ return fmt.Errorf("parameter obj is required, but nil was provided") -+ } ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++) + -+ if dt == nil { -+ return fmt.Errorf("parameter dt is required, but nil was provided") ++func validateStructUnionConsumer_IsStructAParameters(struct_ interface{}) error { ++ if struct_ == nil { ++ return fmt.Errorf("parameter struct_ is required, but nil was provided") + } -+ -+ if ev == "" { -+ return fmt.Errorf("parameter ev is required, but nil was provided") ++ switch struct_.(type) { ++ case *StructA: ++ struct_ := struct_.(*StructA) ++ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { ++ return err ++ } ++ case StructA: ++ struct__ := struct_.(StructA) ++ struct_ := &struct__ ++ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { ++ return err ++ } ++ case *StructB: ++ struct_ := struct_.(*StructB) ++ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { ++ return err ++ } ++ case StructB: ++ struct__ := struct_.(StructB) ++ struct_ := &struct__ ++ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { ++ return err ++ } ++ default: ++ if !_jsii_.IsAnonymousProxy(struct_) { ++ return fmt.Errorf("parameter struct_ must be one of the allowed types: *StructA, *StructB; received %#v (a %T)", struct_, struct_) ++ } + } + + return nil +} + -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Polymorphism.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Polymorphism.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Polymorphism.go --runtime-type-checking -@@ -40,10 +40,13 @@ - p, - ) - } - - func (p *jsiiProxy_Polymorphism) SayHello(friendly scopejsiicalclib.IFriendly) *string { -+ if err := p.validateSayHelloParameters(friendly); err != nil { -+ panic(err) ++func validateStructUnionConsumer_IsStructBParameters(struct_ interface{}) error { ++ if struct_ == nil { ++ return fmt.Errorf("parameter struct_ is required, but nil was provided") ++ } ++ switch struct_.(type) { ++ case *StructA: ++ struct_ := struct_.(*StructA) ++ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { ++ return err ++ } ++ case StructA: ++ struct__ := struct_.(StructA) ++ struct_ := &struct__ ++ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { ++ return err ++ } ++ case *StructB: ++ struct_ := struct_.(*StructB) ++ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { ++ return err ++ } ++ case StructB: ++ struct__ := struct_.(StructB) ++ struct_ := &struct__ ++ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { ++ return err ++ } ++ default: ++ if !_jsii_.IsAnonymousProxy(struct_) { ++ return fmt.Errorf("parameter struct_ must be one of the allowed types: *StructA, *StructB; received %#v (a %T)", struct_, struct_) ++ } + } - var returns *string - - _jsii_.Invoke( - p, - "sayHello", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Polymorphism__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Polymorphism__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Polymorphism__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking + -+// A simple calcuator built on JSII. -+package jsiicalc ++ return nil ++} + -+// Building without runtime type checking enabled, so all the below just return nil ++func validateStructUnionConsumer_ProvideStructParameters(which *string) error { ++ if which == nil { ++ return fmt.Errorf("parameter which is required, but nil was provided") ++ } + -+func (p *jsiiProxy_Polymorphism) validateSayHelloParameters(friendly scopejsiicalclib.IFriendly) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Polymorphism__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Polymorphism__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Polymorphism__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/StructUnionConsumer__no_checks.go.diff 1`] = ` +--- go/jsiicalc/StructUnionConsumer__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/StructUnionConsumer__no_checks.go --runtime-type-checking @@ -0,0 +1,19 @@ -+//go:build !no_runtime_type_checking ++//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+import ( -+ "fmt" ++// Building without runtime type checking enabled, so all the below just return nil + -+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" -+) ++func validateStructUnionConsumer_IsStructAParameters(struct_ interface{}) error { ++ return nil ++} + -+func (p *jsiiProxy_Polymorphism) validateSayHelloParameters(friendly scopejsiicalclib.IFriendly) error { -+ if friendly == nil { -+ return fmt.Errorf("parameter friendly is required, but nil was provided") -+ } ++func validateStructUnionConsumer_IsStructBParameters(struct_ interface{}) error { ++ return nil ++} + ++func validateStructUnionConsumer_ProvideStructParameters(which *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Power.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Power.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Power.go --runtime-type-checking -@@ -116,10 +116,13 @@ - - // Creates a Power operation. - func NewPower(base scopejsiicalclib.NumericValue, pow scopejsiicalclib.NumericValue) Power { - _init_.Initialize() - -+ if err := validateNewPowerParameters(base, pow); err != nil { -+ panic(err) -+ } - j := jsiiProxy_Power{} - - _jsii_.Create( - "jsii-calc.Power", - []interface{}{base, pow}, -@@ -139,26 +142,35 @@ - p, +exports[`Generated code for "jsii-calc": /go/jsiicalc/Sum.go.diff 1`] = ` +--- go/jsiicalc/Sum.go --no-runtime-type-checking ++++ go/jsiicalc/Sum.go --runtime-type-checking +@@ -126,34 +126,46 @@ + s, ) } - func (j *jsiiProxy_Power)SetDecorationPostfixes(val *[]*string) { + func (j *jsiiProxy_Sum)SetDecorationPostfixes(val *[]*string) { + if err := j.validateSetDecorationPostfixesParameters(val); err != nil { + panic(err) + } @@ -32525,7 +32808,7 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j ) } - func (j *jsiiProxy_Power)SetDecorationPrefixes(val *[]*string) { + func (j *jsiiProxy_Sum)SetDecorationPrefixes(val *[]*string) { + if err := j.validateSetDecorationPrefixesParameters(val); err != nil { + panic(err) + } @@ -32536,7 +32819,18 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j ) } - func (j *jsiiProxy_Power)SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) { + func (j *jsiiProxy_Sum)SetParts(val *[]scopejsiicalclib.NumericValue) { ++ if err := j.validateSetPartsParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "parts", + val, + ) + } + + func (j *jsiiProxy_Sum)SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) { + if err := j.validateSetStringStyleParameters(val); err != nil { + panic(err) + } @@ -32547,39 +32841,10 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Power__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Power__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Power__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,23 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (j *jsiiProxy_Power) validateSetDecorationPostfixesParameters(val *[]*string) error { -+ return nil -+} -+ -+func (j *jsiiProxy_Power) validateSetDecorationPrefixesParameters(val *[]*string) error { -+ return nil -+} -+ -+func (j *jsiiProxy_Power) validateSetStringStyleParameters(val composition.CompositeOperation_CompositionStringStyle) error { -+ return nil -+} -+ -+func validateNewPowerParameters(base scopejsiicalclib.NumericValue, pow scopejsiicalclib.NumericValue) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Power__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Power__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Power__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,48 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/Sum__checks.go.diff 1`] = ` +--- go/jsiicalc/Sum__checks.go --no-runtime-type-checking ++++ go/jsiicalc/Sum__checks.go --runtime-type-checking +@@ -0,0 +1,44 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -32592,7 +32857,7 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + -+func (j *jsiiProxy_Power) validateSetDecorationPostfixesParameters(val *[]*string) error { ++func (j *jsiiProxy_Sum) validateSetDecorationPostfixesParameters(val *[]*string) error { + if val == nil { + return fmt.Errorf("parameter val is required, but nil was provided") + } @@ -32600,7 +32865,7 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + return nil +} + -+func (j *jsiiProxy_Power) validateSetDecorationPrefixesParameters(val *[]*string) error { ++func (j *jsiiProxy_Sum) validateSetDecorationPrefixesParameters(val *[]*string) error { + if val == nil { + return fmt.Errorf("parameter val is required, but nil was provided") + } @@ -32608,21 +32873,17 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + return nil +} + -+func (j *jsiiProxy_Power) validateSetStringStyleParameters(val composition.CompositeOperation_CompositionStringStyle) error { -+ if val == "" { ++func (j *jsiiProxy_Sum) validateSetPartsParameters(val *[]scopejsiicalclib.NumericValue) error { ++ if val == nil { + return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil +} + -+func validateNewPowerParameters(base scopejsiicalclib.NumericValue, pow scopejsiicalclib.NumericValue) error { -+ if base == nil { -+ return fmt.Errorf("parameter base is required, but nil was provided") -+ } -+ -+ if pow == nil { -+ return fmt.Errorf("parameter pow is required, but nil was provided") ++func (j *jsiiProxy_Sum) validateSetStringStyleParameters(val composition.CompositeOperation_CompositionStringStyle) error { ++ if val == "" { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil @@ -32630,29 +32891,10 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ReferenceEnumFromScopedPackage.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ReferenceEnumFromScopedPackage.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ReferenceEnumFromScopedPackage.go --runtime-type-checking -@@ -76,10 +76,13 @@ - - return returns - } - - func (r *jsiiProxy_ReferenceEnumFromScopedPackage) SaveFoo(value scopejsiicalclib.EnumFromScopedModule) { -+ if err := r.validateSaveFooParameters(value); err != nil { -+ panic(err) -+ } - _jsii_.InvokeVoid( - r, - "saveFoo", - []interface{}{value}, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ReferenceEnumFromScopedPackage__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ReferenceEnumFromScopedPackage__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ReferenceEnumFromScopedPackage__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/Sum__no_checks.go.diff 1`] = ` +--- go/jsiicalc/Sum__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/Sum__no_checks.go --runtime-type-checking +@@ -0,0 +1,23 @@ +//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -32660,77 +32902,46 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (r *jsiiProxy_ReferenceEnumFromScopedPackage) validateSaveFooParameters(value scopejsiicalclib.EnumFromScopedModule) error { ++func (j *jsiiProxy_Sum) validateSetDecorationPostfixesParameters(val *[]*string) error { + return nil +} + -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_ReferenceEnumFromScopedPackage__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_ReferenceEnumFromScopedPackage__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_ReferenceEnumFromScopedPackage__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,19 @@ -+//go:build !no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+import ( -+ "fmt" -+ -+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" -+) ++func (j *jsiiProxy_Sum) validateSetDecorationPrefixesParameters(val *[]*string) error { ++ return nil ++} + -+func (r *jsiiProxy_ReferenceEnumFromScopedPackage) validateSaveFooParameters(value scopejsiicalclib.EnumFromScopedModule) error { -+ if value == "" { -+ return fmt.Errorf("parameter value is required, but nil was provided") -+ } ++func (j *jsiiProxy_Sum) validateSetPartsParameters(val *[]scopejsiicalclib.NumericValue) error { ++ return nil ++} + ++func (j *jsiiProxy_Sum) validateSetStringStyleParameters(val composition.CompositeOperation_CompositionStringStyle) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_RootStructValidator.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_RootStructValidator.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_RootStructValidator.go --runtime-type-checking -@@ -15,10 +15,13 @@ - } +exports[`Generated code for "jsii-calc": /go/jsiicalc/SupportsNiceJavaBuilder.go.diff 1`] = ` +--- go/jsiicalc/SupportsNiceJavaBuilder.go --no-runtime-type-checking ++++ go/jsiicalc/SupportsNiceJavaBuilder.go --runtime-type-checking +@@ -62,10 +62,13 @@ - func RootStructValidator_Validate(struct_ *RootStruct) { + + func NewSupportsNiceJavaBuilder(id *float64, defaultBar *float64, props *SupportsNiceJavaBuilderProps, rest ...*string) SupportsNiceJavaBuilder { _init_.Initialize() -+ if err := validateRootStructValidator_ValidateParameters(struct_); err != nil { ++ if err := validateNewSupportsNiceJavaBuilderParameters(id, props); err != nil { + panic(err) + } - _jsii_.StaticInvokeVoid( - "jsii-calc.RootStructValidator", - "validate", - []interface{}{struct_}, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_RootStructValidator__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_RootStructValidator__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_RootStructValidator__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateRootStructValidator_ValidateParameters(struct_ *RootStruct) error { -+ return nil -+} -+ + args := []interface{}{id, defaultBar, props} + for _, a := range rest { + args = append(args, a) + } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_RootStructValidator__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_RootStructValidator__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_RootStructValidator__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,22 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/SupportsNiceJavaBuilder__checks.go.diff 1`] = ` +--- go/jsiicalc/SupportsNiceJavaBuilder__checks.go --no-runtime-type-checking ++++ go/jsiicalc/SupportsNiceJavaBuilder__checks.go --runtime-type-checking +@@ -0,0 +1,23 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -32742,11 +32953,12 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func validateRootStructValidator_ValidateParameters(struct_ *RootStruct) error { -+ if struct_ == nil { -+ return fmt.Errorf("parameter struct_ is required, but nil was provided") ++func validateNewSupportsNiceJavaBuilderParameters(id *float64, props *SupportsNiceJavaBuilderProps) error { ++ if id == nil { ++ return fmt.Errorf("parameter id is required, but nil was provided") + } -+ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { ++ ++ if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { + return err + } + @@ -32755,28 +32967,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_RuntimeTypeChecking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_RuntimeTypeChecking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_RuntimeTypeChecking.go --runtime-type-checking -@@ -59,10 +59,13 @@ - []interface{}{arg}, - ) - } - - func (r *jsiiProxy_RuntimeTypeChecking) MethodWithOptionalArguments(arg1 *float64, arg2 *string, arg3 *time.Time) { -+ if err := r.validateMethodWithOptionalArgumentsParameters(arg1, arg2); err != nil { -+ panic(err) -+ } - _jsii_.InvokeVoid( - r, - "methodWithOptionalArguments", - []interface{}{arg1, arg2, arg3}, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_RuntimeTypeChecking__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_RuntimeTypeChecking__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_RuntimeTypeChecking__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/SupportsNiceJavaBuilder__no_checks.go.diff 1`] = ` +--- go/jsiicalc/SupportsNiceJavaBuilder__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/SupportsNiceJavaBuilder__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -32785,79 +32978,35 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (r *jsiiProxy_RuntimeTypeChecking) validateMethodWithOptionalArgumentsParameters(arg1 *float64, arg2 *string) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_RuntimeTypeChecking__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_RuntimeTypeChecking__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_RuntimeTypeChecking__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,21 @@ -+//go:build !no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+import ( -+ "fmt" -+) -+ -+func (r *jsiiProxy_RuntimeTypeChecking) validateMethodWithOptionalArgumentsParameters(arg1 *float64, arg2 *string) error { -+ if arg1 == nil { -+ return fmt.Errorf("parameter arg1 is required, but nil was provided") -+ } -+ -+ if arg2 == nil { -+ return fmt.Errorf("parameter arg2 is required, but nil was provided") -+ } -+ ++func validateNewSupportsNiceJavaBuilderParameters(id *float64, props *SupportsNiceJavaBuilderProps) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SingletonInt.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SingletonInt.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SingletonInt.go --runtime-type-checking -@@ -16,10 +16,13 @@ - type jsiiProxy_SingletonInt struct { - _ byte // padding - } +exports[`Generated code for "jsii-calc": /go/jsiicalc/SupportsNiceJavaBuilderWithRequiredProps.go.diff 1`] = ` +--- go/jsiicalc/SupportsNiceJavaBuilderWithRequiredProps.go --no-runtime-type-checking ++++ go/jsiicalc/SupportsNiceJavaBuilderWithRequiredProps.go --runtime-type-checking +@@ -51,10 +51,13 @@ - func (s *jsiiProxy_SingletonInt) IsSingletonInt(value *float64) *bool { -+ if err := s.validateIsSingletonIntParameters(value); err != nil { + + func NewSupportsNiceJavaBuilderWithRequiredProps(id *float64, props *SupportsNiceJavaBuilderProps) SupportsNiceJavaBuilderWithRequiredProps { + _init_.Initialize() + ++ if err := validateNewSupportsNiceJavaBuilderWithRequiredPropsParameters(id, props); err != nil { + panic(err) + } - var returns *bool + j := jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps{} - _jsii_.Invoke( - s, - "isSingletonInt", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SingletonInt__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SingletonInt__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SingletonInt__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (s *jsiiProxy_SingletonInt) validateIsSingletonIntParameters(value *float64) error { -+ return nil -+} -+ + _jsii_.Create( + "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", + []interface{}{id, props}, `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SingletonInt__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SingletonInt__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SingletonInt__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/SupportsNiceJavaBuilderWithRequiredProps__checks.go.diff 1`] = ` +--- go/jsiicalc/SupportsNiceJavaBuilderWithRequiredProps__checks.go --no-runtime-type-checking ++++ go/jsiicalc/SupportsNiceJavaBuilderWithRequiredProps__checks.go --runtime-type-checking +@@ -0,0 +1,26 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -32865,11 +33014,20 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" ++ ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func (s *jsiiProxy_SingletonInt) validateIsSingletonIntParameters(value *float64) error { -+ if value == nil { -+ return fmt.Errorf("parameter value is required, but nil was provided") ++func validateNewSupportsNiceJavaBuilderWithRequiredPropsParameters(id *float64, props *SupportsNiceJavaBuilderProps) error { ++ if id == nil { ++ return fmt.Errorf("parameter id is required, but nil was provided") ++ } ++ ++ if props == nil { ++ return fmt.Errorf("parameter props is required, but nil was provided") ++ } ++ if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { ++ return err + } + + return nil @@ -32877,28 +33035,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SingletonString.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SingletonString.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SingletonString.go --runtime-type-checking -@@ -16,10 +16,13 @@ - type jsiiProxy_SingletonString struct { - _ byte // padding - } - - func (s *jsiiProxy_SingletonString) IsSingletonString(value *string) *bool { -+ if err := s.validateIsSingletonStringParameters(value); err != nil { -+ panic(err) -+ } - var returns *bool - - _jsii_.Invoke( - s, - "isSingletonString", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SingletonString__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SingletonString__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SingletonString__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/SupportsNiceJavaBuilderWithRequiredProps__no_checks.go.diff 1`] = ` +--- go/jsiicalc/SupportsNiceJavaBuilderWithRequiredProps__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/SupportsNiceJavaBuilderWithRequiredProps__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -32907,265 +33046,190 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (s *jsiiProxy_SingletonString) validateIsSingletonStringParameters(value *string) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SingletonString__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SingletonString__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SingletonString__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+import ( -+ "fmt" -+) -+ -+func (s *jsiiProxy_SingletonString) validateIsSingletonStringParameters(value *string) error { -+ if value == nil { -+ return fmt.Errorf("parameter value is required, but nil was provided") -+ } -+ ++func validateNewSupportsNiceJavaBuilderWithRequiredPropsParameters(id *float64, props *SupportsNiceJavaBuilderProps) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StableClass.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StableClass.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StableClass.go --runtime-type-checking -@@ -40,10 +40,13 @@ - - - func NewStableClass(readonlyString *string, mutableNumber *float64) StableClass { - _init_.Initialize() +exports[`Generated code for "jsii-calc": /go/jsiicalc/SyncVirtualMethods.go.diff 1`] = ` +--- go/jsiicalc/SyncVirtualMethods.go --no-runtime-type-checking ++++ go/jsiicalc/SyncVirtualMethods.go --runtime-type-checking +@@ -119,42 +119,57 @@ + s, + ) + } -+ if err := validateNewStableClassParameters(readonlyString); err != nil { + func (j *jsiiProxy_SyncVirtualMethods)SetA(val *float64) { ++ if err := j.validateSetAParameters(val); err != nil { + panic(err) + } - j := jsiiProxy_StableClass{} + _jsii_.Set( + j, + "a", + val, + ) + } - _jsii_.Create( - "jsii-calc.StableClass", - []interface{}{readonlyString, mutableNumber}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StableClass__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StableClass__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StableClass__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateNewStableClassParameters(readonlyString *string) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StableClass__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StableClass__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StableClass__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+import ( -+ "fmt" -+) -+ -+func validateNewStableClassParameters(readonlyString *string) error { -+ if readonlyString == nil { -+ return fmt.Errorf("parameter readonlyString is required, but nil was provided") + func (j *jsiiProxy_SyncVirtualMethods)SetCallerIsProperty(val *float64) { ++ if err := j.validateSetCallerIsPropertyParameters(val); err != nil { ++ panic(err) + } -+ -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StaticContext.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StaticContext.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StaticContext.go --runtime-type-checking -@@ -43,10 +43,13 @@ - return returns + _jsii_.Set( + j, + "callerIsProperty", + val, + ) } - func StaticContext_SetStaticVariable(val *bool) { - _init_.Initialize() -+ if err := validateStaticContext_SetStaticVariableParameters(val); err != nil { + func (j *jsiiProxy_SyncVirtualMethods)SetOtherProperty(val *string) { ++ if err := j.validateSetOtherPropertyParameters(val); err != nil { + panic(err) + } - _jsii_.StaticSet( - "jsii-calc.StaticContext", - "staticVariable", + _jsii_.Set( + j, + "otherProperty", val, ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StaticContext__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StaticContext__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StaticContext__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateStaticContext_SetStaticVariableParameters(val *bool) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StaticContext__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StaticContext__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StaticContext__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+import ( -+ "fmt" -+) -+ -+func validateStaticContext_SetStaticVariableParameters(val *bool) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") + } + + func (j *jsiiProxy_SyncVirtualMethods)SetTheProperty(val *string) { ++ if err := j.validateSetThePropertyParameters(val); err != nil { ++ panic(err) + } -+ -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Statics.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Statics.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Statics.go --runtime-type-checking -@@ -28,10 +28,13 @@ + _jsii_.Set( + j, + "theProperty", + val, + ) + } + func (j *jsiiProxy_SyncVirtualMethods)SetValueOfOtherProperty(val *string) { ++ if err := j.validateSetValueOfOtherPropertyParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "valueOfOtherProperty", + val, + ) +@@ -185,18 +200,24 @@ - func NewStatics(value *string) Statics { - _init_.Initialize() + return returns + } -+ if err := validateNewStaticsParameters(value); err != nil { + func (s *jsiiProxy_SyncVirtualMethods) ModifyOtherProperty(value *string) { ++ if err := s.validateModifyOtherPropertyParameters(value); err != nil { + panic(err) + } - j := jsiiProxy_Statics{} - - _jsii_.Create( - "jsii-calc.Statics", + _jsii_.InvokeVoid( + s, + "modifyOtherProperty", []interface{}{value}, -@@ -53,10 +56,13 @@ - - // Jsdocs for static method. - func Statics_StaticMethod(name *string) *string { - _init_.Initialize() + ) + } -+ if err := validateStatics_StaticMethodParameters(name); err != nil { + func (s *jsiiProxy_SyncVirtualMethods) ModifyValueOfTheProperty(value *string) { ++ if err := s.validateModifyValueOfThePropertyParameters(value); err != nil { + panic(err) + } - var returns *string + _jsii_.InvokeVoid( + s, + "modifyValueOfTheProperty", + []interface{}{value}, + ) +@@ -253,10 +274,13 @@ - _jsii_.StaticInvoke( - "jsii-calc.Statics", - "staticMethod", -@@ -111,10 +117,13 @@ return returns } - func Statics_SetInstance(val Statics) { - _init_.Initialize() -+ if err := validateStatics_SetInstanceParameters(val); err != nil { + func (s *jsiiProxy_SyncVirtualMethods) VirtualMethod(n *float64) *float64 { ++ if err := s.validateVirtualMethodParameters(n); err != nil { + panic(err) + } - _jsii_.StaticSet( - "jsii-calc.Statics", - "instance", - val, - ) -@@ -131,10 +140,13 @@ + var returns *float64 + + _jsii_.Invoke( + s, + "virtualMethod", +@@ -266,10 +290,13 @@ + return returns } - func Statics_SetNonConstStatic(val *float64) { - _init_.Initialize() -+ if err := validateStatics_SetNonConstStaticParameters(val); err != nil { + func (s *jsiiProxy_SyncVirtualMethods) WriteA(value *float64) { ++ if err := s.validateWriteAParameters(value); err != nil { + panic(err) + } - _jsii_.StaticSet( - "jsii-calc.Statics", - "nonConstStatic", - val, + _jsii_.InvokeVoid( + s, + "writeA", + []interface{}{value}, ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Statics__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Statics__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Statics__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,23 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/SyncVirtualMethods__checks.go.diff 1`] = ` +--- go/jsiicalc/SyncVirtualMethods__checks.go --no-runtime-type-checking ++++ go/jsiicalc/SyncVirtualMethods__checks.go --runtime-type-checking +@@ -0,0 +1,81 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) ++ ++func (s *jsiiProxy_SyncVirtualMethods) validateModifyOtherPropertyParameters(value *string) error { ++ if value == nil { ++ return fmt.Errorf("parameter value is required, but nil was provided") ++ } + -+func validateStatics_StaticMethodParameters(name *string) error { + return nil +} + -+func validateStatics_SetInstanceParameters(val Statics) error { ++func (s *jsiiProxy_SyncVirtualMethods) validateModifyValueOfThePropertyParameters(value *string) error { ++ if value == nil { ++ return fmt.Errorf("parameter value is required, but nil was provided") ++ } ++ + return nil +} + -+func validateStatics_SetNonConstStaticParameters(val *float64) error { ++func (s *jsiiProxy_SyncVirtualMethods) validateVirtualMethodParameters(n *float64) error { ++ if n == nil { ++ return fmt.Errorf("parameter n is required, but nil was provided") ++ } ++ + return nil +} + -+func validateNewStaticsParameters(value *string) error { ++func (s *jsiiProxy_SyncVirtualMethods) validateWriteAParameters(value *float64) error { ++ if value == nil { ++ return fmt.Errorf("parameter value is required, but nil was provided") ++ } ++ + return nil +} + -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Statics__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Statics__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Statics__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,41 @@ -+//go:build !no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc ++func (j *jsiiProxy_SyncVirtualMethods) validateSetAParameters(val *float64) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } + -+import ( -+ "fmt" -+) ++ return nil ++} + -+func validateStatics_StaticMethodParameters(name *string) error { -+ if name == nil { -+ return fmt.Errorf("parameter name is required, but nil was provided") ++func (j *jsiiProxy_SyncVirtualMethods) validateSetCallerIsPropertyParameters(val *float64) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil +} + -+func validateStatics_SetInstanceParameters(val Statics) error { ++func (j *jsiiProxy_SyncVirtualMethods) validateSetOtherPropertyParameters(val *string) error { + if val == nil { + return fmt.Errorf("parameter val is required, but nil was provided") + } @@ -33173,7 +33237,7 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + return nil +} + -+func validateStatics_SetNonConstStaticParameters(val *float64) error { ++func (j *jsiiProxy_SyncVirtualMethods) validateSetThePropertyParameters(val *string) error { + if val == nil { + return fmt.Errorf("parameter val is required, but nil was provided") + } @@ -33181,9 +33245,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + return nil +} + -+func validateNewStaticsParameters(value *string) error { -+ if value == nil { -+ return fmt.Errorf("parameter value is required, but nil was provided") ++func (j *jsiiProxy_SyncVirtualMethods) validateSetValueOfOtherPropertyParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil @@ -33191,29 +33255,10 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StripInternal.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StripInternal.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StripInternal.go --runtime-type-checking -@@ -50,10 +50,13 @@ - s, - ) - } - - func (j *jsiiProxy_StripInternal)SetYouSeeMe(val *string) { -+ if err := j.validateSetYouSeeMeParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "youSeeMe", - val, - ) -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StripInternal__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StripInternal__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StripInternal__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/SyncVirtualMethods__no_checks.go.diff 1`] = ` +--- go/jsiicalc/SyncVirtualMethods__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/SyncVirtualMethods__no_checks.go --runtime-type-checking +@@ -0,0 +1,43 @@ +//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -33221,93 +33266,81 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func (j *jsiiProxy_StripInternal) validateSetYouSeeMeParameters(val *string) error { ++func (s *jsiiProxy_SyncVirtualMethods) validateModifyOtherPropertyParameters(value *string) error { + return nil +} + -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StripInternal__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StripInternal__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StripInternal__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking ++func (s *jsiiProxy_SyncVirtualMethods) validateModifyValueOfThePropertyParameters(value *string) error { ++ return nil ++} + -+// A simple calcuator built on JSII. -+package jsiicalc ++func (s *jsiiProxy_SyncVirtualMethods) validateVirtualMethodParameters(n *float64) error { ++ return nil ++} + -+import ( -+ "fmt" -+) ++func (s *jsiiProxy_SyncVirtualMethods) validateWriteAParameters(value *float64) error { ++ return nil ++} + -+func (j *jsiiProxy_StripInternal) validateSetYouSeeMeParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } ++func (j *jsiiProxy_SyncVirtualMethods) validateSetAParameters(val *float64) error { ++ return nil ++} ++ ++func (j *jsiiProxy_SyncVirtualMethods) validateSetCallerIsPropertyParameters(val *float64) error { ++ return nil ++} ++ ++func (j *jsiiProxy_SyncVirtualMethods) validateSetOtherPropertyParameters(val *string) error { ++ return nil ++} ++ ++func (j *jsiiProxy_SyncVirtualMethods) validateSetThePropertyParameters(val *string) error { ++ return nil ++} + ++func (j *jsiiProxy_SyncVirtualMethods) validateSetValueOfOtherPropertyParameters(val *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StructPassing.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StructPassing.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StructPassing.go --runtime-type-checking -@@ -40,10 +40,13 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/TestStructWithEnum.go.diff 1`] = ` +--- go/jsiicalc/TestStructWithEnum.go --no-runtime-type-checking ++++ go/jsiicalc/TestStructWithEnum.go --runtime-type-checking +@@ -66,10 +66,13 @@ + t, + ) } - func StructPassing_HowManyVarArgsDidIPass(_positional *float64, inputs ...*TopLevelStruct) *float64 { - _init_.Initialize() - -+ if err := validateStructPassing_HowManyVarArgsDidIPassParameters(_positional, &inputs); err != nil { + func (t *jsiiProxy_TestStructWithEnum) IsStringEnumA(input *StructWithEnum) *bool { ++ if err := t.validateIsStringEnumAParameters(input); err != nil { + panic(err) + } - args := []interface{}{_positional} - for _, a := range inputs { - args = append(args, a) - } + var returns *bool -@@ -60,10 +63,13 @@ - } + _jsii_.Invoke( + t, + "isStringEnumA", +@@ -79,10 +82,13 @@ - func StructPassing_RoundTrip(_positional *float64, input *TopLevelStruct) *TopLevelStruct { - _init_.Initialize() + return returns + } -+ if err := validateStructPassing_RoundTripParameters(_positional, input); err != nil { + func (t *jsiiProxy_TestStructWithEnum) IsStringEnumB(input *StructWithEnum) *bool { ++ if err := t.validateIsStringEnumBParameters(input); err != nil { + panic(err) + } - var returns *TopLevelStruct + var returns *bool - _jsii_.StaticInvoke( - "jsii-calc.StructPassing", - "roundTrip", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StructPassing__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StructPassing__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StructPassing__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,15 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateStructPassing_HowManyVarArgsDidIPassParameters(_positional *float64, inputs *[]*TopLevelStruct) error { -+ return nil -+} -+ -+func validateStructPassing_RoundTripParameters(_positional *float64, input *TopLevelStruct) error { -+ return nil -+} -+ + _jsii_.Invoke( + t, + "isStringEnumB", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StructPassing__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StructPassing__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StructPassing__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,40 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/TestStructWithEnum__checks.go.diff 1`] = ` +--- go/jsiicalc/TestStructWithEnum__checks.go --no-runtime-type-checking ++++ go/jsiicalc/TestStructWithEnum__checks.go --runtime-type-checking +@@ -0,0 +1,33 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -33319,25 +33352,18 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func validateStructPassing_HowManyVarArgsDidIPassParameters(_positional *float64, inputs *[]*TopLevelStruct) error { -+ if _positional == nil { -+ return fmt.Errorf("parameter _positional is required, but nil was provided") ++func (t *jsiiProxy_TestStructWithEnum) validateIsStringEnumAParameters(input *StructWithEnum) error { ++ if input == nil { ++ return fmt.Errorf("parameter input is required, but nil was provided") + } -+ -+ for idx_323815, v := range *inputs { -+ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter inputs[%#v]", idx_323815) }); err != nil { -+ return err -+ } ++ if err := _jsii_.ValidateStruct(input, func() string { return "parameter input" }); err != nil { ++ return err + } + + return nil +} + -+func validateStructPassing_RoundTripParameters(_positional *float64, input *TopLevelStruct) error { -+ if _positional == nil { -+ return fmt.Errorf("parameter _positional is required, but nil was provided") -+ } -+ ++func (t *jsiiProxy_TestStructWithEnum) validateIsStringEnumBParameters(input *StructWithEnum) error { + if input == nil { + return fmt.Errorf("parameter input is required, but nil was provided") + } @@ -33350,57 +33376,10 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StructUnionConsumer.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StructUnionConsumer.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StructUnionConsumer.go --runtime-type-checking -@@ -15,10 +15,13 @@ - } - - func StructUnionConsumer_IsStructA(struct_ interface{}) *bool { - _init_.Initialize() - -+ if err := validateStructUnionConsumer_IsStructAParameters(struct_); err != nil { -+ panic(err) -+ } - var returns *bool - - _jsii_.StaticInvoke( - "jsii-calc.StructUnionConsumer", - "isStructA", -@@ -30,10 +33,13 @@ - } - - func StructUnionConsumer_IsStructB(struct_ interface{}) *bool { - _init_.Initialize() - -+ if err := validateStructUnionConsumer_IsStructBParameters(struct_); err != nil { -+ panic(err) -+ } - var returns *bool - - _jsii_.StaticInvoke( - "jsii-calc.StructUnionConsumer", - "isStructB", -@@ -45,10 +51,13 @@ - } - - func StructUnionConsumer_ProvideStruct(which *string) interface{} { - _init_.Initialize() - -+ if err := validateStructUnionConsumer_ProvideStructParameters(which); err != nil { -+ panic(err) -+ } - var returns interface{} - - _jsii_.StaticInvoke( - "jsii-calc.StructUnionConsumer", - "provideStruct", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StructUnionConsumer__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StructUnionConsumer__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StructUnionConsumer__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,19 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/TestStructWithEnum__no_checks.go.diff 1`] = ` +--- go/jsiicalc/TestStructWithEnum__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/TestStructWithEnum__no_checks.go --runtime-type-checking +@@ -0,0 +1,15 @@ +//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -33408,24 +33387,20 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateStructUnionConsumer_IsStructAParameters(struct_ interface{}) error { -+ return nil -+} -+ -+func validateStructUnionConsumer_IsStructBParameters(struct_ interface{}) error { ++func (t *jsiiProxy_TestStructWithEnum) validateIsStringEnumAParameters(input *StructWithEnum) error { + return nil +} + -+func validateStructUnionConsumer_ProvideStructParameters(which *string) error { ++func (t *jsiiProxy_TestStructWithEnum) validateIsStringEnumBParameters(input *StructWithEnum) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_StructUnionConsumer__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_StructUnionConsumer__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_StructUnionConsumer__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,91 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/UnaryOperation__checks.go.diff 1`] = ` +--- go/jsiicalc/UnaryOperation__checks.go --no-runtime-type-checking ++++ go/jsiicalc/UnaryOperation__checks.go --runtime-type-checking +@@ -0,0 +1,19 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -33434,215 +33409,241 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j +import ( + "fmt" + -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + -+func validateStructUnionConsumer_IsStructAParameters(struct_ interface{}) error { -+ if struct_ == nil { -+ return fmt.Errorf("parameter struct_ is required, but nil was provided") -+ } -+ switch struct_.(type) { -+ case *StructA: -+ struct_ := struct_.(*StructA) -+ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { -+ return err -+ } -+ case StructA: -+ struct__ := struct_.(StructA) -+ struct_ := &struct__ -+ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { -+ return err -+ } -+ case *StructB: -+ struct_ := struct_.(*StructB) -+ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { -+ return err -+ } -+ case StructB: -+ struct__ := struct_.(StructB) -+ struct_ := &struct__ -+ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { -+ return err -+ } -+ default: -+ if !_jsii_.IsAnonymousProxy(struct_) { -+ return fmt.Errorf("parameter struct_ must be one of the allowed types: *StructA, *StructB; received %#v (a %T)", struct_, struct_) -+ } ++func validateNewUnaryOperationParameters(operand scopejsiicalclib.NumericValue) error { ++ if operand == nil { ++ return fmt.Errorf("parameter operand is required, but nil was provided") + } + + return nil +} + -+func validateStructUnionConsumer_IsStructBParameters(struct_ interface{}) error { -+ if struct_ == nil { -+ return fmt.Errorf("parameter struct_ is required, but nil was provided") +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/UnaryOperation__no_checks.go.diff 1`] = ` +--- go/jsiicalc/UnaryOperation__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/UnaryOperation__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateNewUnaryOperationParameters(operand scopejsiicalclib.NumericValue) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/UpcasingReflectable.go.diff 1`] = ` +--- go/jsiicalc/UpcasingReflectable.go --no-runtime-type-checking ++++ go/jsiicalc/UpcasingReflectable.go --runtime-type-checking +@@ -32,10 +32,13 @@ + + + func NewUpcasingReflectable(delegate *map[string]interface{}) UpcasingReflectable { + _init_.Initialize() + ++ if err := validateNewUpcasingReflectableParameters(delegate); err != nil { ++ panic(err) + } -+ switch struct_.(type) { -+ case *StructA: -+ struct_ := struct_.(*StructA) -+ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { -+ return err -+ } -+ case StructA: -+ struct__ := struct_.(StructA) -+ struct_ := &struct__ -+ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { -+ return err -+ } -+ case *StructB: -+ struct_ := struct_.(*StructB) -+ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { -+ return err -+ } -+ case StructB: -+ struct__ := struct_.(StructB) -+ struct_ := &struct__ -+ if err := _jsii_.ValidateStruct(struct_, func() string { return "parameter struct_" }); err != nil { -+ return err -+ } -+ default: -+ if !_jsii_.IsAnonymousProxy(struct_) { -+ return fmt.Errorf("parameter struct_ must be one of the allowed types: *StructA, *StructB; received %#v (a %T)", struct_, struct_) -+ } + j := jsiiProxy_UpcasingReflectable{} + + _jsii_.Create( + "jsii-calc.UpcasingReflectable", + []interface{}{delegate}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/UpcasingReflectable__checks.go.diff 1`] = ` +--- go/jsiicalc/UpcasingReflectable__checks.go --no-runtime-type-checking ++++ go/jsiicalc/UpcasingReflectable__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++import ( ++ "fmt" ++) ++ ++func validateNewUpcasingReflectableParameters(delegate *map[string]interface{}) error { ++ if delegate == nil { ++ return fmt.Errorf("parameter delegate is required, but nil was provided") + } + + return nil +} + -+func validateStructUnionConsumer_ProvideStructParameters(which *string) error { -+ if which == nil { -+ return fmt.Errorf("parameter which is required, but nil was provided") -+ } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/UpcasingReflectable__no_checks.go.diff 1`] = ` +--- go/jsiicalc/UpcasingReflectable__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/UpcasingReflectable__no_checks.go --runtime-type-checking +@@ -0,0 +1,11 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil + ++func validateNewUpcasingReflectableParameters(delegate *map[string]interface{}) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Sum.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Sum.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Sum.go --runtime-type-checking -@@ -126,34 +126,46 @@ - s, - ) - } +exports[`Generated code for "jsii-calc": /go/jsiicalc/UsesInterfaceWithProperties.go.diff 1`] = ` +--- go/jsiicalc/UsesInterfaceWithProperties.go --no-runtime-type-checking ++++ go/jsiicalc/UsesInterfaceWithProperties.go --runtime-type-checking +@@ -30,10 +30,13 @@ - func (j *jsiiProxy_Sum)SetDecorationPostfixes(val *[]*string) { -+ if err := j.validateSetDecorationPostfixesParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "decorationPostfixes", - val, - ) - } - func (j *jsiiProxy_Sum)SetDecorationPrefixes(val *[]*string) { -+ if err := j.validateSetDecorationPrefixesParameters(val); err != nil { + func NewUsesInterfaceWithProperties(obj IInterfaceWithProperties) UsesInterfaceWithProperties { + _init_.Initialize() + ++ if err := validateNewUsesInterfaceWithPropertiesParameters(obj); err != nil { + panic(err) + } - _jsii_.Set( - j, - "decorationPrefixes", - val, - ) + j := jsiiProxy_UsesInterfaceWithProperties{} + + _jsii_.Create( + "jsii-calc.UsesInterfaceWithProperties", + []interface{}{obj}, +@@ -65,10 +68,13 @@ + + return returns } - func (j *jsiiProxy_Sum)SetParts(val *[]scopejsiicalclib.NumericValue) { -+ if err := j.validateSetPartsParameters(val); err != nil { + func (u *jsiiProxy_UsesInterfaceWithProperties) ReadStringAndNumber(ext IInterfaceWithPropertiesExtension) *string { ++ if err := u.validateReadStringAndNumberParameters(ext); err != nil { + panic(err) + } - _jsii_.Set( - j, - "parts", - val, - ) + var returns *string + + _jsii_.Invoke( + u, + "readStringAndNumber", +@@ -78,10 +84,13 @@ + + return returns } - func (j *jsiiProxy_Sum)SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) { -+ if err := j.validateSetStringStyleParameters(val); err != nil { + func (u *jsiiProxy_UsesInterfaceWithProperties) WriteAndRead(value *string) *string { ++ if err := u.validateWriteAndReadParameters(value); err != nil { + panic(err) + } - _jsii_.Set( - j, - "stringStyle", - val, - ) + var returns *string + + _jsii_.Invoke( + u, + "writeAndRead", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Sum__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Sum__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Sum__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,23 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/UsesInterfaceWithProperties__checks.go.diff 1`] = ` +--- go/jsiicalc/UsesInterfaceWithProperties__checks.go --no-runtime-type-checking ++++ go/jsiicalc/UsesInterfaceWithProperties__checks.go --runtime-type-checking +@@ -0,0 +1,33 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) + -+func (j *jsiiProxy_Sum) validateSetDecorationPostfixesParameters(val *[]*string) error { -+ return nil -+} ++func (u *jsiiProxy_UsesInterfaceWithProperties) validateReadStringAndNumberParameters(ext IInterfaceWithPropertiesExtension) error { ++ if ext == nil { ++ return fmt.Errorf("parameter ext is required, but nil was provided") ++ } + -+func (j *jsiiProxy_Sum) validateSetDecorationPrefixesParameters(val *[]*string) error { + return nil +} + -+func (j *jsiiProxy_Sum) validateSetPartsParameters(val *[]scopejsiicalclib.NumericValue) error { ++func (u *jsiiProxy_UsesInterfaceWithProperties) validateWriteAndReadParameters(value *string) error { ++ if value == nil { ++ return fmt.Errorf("parameter value is required, but nil was provided") ++ } ++ + return nil +} + -+func (j *jsiiProxy_Sum) validateSetStringStyleParameters(val composition.CompositeOperation_CompositionStringStyle) error { ++func validateNewUsesInterfaceWithPropertiesParameters(obj IInterfaceWithProperties) error { ++ if obj == nil { ++ return fmt.Errorf("parameter obj is required, but nil was provided") ++ } ++ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_Sum__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_Sum__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_Sum__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,44 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/UsesInterfaceWithProperties__no_checks.go.diff 1`] = ` +--- go/jsiicalc/UsesInterfaceWithProperties__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/UsesInterfaceWithProperties__no_checks.go --runtime-type-checking +@@ -0,0 +1,19 @@ ++//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+import ( -+ "fmt" -+ -+ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition" -+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" -+) -+ -+func (j *jsiiProxy_Sum) validateSetDecorationPostfixesParameters(val *[]*string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } ++// Building without runtime type checking enabled, so all the below just return nil + ++func (u *jsiiProxy_UsesInterfaceWithProperties) validateReadStringAndNumberParameters(ext IInterfaceWithPropertiesExtension) error { + return nil +} + -+func (j *jsiiProxy_Sum) validateSetDecorationPrefixesParameters(val *[]*string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } ++func (u *jsiiProxy_UsesInterfaceWithProperties) validateWriteAndReadParameters(value *string) error { ++ return nil ++} + ++func validateNewUsesInterfaceWithPropertiesParameters(obj IInterfaceWithProperties) error { + return nil +} + -+func (j *jsiiProxy_Sum) validateSetPartsParameters(val *[]scopejsiicalclib.NumericValue) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/VariadicInvoker.go.diff 1`] = ` +--- go/jsiicalc/VariadicInvoker.go --no-runtime-type-checking ++++ go/jsiicalc/VariadicInvoker.go --runtime-type-checking +@@ -16,10 +16,13 @@ + } + + func NewVariadicInvoker(method VariadicMethod) VariadicInvoker { + _init_.Initialize() + ++ if err := validateNewVariadicInvokerParameters(method); err != nil { ++ panic(err) ++ } + j := jsiiProxy_VariadicInvoker{} + + _jsii_.Create( + "jsii-calc.VariadicInvoker", + []interface{}{method}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/VariadicInvoker__checks.go.diff 1`] = ` +--- go/jsiicalc/VariadicInvoker__checks.go --no-runtime-type-checking ++++ go/jsiicalc/VariadicInvoker__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ ++//go:build !no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc + -+ return nil -+} ++import ( ++ "fmt" ++) + -+func (j *jsiiProxy_Sum) validateSetStringStyleParameters(val composition.CompositeOperation_CompositionStringStyle) error { -+ if val == "" { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func validateNewVariadicInvokerParameters(method VariadicMethod) error { ++ if method == nil { ++ return fmt.Errorf("parameter method is required, but nil was provided") + } + + return nil @@ -33650,27 +33651,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SupportsNiceJavaBuilder.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SupportsNiceJavaBuilder.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SupportsNiceJavaBuilder.go --runtime-type-checking -@@ -62,10 +62,13 @@ - - - func NewSupportsNiceJavaBuilder(id *float64, defaultBar *float64, props *SupportsNiceJavaBuilderProps, rest ...*string) SupportsNiceJavaBuilder { - _init_.Initialize() - -+ if err := validateNewSupportsNiceJavaBuilderParameters(id, props); err != nil { -+ panic(err) -+ } - args := []interface{}{id, defaultBar, props} - for _, a := range rest { - args = append(args, a) - } -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SupportsNiceJavaBuilder__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SupportsNiceJavaBuilder__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SupportsNiceJavaBuilder__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/VariadicInvoker__no_checks.go.diff 1`] = ` +--- go/jsiicalc/VariadicInvoker__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/VariadicInvoker__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -33679,16 +33662,34 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewSupportsNiceJavaBuilderParameters(id *float64, props *SupportsNiceJavaBuilderProps) error { ++func validateNewVariadicInvokerParameters(method VariadicMethod) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SupportsNiceJavaBuilder__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SupportsNiceJavaBuilder__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SupportsNiceJavaBuilder__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,23 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/VariadicMethod.go.diff 1`] = ` +--- go/jsiicalc/VariadicMethod.go --no-runtime-type-checking ++++ go/jsiicalc/VariadicMethod.go --runtime-type-checking +@@ -48,10 +48,13 @@ + v, + ) + } + + func (v *jsiiProxy_VariadicMethod) AsArray(first *float64, others ...*float64) *[]*float64 { ++ if err := v.validateAsArrayParameters(first); err != nil { ++ panic(err) ++ } + args := []interface{}{first} + for _, a := range others { + args = append(args, a) + } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/VariadicMethod__checks.go.diff 1`] = ` +--- go/jsiicalc/VariadicMethod__checks.go --no-runtime-type-checking ++++ go/jsiicalc/VariadicMethod__checks.go --runtime-type-checking +@@ -0,0 +1,17 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -33696,17 +33697,11 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +import ( + "fmt" -+ -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func validateNewSupportsNiceJavaBuilderParameters(id *float64, props *SupportsNiceJavaBuilderProps) error { -+ if id == nil { -+ return fmt.Errorf("parameter id is required, but nil was provided") -+ } -+ -+ if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { -+ return err ++func (v *jsiiProxy_VariadicMethod) validateAsArrayParameters(first *float64) error { ++ if first == nil { ++ return fmt.Errorf("parameter first is required, but nil was provided") + } + + return nil @@ -33714,28 +33709,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SupportsNiceJavaBuilderWithRequiredProps.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SupportsNiceJavaBuilderWithRequiredProps.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SupportsNiceJavaBuilderWithRequiredProps.go --runtime-type-checking -@@ -51,10 +51,13 @@ - - - func NewSupportsNiceJavaBuilderWithRequiredProps(id *float64, props *SupportsNiceJavaBuilderProps) SupportsNiceJavaBuilderWithRequiredProps { - _init_.Initialize() - -+ if err := validateNewSupportsNiceJavaBuilderWithRequiredPropsParameters(id, props); err != nil { -+ panic(err) -+ } - j := jsiiProxy_SupportsNiceJavaBuilderWithRequiredProps{} - - _jsii_.Create( - "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", - []interface{}{id, props}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SupportsNiceJavaBuilderWithRequiredProps__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SupportsNiceJavaBuilderWithRequiredProps__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SupportsNiceJavaBuilderWithRequiredProps__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/VariadicMethod__no_checks.go.diff 1`] = ` +--- go/jsiicalc/VariadicMethod__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/VariadicMethod__no_checks.go --runtime-type-checking @@ -0,0 +1,11 @@ +//go:build no_runtime_type_checking + @@ -33744,16 +33720,49 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewSupportsNiceJavaBuilderWithRequiredPropsParameters(id *float64, props *SupportsNiceJavaBuilderProps) error { ++func (v *jsiiProxy_VariadicMethod) validateAsArrayParameters(first *float64) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SupportsNiceJavaBuilderWithRequiredProps__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SupportsNiceJavaBuilderWithRequiredProps__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SupportsNiceJavaBuilderWithRequiredProps__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,26 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/VariadicTypeUnion.go.diff 1`] = ` +--- go/jsiicalc/VariadicTypeUnion.go --no-runtime-type-checking ++++ go/jsiicalc/VariadicTypeUnion.go --runtime-type-checking +@@ -28,10 +28,13 @@ + + + func NewVariadicTypeUnion(union ...interface{}) VariadicTypeUnion { + _init_.Initialize() + ++ if err := validateNewVariadicTypeUnionParameters(&union); err != nil { ++ panic(err) ++ } + args := []interface{}{} + for _, a := range union { + args = append(args, a) + } + +@@ -60,10 +63,13 @@ + v, + ) + } + + func (j *jsiiProxy_VariadicTypeUnion)SetUnion(val *[]interface{}) { ++ if err := j.validateSetUnionParameters(val); err != nil { ++ panic(err) ++ } + _jsii_.Set( + j, + "union", + val, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/VariadicTypeUnion__checks.go.diff 1`] = ` +--- go/jsiicalc/VariadicTypeUnion__checks.go --no-runtime-type-checking ++++ go/jsiicalc/VariadicTypeUnion__checks.go --runtime-type-checking +@@ -0,0 +1,84 @@ +//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. @@ -33765,16 +33774,74 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func validateNewSupportsNiceJavaBuilderWithRequiredPropsParameters(id *float64, props *SupportsNiceJavaBuilderProps) error { -+ if id == nil { -+ return fmt.Errorf("parameter id is required, but nil was provided") ++func (j *jsiiProxy_VariadicTypeUnion) validateSetUnionParameters(val *[]interface{}) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } -+ -+ if props == nil { -+ return fmt.Errorf("parameter props is required, but nil was provided") ++ for idx_97dfc6, v := range *val { ++ switch v.(type) { ++ case *StructA: ++ v := v.(*StructA) ++ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { ++ return err ++ } ++ case StructA: ++ v_ := v.(StructA) ++ v := &v_ ++ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { ++ return err ++ } ++ case *StructB: ++ v := v.(*StructB) ++ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { ++ return err ++ } ++ case StructB: ++ v_ := v.(StructB) ++ v := &v_ ++ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { ++ return err ++ } ++ default: ++ if !_jsii_.IsAnonymousProxy(v) { ++ return fmt.Errorf("parameter val[%#v] must be one of the allowed types: *StructA, *StructB; received %#v (a %T)", idx_97dfc6, v, v) ++ } ++ } + } -+ if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { -+ return err ++ ++ return nil ++} ++ ++func validateNewVariadicTypeUnionParameters(union *[]interface{}) error { ++ for idx_ef3ff7, v := range *union { ++ switch v.(type) { ++ case *StructA: ++ v := v.(*StructA) ++ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter union[%#v]", idx_ef3ff7) }); err != nil { ++ return err ++ } ++ case StructA: ++ v_ := v.(StructA) ++ v := &v_ ++ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter union[%#v]", idx_ef3ff7) }); err != nil { ++ return err ++ } ++ case *StructB: ++ v := v.(*StructB) ++ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter union[%#v]", idx_ef3ff7) }); err != nil { ++ return err ++ } ++ case StructB: ++ v_ := v.(StructB) ++ v := &v_ ++ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter union[%#v]", idx_ef3ff7) }); err != nil { ++ return err ++ } ++ default: ++ if !_jsii_.IsAnonymousProxy(v) { ++ return fmt.Errorf("parameter union[%#v] must be one of the allowed types: *StructA, *StructB; received %#v (a %T)", idx_ef3ff7, v, v) ++ } ++ } + } + + return nil @@ -33782,344 +33849,347 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SyncVirtualMethods.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SyncVirtualMethods.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SyncVirtualMethods.go --runtime-type-checking -@@ -119,42 +119,57 @@ - s, +exports[`Generated code for "jsii-calc": /go/jsiicalc/VariadicTypeUnion__no_checks.go.diff 1`] = ` +--- go/jsiicalc/VariadicTypeUnion__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/VariadicTypeUnion__no_checks.go --runtime-type-checking +@@ -0,0 +1,15 @@ ++//go:build no_runtime_type_checking ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (j *jsiiProxy_VariadicTypeUnion) validateSetUnionParameters(val *[]interface{}) error { ++ return nil ++} ++ ++func validateNewVariadicTypeUnionParameters(union *[]interface{}) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/VirtualMethodPlayground.go.diff 1`] = ` +--- go/jsiicalc/VirtualMethodPlayground.go --no-runtime-type-checking ++++ go/jsiicalc/VirtualMethodPlayground.go --runtime-type-checking +@@ -42,10 +42,13 @@ + v, ) } - func (j *jsiiProxy_SyncVirtualMethods)SetA(val *float64) { -+ if err := j.validateSetAParameters(val); err != nil { + func (v *jsiiProxy_VirtualMethodPlayground) OverrideMeAsync(index *float64) *float64 { ++ if err := v.validateOverrideMeAsyncParameters(index); err != nil { + panic(err) + } - _jsii_.Set( - j, - "a", - val, - ) - } + var returns *float64 - func (j *jsiiProxy_SyncVirtualMethods)SetCallerIsProperty(val *float64) { -+ if err := j.validateSetCallerIsPropertyParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "callerIsProperty", - val, - ) - } + _jsii_.Invoke( + v, + "overrideMeAsync", +@@ -55,10 +58,13 @@ - func (j *jsiiProxy_SyncVirtualMethods)SetOtherProperty(val *string) { -+ if err := j.validateSetOtherPropertyParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "otherProperty", - val, - ) + return returns } - func (j *jsiiProxy_SyncVirtualMethods)SetTheProperty(val *string) { -+ if err := j.validateSetThePropertyParameters(val); err != nil { + func (v *jsiiProxy_VirtualMethodPlayground) OverrideMeSync(index *float64) *float64 { ++ if err := v.validateOverrideMeSyncParameters(index); err != nil { + panic(err) + } - _jsii_.Set( - j, - "theProperty", - val, - ) - } + var returns *float64 - func (j *jsiiProxy_SyncVirtualMethods)SetValueOfOtherProperty(val *string) { -+ if err := j.validateSetValueOfOtherPropertyParameters(val); err != nil { -+ panic(err) -+ } - _jsii_.Set( - j, - "valueOfOtherProperty", - val, - ) -@@ -185,18 +200,24 @@ + _jsii_.Invoke( + v, + "overrideMeSync", +@@ -68,10 +74,13 @@ return returns } - func (s *jsiiProxy_SyncVirtualMethods) ModifyOtherProperty(value *string) { -+ if err := s.validateModifyOtherPropertyParameters(value); err != nil { + func (v *jsiiProxy_VirtualMethodPlayground) ParallelSumAsync(count *float64) *float64 { ++ if err := v.validateParallelSumAsyncParameters(count); err != nil { + panic(err) + } - _jsii_.InvokeVoid( - s, - "modifyOtherProperty", - []interface{}{value}, - ) - } + var returns *float64 - func (s *jsiiProxy_SyncVirtualMethods) ModifyValueOfTheProperty(value *string) { -+ if err := s.validateModifyValueOfThePropertyParameters(value); err != nil { -+ panic(err) -+ } - _jsii_.InvokeVoid( - s, - "modifyValueOfTheProperty", - []interface{}{value}, - ) -@@ -253,10 +274,13 @@ + _jsii_.Invoke( + v, + "parallelSumAsync", +@@ -81,10 +90,13 @@ return returns } - func (s *jsiiProxy_SyncVirtualMethods) VirtualMethod(n *float64) *float64 { -+ if err := s.validateVirtualMethodParameters(n); err != nil { + func (v *jsiiProxy_VirtualMethodPlayground) SerialSumAsync(count *float64) *float64 { ++ if err := v.validateSerialSumAsyncParameters(count); err != nil { + panic(err) + } var returns *float64 _jsii_.Invoke( - s, - "virtualMethod", -@@ -266,10 +290,13 @@ + v, + "serialSumAsync", +@@ -94,10 +106,13 @@ return returns } - func (s *jsiiProxy_SyncVirtualMethods) WriteA(value *float64) { -+ if err := s.validateWriteAParameters(value); err != nil { + func (v *jsiiProxy_VirtualMethodPlayground) SumSync(count *float64) *float64 { ++ if err := v.validateSumSyncParameters(count); err != nil { + panic(err) + } - _jsii_.InvokeVoid( - s, - "writeA", - []interface{}{value}, - ) + var returns *float64 + + _jsii_.Invoke( + v, + "sumSync", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SyncVirtualMethods__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SyncVirtualMethods__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SyncVirtualMethods__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,43 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/VirtualMethodPlayground__checks.go.diff 1`] = ` +--- go/jsiicalc/VirtualMethodPlayground__checks.go --no-runtime-type-checking ++++ go/jsiicalc/VirtualMethodPlayground__checks.go --runtime-type-checking +@@ -0,0 +1,49 @@ ++//go:build !no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) + -+func (s *jsiiProxy_SyncVirtualMethods) validateModifyOtherPropertyParameters(value *string) error { -+ return nil -+} ++func (v *jsiiProxy_VirtualMethodPlayground) validateOverrideMeAsyncParameters(index *float64) error { ++ if index == nil { ++ return fmt.Errorf("parameter index is required, but nil was provided") ++ } + -+func (s *jsiiProxy_SyncVirtualMethods) validateModifyValueOfThePropertyParameters(value *string) error { + return nil +} + -+func (s *jsiiProxy_SyncVirtualMethods) validateVirtualMethodParameters(n *float64) error { -+ return nil -+} ++func (v *jsiiProxy_VirtualMethodPlayground) validateOverrideMeSyncParameters(index *float64) error { ++ if index == nil { ++ return fmt.Errorf("parameter index is required, but nil was provided") ++ } + -+func (s *jsiiProxy_SyncVirtualMethods) validateWriteAParameters(value *float64) error { + return nil +} + -+func (j *jsiiProxy_SyncVirtualMethods) validateSetAParameters(val *float64) error { -+ return nil -+} ++func (v *jsiiProxy_VirtualMethodPlayground) validateParallelSumAsyncParameters(count *float64) error { ++ if count == nil { ++ return fmt.Errorf("parameter count is required, but nil was provided") ++ } + -+func (j *jsiiProxy_SyncVirtualMethods) validateSetCallerIsPropertyParameters(val *float64) error { + return nil +} + -+func (j *jsiiProxy_SyncVirtualMethods) validateSetOtherPropertyParameters(val *string) error { -+ return nil -+} ++func (v *jsiiProxy_VirtualMethodPlayground) validateSerialSumAsyncParameters(count *float64) error { ++ if count == nil { ++ return fmt.Errorf("parameter count is required, but nil was provided") ++ } + -+func (j *jsiiProxy_SyncVirtualMethods) validateSetThePropertyParameters(val *string) error { + return nil +} + -+func (j *jsiiProxy_SyncVirtualMethods) validateSetValueOfOtherPropertyParameters(val *string) error { ++func (v *jsiiProxy_VirtualMethodPlayground) validateSumSyncParameters(count *float64) error { ++ if count == nil { ++ return fmt.Errorf("parameter count is required, but nil was provided") ++ } ++ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_SyncVirtualMethods__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_SyncVirtualMethods__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_SyncVirtualMethods__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,81 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/VirtualMethodPlayground__no_checks.go.diff 1`] = ` +--- go/jsiicalc/VirtualMethodPlayground__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/VirtualMethodPlayground__no_checks.go --runtime-type-checking +@@ -0,0 +1,27 @@ ++//go:build no_runtime_type_checking + +// A simple calcuator built on JSII. +package jsiicalc + -+import ( -+ "fmt" -+) -+ -+func (s *jsiiProxy_SyncVirtualMethods) validateModifyOtherPropertyParameters(value *string) error { -+ if value == nil { -+ return fmt.Errorf("parameter value is required, but nil was provided") -+ } ++// Building without runtime type checking enabled, so all the below just return nil + ++func (v *jsiiProxy_VirtualMethodPlayground) validateOverrideMeAsyncParameters(index *float64) error { + return nil +} + -+func (s *jsiiProxy_SyncVirtualMethods) validateModifyValueOfThePropertyParameters(value *string) error { -+ if value == nil { -+ return fmt.Errorf("parameter value is required, but nil was provided") -+ } -+ ++func (v *jsiiProxy_VirtualMethodPlayground) validateOverrideMeSyncParameters(index *float64) error { + return nil +} + -+func (s *jsiiProxy_SyncVirtualMethods) validateVirtualMethodParameters(n *float64) error { -+ if n == nil { -+ return fmt.Errorf("parameter n is required, but nil was provided") -+ } -+ ++func (v *jsiiProxy_VirtualMethodPlayground) validateParallelSumAsyncParameters(count *float64) error { + return nil +} + -+func (s *jsiiProxy_SyncVirtualMethods) validateWriteAParameters(value *float64) error { -+ if value == nil { -+ return fmt.Errorf("parameter value is required, but nil was provided") -+ } -+ ++func (v *jsiiProxy_VirtualMethodPlayground) validateSerialSumAsyncParameters(count *float64) error { + return nil +} + -+func (j *jsiiProxy_SyncVirtualMethods) validateSetAParameters(val *float64) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } -+ ++func (v *jsiiProxy_VirtualMethodPlayground) validateSumSyncParameters(count *float64) error { + return nil +} + -+func (j *jsiiProxy_SyncVirtualMethods) validateSetCallerIsPropertyParameters(val *float64) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/UseOptions.go.diff 1`] = ` +--- go/jsiicalc/anonymous/UseOptions.go --no-runtime-type-checking ++++ go/jsiicalc/anonymous/UseOptions.go --runtime-type-checking +@@ -14,10 +14,13 @@ + } + + func UseOptions_Consume(option interface{}) *string { + _init_.Initialize() + ++ if err := validateUseOptions_ConsumeParameters(option); err != nil { ++ panic(err) ++ } + var returns *string + + _jsii_.StaticInvoke( + "jsii-calc.anonymous.UseOptions", + "consume", +@@ -29,10 +32,13 @@ + } + + func UseOptions_PrivideAsAny(which *string) interface{} { + _init_.Initialize() + ++ if err := validateUseOptions_PrivideAsAnyParameters(which); err != nil { ++ panic(err) ++ } + var returns interface{} + + _jsii_.StaticInvoke( + "jsii-calc.anonymous.UseOptions", + "privideAsAny", +@@ -44,10 +50,13 @@ + } + + func UseOptions_Provide(which *string) interface{} { + _init_.Initialize() + ++ if err := validateUseOptions_ProvideParameters(which); err != nil { ++ panic(err) + } + var returns interface{} + + _jsii_.StaticInvoke( + "jsii-calc.anonymous.UseOptions", + "provide", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/UseOptions__checks.go.diff 1`] = ` +--- go/jsiicalc/anonymous/UseOptions__checks.go --no-runtime-type-checking ++++ go/jsiicalc/anonymous/UseOptions__checks.go --runtime-type-checking +@@ -0,0 +1,44 @@ ++//go:build !no_runtime_type_checking + -+ return nil -+} ++package anonymous + -+func (j *jsiiProxy_SyncVirtualMethods) validateSetOtherPropertyParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") -+ } ++import ( ++ "fmt" + -+ return nil -+} ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++) + -+func (j *jsiiProxy_SyncVirtualMethods) validateSetThePropertyParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func validateUseOptions_ConsumeParameters(option interface{}) error { ++ if option == nil { ++ return fmt.Errorf("parameter option is required, but nil was provided") ++ } ++ switch option.(type) { ++ case IOptionA: ++ // ok ++ case IOptionB: ++ // ok ++ default: ++ if !_jsii_.IsAnonymousProxy(option) { ++ return fmt.Errorf("parameter option must be one of the allowed types: IOptionA, IOptionB; received %#v (a %T)", option, option) ++ } + } + + return nil +} + -+func (j *jsiiProxy_SyncVirtualMethods) validateSetValueOfOtherPropertyParameters(val *string) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func validateUseOptions_PrivideAsAnyParameters(which *string) error { ++ if which == nil { ++ return fmt.Errorf("parameter which is required, but nil was provided") + } + + return nil +} + -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_TestStructWithEnum.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_TestStructWithEnum.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_TestStructWithEnum.go --runtime-type-checking -@@ -66,10 +66,13 @@ - t, - ) - } - - func (t *jsiiProxy_TestStructWithEnum) IsStringEnumA(input *StructWithEnum) *bool { -+ if err := t.validateIsStringEnumAParameters(input); err != nil { -+ panic(err) -+ } - var returns *bool - - _jsii_.Invoke( - t, - "isStringEnumA", -@@ -79,10 +82,13 @@ - - return returns - } - - func (t *jsiiProxy_TestStructWithEnum) IsStringEnumB(input *StructWithEnum) *bool { -+ if err := t.validateIsStringEnumBParameters(input); err != nil { -+ panic(err) ++func validateUseOptions_ProvideParameters(which *string) error { ++ if which == nil { ++ return fmt.Errorf("parameter which is required, but nil was provided") + } - var returns *bool - - _jsii_.Invoke( - t, - "isStringEnumB", ++ ++ return nil ++} ++ `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_TestStructWithEnum__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_TestStructWithEnum__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_TestStructWithEnum__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,15 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/UseOptions__no_checks.go.diff 1`] = ` +--- go/jsiicalc/anonymous/UseOptions__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/anonymous/UseOptions__no_checks.go --runtime-type-checking +@@ -0,0 +1,18 @@ +//go:build no_runtime_type_checking + -+// A simple calcuator built on JSII. -+package jsiicalc ++package anonymous + +// Building without runtime type checking enabled, so all the below just return nil + -+func (t *jsiiProxy_TestStructWithEnum) validateIsStringEnumAParameters(input *StructWithEnum) error { ++func validateUseOptions_ConsumeParameters(option interface{}) error { + return nil +} + -+func (t *jsiiProxy_TestStructWithEnum) validateIsStringEnumBParameters(input *StructWithEnum) error { ++func validateUseOptions_PrivideAsAnyParameters(which *string) error { ++ return nil ++} ++ ++func validateUseOptions_ProvideParameters(which *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_TestStructWithEnum__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_TestStructWithEnum__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_TestStructWithEnum__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,33 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/Cdk16625.go.diff 1`] = ` +--- go/jsiicalc/cdk16625/Cdk16625.go --no-runtime-type-checking ++++ go/jsiicalc/cdk16625/Cdk16625.go --runtime-type-checking +@@ -36,10 +36,13 @@ + nil, // no parameters + ) + } + + func (c *jsiiProxy_Cdk16625) Unwrap(gen jsiicalc.IRandomNumberGenerator) *float64 { ++ if err := c.validateUnwrapParameters(gen); err != nil { ++ panic(err) ++ } + var returns *float64 + + _jsii_.Invoke( + c, + "unwrap", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/Cdk16625__checks.go.diff 1`] = ` +--- go/jsiicalc/cdk16625/Cdk16625__checks.go --no-runtime-type-checking ++++ go/jsiicalc/cdk16625/Cdk16625__checks.go --runtime-type-checking +@@ -0,0 +1,18 @@ +//go:build !no_runtime_type_checking + -+// A simple calcuator built on JSII. -+package jsiicalc ++package cdk16625 + +import ( + "fmt" + -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3" +) + -+func (t *jsiiProxy_TestStructWithEnum) validateIsStringEnumAParameters(input *StructWithEnum) error { -+ if input == nil { -+ return fmt.Errorf("parameter input is required, but nil was provided") -+ } -+ if err := _jsii_.ValidateStruct(input, func() string { return "parameter input" }); err != nil { -+ return err -+ } -+ -+ return nil -+} -+ -+func (t *jsiiProxy_TestStructWithEnum) validateIsStringEnumBParameters(input *StructWithEnum) error { -+ if input == nil { -+ return fmt.Errorf("parameter input is required, but nil was provided") -+ } -+ if err := _jsii_.ValidateStruct(input, func() string { return "parameter input" }); err != nil { -+ return err ++func (c *jsiiProxy_Cdk16625) validateUnwrapParameters(gen jsiicalc.IRandomNumberGenerator) error { ++ if gen == nil { ++ return fmt.Errorf("parameter gen is required, but nil was provided") + } + + return nil @@ -34127,41 +34197,56 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UnaryOperation__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_UnaryOperation__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_UnaryOperation__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/Cdk16625__no_checks.go.diff 1`] = ` +--- go/jsiicalc/cdk16625/Cdk16625__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/cdk16625/Cdk16625__no_checks.go --runtime-type-checking +@@ -0,0 +1,10 @@ +//go:build no_runtime_type_checking + -+// A simple calcuator built on JSII. -+package jsiicalc ++package cdk16625 + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewUnaryOperationParameters(operand scopejsiicalclib.NumericValue) error { ++func (c *jsiiProxy_Cdk16625) validateUnwrapParameters(gen jsiicalc.IRandomNumberGenerator) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UnaryOperation__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_UnaryOperation__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_UnaryOperation__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,19 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/UnimportedSubmoduleType.go.diff 1`] = ` +--- go/jsiicalc/cdk16625/donotimport/UnimportedSubmoduleType.go --no-runtime-type-checking ++++ go/jsiicalc/cdk16625/donotimport/UnimportedSubmoduleType.go --runtime-type-checking +@@ -29,10 +29,13 @@ + } + + func NewUnimportedSubmoduleType(value *float64) UnimportedSubmoduleType { + _init_.Initialize() + ++ if err := validateNewUnimportedSubmoduleTypeParameters(value); err != nil { ++ panic(err) ++ } + j := jsiiProxy_UnimportedSubmoduleType{} + + _jsii_.Create( + "jsii-calc.cdk16625.donotimport.UnimportedSubmoduleType", + []interface{}{value}, +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/UnimportedSubmoduleType__checks.go.diff 1`] = ` +--- go/jsiicalc/cdk16625/donotimport/UnimportedSubmoduleType__checks.go --no-runtime-type-checking ++++ go/jsiicalc/cdk16625/donotimport/UnimportedSubmoduleType__checks.go --runtime-type-checking +@@ -0,0 +1,16 @@ +//go:build !no_runtime_type_checking + -+// A simple calcuator built on JSII. -+package jsiicalc ++package donotimport + +import ( + "fmt" -+ -+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" +) + -+func validateNewUnaryOperationParameters(operand scopejsiicalclib.NumericValue) error { -+ if operand == nil { -+ return fmt.Errorf("parameter operand is required, but nil was provided") ++func validateNewUnimportedSubmoduleTypeParameters(value *float64) error { ++ if value == nil { ++ return fmt.Errorf("parameter value is required, but nil was provided") + } + + return nil @@ -34169,169 +34254,156 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UpcasingReflectable.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_UpcasingReflectable.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_UpcasingReflectable.go --runtime-type-checking -@@ -32,10 +32,13 @@ - +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/UnimportedSubmoduleType__no_checks.go.diff 1`] = ` +--- go/jsiicalc/cdk16625/donotimport/UnimportedSubmoduleType__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/cdk16625/donotimport/UnimportedSubmoduleType__no_checks.go --runtime-type-checking +@@ -0,0 +1,10 @@ ++//go:build no_runtime_type_checking ++ ++package donotimport ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateNewUnimportedSubmoduleTypeParameters(value *float64) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/AcceptsPath.go.diff 1`] = ` +--- go/jsiicalc/cdk22369/AcceptsPath.go --no-runtime-type-checking ++++ go/jsiicalc/cdk22369/AcceptsPath.go --runtime-type-checking +@@ -14,10 +14,13 @@ + } - func NewUpcasingReflectable(delegate *map[string]interface{}) UpcasingReflectable { + func NewAcceptsPath(props *AcceptsPathProps) AcceptsPath { _init_.Initialize() -+ if err := validateNewUpcasingReflectableParameters(delegate); err != nil { ++ if err := validateNewAcceptsPathParameters(props); err != nil { + panic(err) + } - j := jsiiProxy_UpcasingReflectable{} + j := jsiiProxy_AcceptsPath{} _jsii_.Create( - "jsii-calc.UpcasingReflectable", - []interface{}{delegate}, + "jsii-calc.cdk22369.AcceptsPath", + []interface{}{props}, `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UpcasingReflectable__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_UpcasingReflectable__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_UpcasingReflectable__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/AcceptsPath__checks.go.diff 1`] = ` +--- go/jsiicalc/cdk22369/AcceptsPath__checks.go --no-runtime-type-checking ++++ go/jsiicalc/cdk22369/AcceptsPath__checks.go --runtime-type-checking +@@ -0,0 +1,21 @@ ++//go:build !no_runtime_type_checking + -+// A simple calcuator built on JSII. -+package jsiicalc ++package cdk22369 + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++ ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++) ++ ++func validateNewAcceptsPathParameters(props *AcceptsPathProps) error { ++ if props == nil { ++ return fmt.Errorf("parameter props is required, but nil was provided") ++ } ++ if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { ++ return err ++ } + -+func validateNewUpcasingReflectableParameters(delegate *map[string]interface{}) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UpcasingReflectable__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_UpcasingReflectable__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_UpcasingReflectable__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc +exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/AcceptsPath__no_checks.go.diff 1`] = ` +--- go/jsiicalc/cdk22369/AcceptsPath__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/cdk22369/AcceptsPath__no_checks.go --runtime-type-checking +@@ -0,0 +1,10 @@ ++//go:build no_runtime_type_checking + -+import ( -+ "fmt" -+) ++package cdk22369 + -+func validateNewUpcasingReflectableParameters(delegate *map[string]interface{}) error { -+ if delegate == nil { -+ return fmt.Errorf("parameter delegate is required, but nil was provided") -+ } ++// Building without runtime type checking enabled, so all the below just return nil + ++func validateNewAcceptsPathParameters(props *AcceptsPathProps) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UsesInterfaceWithProperties.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_UsesInterfaceWithProperties.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_UsesInterfaceWithProperties.go --runtime-type-checking -@@ -30,10 +30,13 @@ - - - func NewUsesInterfaceWithProperties(obj IInterfaceWithProperties) UsesInterfaceWithProperties { - _init_.Initialize() +exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/CompositeOperation.go.diff 1`] = ` +--- go/jsiicalc/composition/CompositeOperation.go --no-runtime-type-checking ++++ go/jsiicalc/composition/CompositeOperation.go --runtime-type-checking +@@ -97,26 +97,35 @@ + c, + ) + } -+ if err := validateNewUsesInterfaceWithPropertiesParameters(obj); err != nil { + func (j *jsiiProxy_CompositeOperation)SetDecorationPostfixes(val *[]*string) { ++ if err := j.validateSetDecorationPostfixesParameters(val); err != nil { + panic(err) + } - j := jsiiProxy_UsesInterfaceWithProperties{} - - _jsii_.Create( - "jsii-calc.UsesInterfaceWithProperties", - []interface{}{obj}, -@@ -65,10 +68,13 @@ - - return returns + _jsii_.Set( + j, + "decorationPostfixes", + val, + ) } - func (u *jsiiProxy_UsesInterfaceWithProperties) ReadStringAndNumber(ext IInterfaceWithPropertiesExtension) *string { -+ if err := u.validateReadStringAndNumberParameters(ext); err != nil { + func (j *jsiiProxy_CompositeOperation)SetDecorationPrefixes(val *[]*string) { ++ if err := j.validateSetDecorationPrefixesParameters(val); err != nil { + panic(err) + } - var returns *string - - _jsii_.Invoke( - u, - "readStringAndNumber", -@@ -78,10 +84,13 @@ - - return returns + _jsii_.Set( + j, + "decorationPrefixes", + val, + ) } - func (u *jsiiProxy_UsesInterfaceWithProperties) WriteAndRead(value *string) *string { -+ if err := u.validateWriteAndReadParameters(value); err != nil { + func (j *jsiiProxy_CompositeOperation)SetStringStyle(val CompositeOperation_CompositionStringStyle) { ++ if err := j.validateSetStringStyleParameters(val); err != nil { + panic(err) + } - var returns *string - - _jsii_.Invoke( - u, - "writeAndRead", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UsesInterfaceWithProperties__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_UsesInterfaceWithProperties__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_UsesInterfaceWithProperties__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,19 @@ -+//go:build no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (u *jsiiProxy_UsesInterfaceWithProperties) validateReadStringAndNumberParameters(ext IInterfaceWithPropertiesExtension) error { -+ return nil -+} -+ -+func (u *jsiiProxy_UsesInterfaceWithProperties) validateWriteAndReadParameters(value *string) error { -+ return nil -+} -+ -+func validateNewUsesInterfaceWithPropertiesParameters(obj IInterfaceWithProperties) error { -+ return nil -+} -+ + _jsii_.Set( + j, + "stringStyle", + val, + ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_UsesInterfaceWithProperties__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_UsesInterfaceWithProperties__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_UsesInterfaceWithProperties__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,33 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/CompositeOperation__checks.go.diff 1`] = ` +--- go/jsiicalc/composition/CompositeOperation__checks.go --no-runtime-type-checking ++++ go/jsiicalc/composition/CompositeOperation__checks.go --runtime-type-checking +@@ -0,0 +1,32 @@ +//go:build !no_runtime_type_checking + -+// A simple calcuator built on JSII. -+package jsiicalc ++package composition + +import ( + "fmt" +) + -+func (u *jsiiProxy_UsesInterfaceWithProperties) validateReadStringAndNumberParameters(ext IInterfaceWithPropertiesExtension) error { -+ if ext == nil { -+ return fmt.Errorf("parameter ext is required, but nil was provided") ++func (j *jsiiProxy_CompositeOperation) validateSetDecorationPostfixesParameters(val *[]*string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil +} + -+func (u *jsiiProxy_UsesInterfaceWithProperties) validateWriteAndReadParameters(value *string) error { -+ if value == nil { -+ return fmt.Errorf("parameter value is required, but nil was provided") ++func (j *jsiiProxy_CompositeOperation) validateSetDecorationPrefixesParameters(val *[]*string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil +} + -+func validateNewUsesInterfaceWithPropertiesParameters(obj IInterfaceWithProperties) error { -+ if obj == nil { -+ return fmt.Errorf("parameter obj is required, but nil was provided") ++func (j *jsiiProxy_CompositeOperation) validateSetStringStyleParameters(val CompositeOperation_CompositionStringStyle) error { ++ if val == "" { ++ return fmt.Errorf("parameter val is required, but nil was provided") + } + + return nil @@ -34339,185 +34411,170 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VariadicInvoker.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_VariadicInvoker.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_VariadicInvoker.go --runtime-type-checking -@@ -16,10 +16,13 @@ - } - - func NewVariadicInvoker(method VariadicMethod) VariadicInvoker { - _init_.Initialize() - -+ if err := validateNewVariadicInvokerParameters(method); err != nil { -+ panic(err) -+ } - j := jsiiProxy_VariadicInvoker{} - - _jsii_.Create( - "jsii-calc.VariadicInvoker", - []interface{}{method}, -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VariadicInvoker__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_VariadicInvoker__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_VariadicInvoker__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/CompositeOperation__no_checks.go.diff 1`] = ` +--- go/jsiicalc/composition/CompositeOperation__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/composition/CompositeOperation__no_checks.go --runtime-type-checking +@@ -0,0 +1,18 @@ +//go:build no_runtime_type_checking + -+// A simple calcuator built on JSII. -+package jsiicalc ++package composition + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateNewVariadicInvokerParameters(method VariadicMethod) error { ++func (j *jsiiProxy_CompositeOperation) validateSetDecorationPostfixesParameters(val *[]*string) error { + return nil +} + -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VariadicInvoker__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_VariadicInvoker__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_VariadicInvoker__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc -+ -+import ( -+ "fmt" -+) -+ -+func validateNewVariadicInvokerParameters(method VariadicMethod) error { -+ if method == nil { -+ return fmt.Errorf("parameter method is required, but nil was provided") -+ } ++func (j *jsiiProxy_CompositeOperation) validateSetDecorationPrefixesParameters(val *[]*string) error { ++ return nil ++} + ++func (j *jsiiProxy_CompositeOperation) validateSetStringStyleParameters(val CompositeOperation_CompositionStringStyle) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VariadicMethod.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_VariadicMethod.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_VariadicMethod.go --runtime-type-checking -@@ -48,10 +48,13 @@ - v, +exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/Base.go.diff 1`] = ` +--- go/jsiicalc/derivedclasshasnoproperties/Base.go --no-runtime-type-checking ++++ go/jsiicalc/derivedclasshasnoproperties/Base.go --runtime-type-checking +@@ -49,10 +49,13 @@ + b, ) } - func (v *jsiiProxy_VariadicMethod) AsArray(first *float64, others ...*float64) *[]*float64 { -+ if err := v.validateAsArrayParameters(first); err != nil { + func (j *jsiiProxy_Base)SetProp(val *string) { ++ if err := j.validateSetPropParameters(val); err != nil { + panic(err) + } - args := []interface{}{first} - for _, a := range others { - args = append(args, a) - } + _jsii_.Set( + j, + "prop", + val, + ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VariadicMethod__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_VariadicMethod__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_VariadicMethod__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,11 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/Base__checks.go.diff 1`] = ` +--- go/jsiicalc/derivedclasshasnoproperties/Base__checks.go --no-runtime-type-checking ++++ go/jsiicalc/derivedclasshasnoproperties/Base__checks.go --runtime-type-checking +@@ -0,0 +1,16 @@ ++//go:build !no_runtime_type_checking + -+// A simple calcuator built on JSII. -+package jsiicalc ++package derivedclasshasnoproperties + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) ++ ++func (j *jsiiProxy_Base) validateSetPropParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } + -+func (v *jsiiProxy_VariadicMethod) validateAsArrayParameters(first *float64) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VariadicMethod__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_VariadicMethod__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_VariadicMethod__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,17 @@ -+//go:build !no_runtime_type_checking -+ -+// A simple calcuator built on JSII. -+package jsiicalc +exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/Base__no_checks.go.diff 1`] = ` +--- go/jsiicalc/derivedclasshasnoproperties/Base__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/derivedclasshasnoproperties/Base__no_checks.go --runtime-type-checking +@@ -0,0 +1,10 @@ ++//go:build no_runtime_type_checking + -+import ( -+ "fmt" -+) ++package derivedclasshasnoproperties + -+func (v *jsiiProxy_VariadicMethod) validateAsArrayParameters(first *float64) error { -+ if first == nil { -+ return fmt.Errorf("parameter first is required, but nil was provided") -+ } ++// Building without runtime type checking enabled, so all the below just return nil + ++func (j *jsiiProxy_Base) validateSetPropParameters(val *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VariadicTypeUnion.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_VariadicTypeUnion.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_VariadicTypeUnion.go --runtime-type-checking -@@ -28,10 +28,13 @@ - - - func NewVariadicTypeUnion(union ...interface{}) VariadicTypeUnion { - _init_.Initialize() - -+ if err := validateNewVariadicTypeUnionParameters(&union); err != nil { -+ panic(err) -+ } - args := []interface{}{} - for _, a := range union { - args = append(args, a) - } - -@@ -60,10 +63,13 @@ - v, +exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/Derived.go.diff 1`] = ` +--- go/jsiicalc/derivedclasshasnoproperties/Derived.go --no-runtime-type-checking ++++ go/jsiicalc/derivedclasshasnoproperties/Derived.go --runtime-type-checking +@@ -50,10 +50,13 @@ + d, ) } - func (j *jsiiProxy_VariadicTypeUnion)SetUnion(val *[]interface{}) { -+ if err := j.validateSetUnionParameters(val); err != nil { + func (j *jsiiProxy_Derived)SetProp(val *string) { ++ if err := j.validateSetPropParameters(val); err != nil { + panic(err) + } _jsii_.Set( j, - "union", + "prop", val, ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VariadicTypeUnion__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_VariadicTypeUnion__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_VariadicTypeUnion__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,15 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/Derived__checks.go.diff 1`] = ` +--- go/jsiicalc/derivedclasshasnoproperties/Derived__checks.go --no-runtime-type-checking ++++ go/jsiicalc/derivedclasshasnoproperties/Derived__checks.go --runtime-type-checking +@@ -0,0 +1,16 @@ ++//go:build !no_runtime_type_checking + -+// A simple calcuator built on JSII. -+package jsiicalc ++package derivedclasshasnoproperties + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) ++ ++func (j *jsiiProxy_Derived) validateSetPropParameters(val *string) error { ++ if val == nil { ++ return fmt.Errorf("parameter val is required, but nil was provided") ++ } + -+func (j *jsiiProxy_VariadicTypeUnion) validateSetUnionParameters(val *[]interface{}) error { + return nil +} + -+func validateNewVariadicTypeUnionParameters(union *[]interface{}) error { +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/Derived__no_checks.go.diff 1`] = ` +--- go/jsiicalc/derivedclasshasnoproperties/Derived__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/derivedclasshasnoproperties/Derived__no_checks.go --runtime-type-checking +@@ -0,0 +1,10 @@ ++//go:build no_runtime_type_checking ++ ++package derivedclasshasnoproperties ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (j *jsiiProxy_Derived) validateSetPropParameters(val *string) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VariadicTypeUnion__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_VariadicTypeUnion__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_VariadicTypeUnion__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,84 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/Consumer.go.diff 1`] = ` +--- go/jsiicalc/homonymousforwardreferences/bar/Consumer.go --no-runtime-type-checking ++++ go/jsiicalc/homonymousforwardreferences/bar/Consumer.go --runtime-type-checking +@@ -14,10 +14,13 @@ + } + + func Consumer_Consume(props *ConsumerProps) *Homonymous { + _init_.Initialize() + ++ if err := validateConsumer_ConsumeParameters(props); err != nil { ++ panic(err) ++ } + var returns *Homonymous + + _jsii_.StaticInvoke( + "jsii-calc.homonymousForwardReferences.bar.Consumer", + "consume", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/Consumer__checks.go.diff 1`] = ` +--- go/jsiicalc/homonymousforwardreferences/bar/Consumer__checks.go --no-runtime-type-checking ++++ go/jsiicalc/homonymousforwardreferences/bar/Consumer__checks.go --runtime-type-checking +@@ -0,0 +1,21 @@ +//go:build !no_runtime_type_checking + -+// A simple calcuator built on JSII. -+package jsiicalc ++package bar + +import ( + "fmt" @@ -34525,247 +34582,188 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func (j *jsiiProxy_VariadicTypeUnion) validateSetUnionParameters(val *[]interface{}) error { -+ if val == nil { -+ return fmt.Errorf("parameter val is required, but nil was provided") ++func validateConsumer_ConsumeParameters(props *ConsumerProps) error { ++ if props == nil { ++ return fmt.Errorf("parameter props is required, but nil was provided") + } -+ for idx_97dfc6, v := range *val { -+ switch v.(type) { -+ case *StructA: -+ v := v.(*StructA) -+ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { -+ return err -+ } -+ case StructA: -+ v_ := v.(StructA) -+ v := &v_ -+ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { -+ return err -+ } -+ case *StructB: -+ v := v.(*StructB) -+ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { -+ return err -+ } -+ case StructB: -+ v_ := v.(StructB) -+ v := &v_ -+ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter val[%#v]", idx_97dfc6) }); err != nil { -+ return err -+ } -+ default: -+ if !_jsii_.IsAnonymousProxy(v) { -+ return fmt.Errorf("parameter val[%#v] must be one of the allowed types: *StructA, *StructB; received %#v (a %T)", idx_97dfc6, v, v) -+ } -+ } ++ if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { ++ return err + } + + return nil +} + -+func validateNewVariadicTypeUnionParameters(union *[]interface{}) error { -+ for idx_ef3ff7, v := range *union { -+ switch v.(type) { -+ case *StructA: -+ v := v.(*StructA) -+ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter union[%#v]", idx_ef3ff7) }); err != nil { -+ return err -+ } -+ case StructA: -+ v_ := v.(StructA) -+ v := &v_ -+ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter union[%#v]", idx_ef3ff7) }); err != nil { -+ return err -+ } -+ case *StructB: -+ v := v.(*StructB) -+ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter union[%#v]", idx_ef3ff7) }); err != nil { -+ return err -+ } -+ case StructB: -+ v_ := v.(StructB) -+ v := &v_ -+ if err := _jsii_.ValidateStruct(v, func() string { return fmt.Sprintf("parameter union[%#v]", idx_ef3ff7) }); err != nil { -+ return err -+ } -+ default: -+ if !_jsii_.IsAnonymousProxy(v) { -+ return fmt.Errorf("parameter union[%#v] must be one of the allowed types: *StructA, *StructB; received %#v (a %T)", idx_ef3ff7, v, v) -+ } -+ } -+ } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/Consumer__no_checks.go.diff 1`] = ` +--- go/jsiicalc/homonymousforwardreferences/bar/Consumer__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/homonymousforwardreferences/bar/Consumer__no_checks.go --runtime-type-checking +@@ -0,0 +1,10 @@ ++//go:build no_runtime_type_checking ++ ++package bar ++ ++// Building without runtime type checking enabled, so all the below just return nil + ++func validateConsumer_ConsumeParameters(props *ConsumerProps) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VirtualMethodPlayground.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_VirtualMethodPlayground.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_VirtualMethodPlayground.go --runtime-type-checking -@@ -42,10 +42,13 @@ - v, - ) - } - - func (v *jsiiProxy_VirtualMethodPlayground) OverrideMeAsync(index *float64) *float64 { -+ if err := v.validateOverrideMeAsyncParameters(index); err != nil { -+ panic(err) -+ } - var returns *float64 - - _jsii_.Invoke( - v, - "overrideMeAsync", -@@ -55,10 +58,13 @@ - - return returns - } - - func (v *jsiiProxy_VirtualMethodPlayground) OverrideMeSync(index *float64) *float64 { -+ if err := v.validateOverrideMeSyncParameters(index); err != nil { -+ panic(err) -+ } - var returns *float64 - - _jsii_.Invoke( - v, - "overrideMeSync", -@@ -68,10 +74,13 @@ - - return returns - } - - func (v *jsiiProxy_VirtualMethodPlayground) ParallelSumAsync(count *float64) *float64 { -+ if err := v.validateParallelSumAsyncParameters(count); err != nil { -+ panic(err) -+ } - var returns *float64 - - _jsii_.Invoke( - v, - "parallelSumAsync", -@@ -81,10 +90,13 @@ - - return returns +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/Consumer.go.diff 1`] = ` +--- go/jsiicalc/homonymousforwardreferences/foo/Consumer.go --no-runtime-type-checking ++++ go/jsiicalc/homonymousforwardreferences/foo/Consumer.go --runtime-type-checking +@@ -14,10 +14,13 @@ } - func (v *jsiiProxy_VirtualMethodPlayground) SerialSumAsync(count *float64) *float64 { -+ if err := v.validateSerialSumAsyncParameters(count); err != nil { -+ panic(err) -+ } - var returns *float64 - - _jsii_.Invoke( - v, - "serialSumAsync", -@@ -94,10 +106,13 @@ - - return returns - } + func Consumer_Consume(props *ConsumerProps) *Homonymous { + _init_.Initialize() - func (v *jsiiProxy_VirtualMethodPlayground) SumSync(count *float64) *float64 { -+ if err := v.validateSumSyncParameters(count); err != nil { ++ if err := validateConsumer_ConsumeParameters(props); err != nil { + panic(err) + } - var returns *float64 + var returns *Homonymous - _jsii_.Invoke( - v, - "sumSync", + _jsii_.StaticInvoke( + "jsii-calc.homonymousForwardReferences.foo.Consumer", + "consume", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VirtualMethodPlayground__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_VirtualMethodPlayground__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_VirtualMethodPlayground__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,27 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/Consumer__checks.go.diff 1`] = ` +--- go/jsiicalc/homonymousforwardreferences/foo/Consumer__checks.go --no-runtime-type-checking ++++ go/jsiicalc/homonymousforwardreferences/foo/Consumer__checks.go --runtime-type-checking +@@ -0,0 +1,21 @@ ++//go:build !no_runtime_type_checking + -+// A simple calcuator built on JSII. -+package jsiicalc ++package foo + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" + -+func (v *jsiiProxy_VirtualMethodPlayground) validateOverrideMeAsyncParameters(index *float64) error { -+ return nil -+} ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++) + -+func (v *jsiiProxy_VirtualMethodPlayground) validateOverrideMeSyncParameters(index *float64) error { -+ return nil -+} ++func validateConsumer_ConsumeParameters(props *ConsumerProps) error { ++ if props == nil { ++ return fmt.Errorf("parameter props is required, but nil was provided") ++ } ++ if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { ++ return err ++ } + -+func (v *jsiiProxy_VirtualMethodPlayground) validateParallelSumAsyncParameters(count *float64) error { + return nil +} + -+func (v *jsiiProxy_VirtualMethodPlayground) validateSerialSumAsyncParameters(count *float64) error { -+ return nil -+} +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/Consumer__no_checks.go.diff 1`] = ` +--- go/jsiicalc/homonymousforwardreferences/foo/Consumer__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/homonymousforwardreferences/foo/Consumer__no_checks.go --runtime-type-checking +@@ -0,0 +1,10 @@ ++//go:build no_runtime_type_checking + -+func (v *jsiiProxy_VirtualMethodPlayground) validateSumSyncParameters(count *float64) error { ++package foo ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateConsumer_ConsumeParameters(props *ConsumerProps) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_VirtualMethodPlayground__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/jsiicalc_VirtualMethodPlayground__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/jsiicalc_VirtualMethodPlayground__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,49 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/OverrideMe.go.diff 1`] = ` +--- go/jsiicalc/jsii3656/OverrideMe.go --no-runtime-type-checking ++++ go/jsiicalc/jsii3656/OverrideMe.go --runtime-type-checking +@@ -25,10 +25,13 @@ + } + + func OverrideMe_CallAbstract(receiver OverrideMe) *bool { + _init_.Initialize() + ++ if err := validateOverrideMe_CallAbstractParameters(receiver); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.jsii3656.OverrideMe", + "callAbstract", +@@ -38,10 +41,13 @@ + + return returns + } + + func (o *jsiiProxy_OverrideMe) ImplementMe(opts *ImplementMeOpts) *bool { ++ if err := o.validateImplementMeParameters(opts); err != nil { ++ panic(err) ++ } + var returns *bool + + _jsii_.Invoke( + o, + "implementMe", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/OverrideMe__checks.go.diff 1`] = ` +--- go/jsiicalc/jsii3656/OverrideMe__checks.go --no-runtime-type-checking ++++ go/jsiicalc/jsii3656/OverrideMe__checks.go --runtime-type-checking +@@ -0,0 +1,29 @@ +//go:build !no_runtime_type_checking + -+// A simple calcuator built on JSII. -+package jsiicalc ++package jsii3656 + +import ( + "fmt" ++ ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + -+func (v *jsiiProxy_VirtualMethodPlayground) validateOverrideMeAsyncParameters(index *float64) error { -+ if index == nil { -+ return fmt.Errorf("parameter index is required, but nil was provided") ++func (o *jsiiProxy_OverrideMe) validateImplementMeParameters(opts *ImplementMeOpts) error { ++ if opts == nil { ++ return fmt.Errorf("parameter opts is required, but nil was provided") ++ } ++ if err := _jsii_.ValidateStruct(opts, func() string { return "parameter opts" }); err != nil { ++ return err + } + + return nil +} + -+func (v *jsiiProxy_VirtualMethodPlayground) validateOverrideMeSyncParameters(index *float64) error { -+ if index == nil { -+ return fmt.Errorf("parameter index is required, but nil was provided") ++func validateOverrideMe_CallAbstractParameters(receiver OverrideMe) error { ++ if receiver == nil { ++ return fmt.Errorf("parameter receiver is required, but nil was provided") + } + + return nil +} + -+func (v *jsiiProxy_VirtualMethodPlayground) validateParallelSumAsyncParameters(count *float64) error { -+ if count == nil { -+ return fmt.Errorf("parameter count is required, but nil was provided") -+ } +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/OverrideMe__no_checks.go.diff 1`] = ` +--- go/jsiicalc/jsii3656/OverrideMe__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/jsii3656/OverrideMe__no_checks.go --runtime-type-checking +@@ -0,0 +1,14 @@ ++//go:build no_runtime_type_checking + -+ return nil -+} ++package jsii3656 + -+func (v *jsiiProxy_VirtualMethodPlayground) validateSerialSumAsyncParameters(count *float64) error { -+ if count == nil { -+ return fmt.Errorf("parameter count is required, but nil was provided") -+ } ++// Building without runtime type checking enabled, so all the below just return nil + ++func (o *jsiiProxy_OverrideMe) validateImplementMeParameters(opts *ImplementMeOpts) error { + return nil +} + -+func (v *jsiiProxy_VirtualMethodPlayground) validateSumSyncParameters(count *float64) error { -+ if count == nil { -+ return fmt.Errorf("parameter count is required, but nil was provided") -+ } -+ ++func validateOverrideMe_CallAbstractParameters(receiver OverrideMe) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2530/module2530_MyClass.go.diff 1`] = ` ---- go/jsiicalc/module2530/module2530_MyClass.go --no-runtime-type-checking -+++ go/jsiicalc/module2530/module2530_MyClass.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2530/MyClass.go.diff 1`] = ` +--- go/jsiicalc/module2530/MyClass.go --no-runtime-type-checking ++++ go/jsiicalc/module2530/MyClass.go --runtime-type-checking @@ -18,10 +18,13 @@ } @@ -34807,71 +34805,71 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/m ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2530/module2530_MyClass__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/module2530/module2530_MyClass__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/module2530/module2530_MyClass__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,18 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2530/MyClass__checks.go.diff 1`] = ` +--- go/jsiicalc/module2530/MyClass__checks.go --no-runtime-type-checking ++++ go/jsiicalc/module2530/MyClass__checks.go --runtime-type-checking +@@ -0,0 +1,32 @@ ++//go:build !no_runtime_type_checking + +package module2530 + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) + +func (m *jsiiProxy_MyClass) validateFooParameters(_arg *string) error { ++ if _arg == nil { ++ return fmt.Errorf("parameter _arg is required, but nil was provided") ++ } ++ + return nil +} + +func validateMyClass_BarParameters(_arg *bool) error { ++ if _arg == nil { ++ return fmt.Errorf("parameter _arg is required, but nil was provided") ++ } ++ + return nil +} + +func validateNewMyClassParameters(_arg *float64) error { ++ if _arg == nil { ++ return fmt.Errorf("parameter _arg is required, but nil was provided") ++ } ++ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2530/module2530_MyClass__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/module2530/module2530_MyClass__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/module2530/module2530_MyClass__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,32 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2530/MyClass__no_checks.go.diff 1`] = ` +--- go/jsiicalc/module2530/MyClass__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/module2530/MyClass__no_checks.go --runtime-type-checking +@@ -0,0 +1,18 @@ ++//go:build no_runtime_type_checking + +package module2530 + -+import ( -+ "fmt" -+) ++// Building without runtime type checking enabled, so all the below just return nil + +func (m *jsiiProxy_MyClass) validateFooParameters(_arg *string) error { -+ if _arg == nil { -+ return fmt.Errorf("parameter _arg is required, but nil was provided") -+ } -+ + return nil +} + +func validateMyClass_BarParameters(_arg *bool) error { -+ if _arg == nil { -+ return fmt.Errorf("parameter _arg is required, but nil was provided") -+ } -+ + return nil +} + +func validateNewMyClassParameters(_arg *float64) error { -+ if _arg == nil { -+ return fmt.Errorf("parameter _arg is required, but nil was provided") -+ } -+ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2647/module2647_ExtendAndImplement.go.diff 1`] = ` ---- go/jsiicalc/module2647/module2647_ExtendAndImplement.go --no-runtime-type-checking -+++ go/jsiicalc/module2647/module2647_ExtendAndImplement.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2647/ExtendAndImplement.go.diff 1`] = ` +--- go/jsiicalc/module2647/ExtendAndImplement.go --no-runtime-type-checking ++++ go/jsiicalc/module2647/ExtendAndImplement.go --runtime-type-checking @@ -31,10 +31,13 @@ // Deprecated. @@ -34902,29 +34900,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/m ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2647/module2647_ExtendAndImplement__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/module2647/module2647_ExtendAndImplement__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/module2647/module2647_ExtendAndImplement__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,14 @@ -+//go:build no_runtime_type_checking -+ -+package module2647 -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (e *jsiiProxy_ExtendAndImplement) validateFooParameters(obj jcb.IBaseInterface) error { -+ return nil -+} -+ -+func validateNewExtendAndImplementParameters(very scopejsiicalcbaseofbase.Very) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2647/module2647_ExtendAndImplement__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/module2647/module2647_ExtendAndImplement__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/module2647/module2647_ExtendAndImplement__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2647/ExtendAndImplement__checks.go.diff 1`] = ` +--- go/jsiicalc/module2647/ExtendAndImplement__checks.go --no-runtime-type-checking ++++ go/jsiicalc/module2647/ExtendAndImplement__checks.go --runtime-type-checking @@ -0,0 +1,27 @@ +//go:build !no_runtime_type_checking + @@ -34955,9 +34933,29 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/m + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/methods/methods_MyClass.go.diff 1`] = ` ---- go/jsiicalc/module2689/methods/methods_MyClass.go --no-runtime-type-checking -+++ go/jsiicalc/module2689/methods/methods_MyClass.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2647/ExtendAndImplement__no_checks.go.diff 1`] = ` +--- go/jsiicalc/module2647/ExtendAndImplement__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/module2647/ExtendAndImplement__no_checks.go --runtime-type-checking +@@ -0,0 +1,14 @@ ++//go:build no_runtime_type_checking ++ ++package module2647 ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (e *jsiiProxy_ExtendAndImplement) validateFooParameters(obj jcb.IBaseInterface) error { ++ return nil ++} ++ ++func validateNewExtendAndImplementParameters(very scopejsiicalcbaseofbase.Very) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/methods/MyClass.go.diff 1`] = ` +--- go/jsiicalc/module2689/methods/MyClass.go --no-runtime-type-checking ++++ go/jsiicalc/module2689/methods/MyClass.go --runtime-type-checking @@ -41,18 +41,24 @@ m, ) @@ -34985,29 +34983,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/m ) `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/methods/methods_MyClass__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/module2689/methods/methods_MyClass__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/module2689/methods/methods_MyClass__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,14 @@ -+//go:build no_runtime_type_checking -+ -+package methods -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (m *jsiiProxy_MyClass) validateBarParameters(_bar *map[string]*jcb.BaseProps) error { -+ return nil -+} -+ -+func (m *jsiiProxy_MyClass) validateFooParameters(_values *[]scopejsiicalclib.Number) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/methods/methods_MyClass__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/module2689/methods/methods_MyClass__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/module2689/methods/methods_MyClass__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/methods/MyClass__checks.go.diff 1`] = ` +--- go/jsiicalc/module2689/methods/MyClass__checks.go --no-runtime-type-checking ++++ go/jsiicalc/module2689/methods/MyClass__checks.go --runtime-type-checking @@ -0,0 +1,34 @@ +//go:build !no_runtime_type_checking + @@ -35045,9 +35023,29 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/m + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself_ClassWithSelf.go.diff 1`] = ` ---- go/jsiicalc/pythonself/pythonself_ClassWithSelf.go --no-runtime-type-checking -+++ go/jsiicalc/pythonself/pythonself_ClassWithSelf.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/module2689/methods/MyClass__no_checks.go.diff 1`] = ` +--- go/jsiicalc/module2689/methods/MyClass__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/module2689/methods/MyClass__no_checks.go --runtime-type-checking +@@ -0,0 +1,14 @@ ++//go:build no_runtime_type_checking ++ ++package methods ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (m *jsiiProxy_MyClass) validateBarParameters(_bar *map[string]*jcb.BaseProps) error { ++ return nil ++} ++ ++func (m *jsiiProxy_MyClass) validateFooParameters(_values *[]scopejsiicalclib.Number) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/ClassWithSelf.go.diff 1`] = ` +--- go/jsiicalc/pythonself/ClassWithSelf.go --no-runtime-type-checking ++++ go/jsiicalc/pythonself/ClassWithSelf.go --runtime-type-checking @@ -27,10 +27,13 @@ @@ -35078,59 +35076,59 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/p "method", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself_ClassWithSelf__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/pythonself/pythonself_ClassWithSelf__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/pythonself/pythonself_ClassWithSelf__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,14 @@ -+//go:build no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/ClassWithSelf__checks.go.diff 1`] = ` +--- go/jsiicalc/pythonself/ClassWithSelf__checks.go --no-runtime-type-checking ++++ go/jsiicalc/pythonself/ClassWithSelf__checks.go --runtime-type-checking +@@ -0,0 +1,24 @@ ++//go:build !no_runtime_type_checking + +package pythonself + -+// Building without runtime type checking enabled, so all the below just return nil ++import ( ++ "fmt" ++) + +func (c *jsiiProxy_ClassWithSelf) validateMethodParameters(self *float64) error { ++ if self == nil { ++ return fmt.Errorf("parameter self is required, but nil was provided") ++ } ++ + return nil +} + +func validateNewClassWithSelfParameters(self *string) error { ++ if self == nil { ++ return fmt.Errorf("parameter self is required, but nil was provided") ++ } ++ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself_ClassWithSelf__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/pythonself/pythonself_ClassWithSelf__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/pythonself/pythonself_ClassWithSelf__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,24 @@ -+//go:build !no_runtime_type_checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/ClassWithSelf__no_checks.go.diff 1`] = ` +--- go/jsiicalc/pythonself/ClassWithSelf__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/pythonself/ClassWithSelf__no_checks.go --runtime-type-checking +@@ -0,0 +1,14 @@ ++//go:build no_runtime_type_checking + +package pythonself + -+import ( -+ "fmt" -+) ++// Building without runtime type checking enabled, so all the below just return nil + +func (c *jsiiProxy_ClassWithSelf) validateMethodParameters(self *float64) error { -+ if self == nil { -+ return fmt.Errorf("parameter self is required, but nil was provided") -+ } -+ + return nil +} + +func validateNewClassWithSelfParameters(self *string) error { -+ if self == nil { -+ return fmt.Errorf("parameter self is required, but nil was provided") -+ } -+ + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself_ClassWithSelfKwarg.go.diff 1`] = ` ---- go/jsiicalc/pythonself/pythonself_ClassWithSelfKwarg.go --no-runtime-type-checking -+++ go/jsiicalc/pythonself/pythonself_ClassWithSelfKwarg.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/ClassWithSelfKwarg.go.diff 1`] = ` +--- go/jsiicalc/pythonself/ClassWithSelfKwarg.go --no-runtime-type-checking ++++ go/jsiicalc/pythonself/ClassWithSelfKwarg.go --runtime-type-checking @@ -26,10 +26,13 @@ @@ -35147,25 +35145,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/p []interface{}{props}, `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself_ClassWithSelfKwarg__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/pythonself/pythonself_ClassWithSelfKwarg__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/pythonself/pythonself_ClassWithSelfKwarg__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,10 @@ -+//go:build no_runtime_type_checking -+ -+package pythonself -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func validateNewClassWithSelfKwargParameters(props *StructWithSelf) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself_ClassWithSelfKwarg__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/pythonself/pythonself_ClassWithSelfKwarg__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/pythonself/pythonself_ClassWithSelfKwarg__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/ClassWithSelfKwarg__checks.go.diff 1`] = ` +--- go/jsiicalc/pythonself/ClassWithSelfKwarg__checks.go --no-runtime-type-checking ++++ go/jsiicalc/pythonself/ClassWithSelfKwarg__checks.go --runtime-type-checking @@ -0,0 +1,21 @@ +//go:build !no_runtime_type_checking + @@ -35190,9 +35172,25 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/p + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself_IInterfaceWithSelf.go.diff 1`] = ` ---- go/jsiicalc/pythonself/pythonself_IInterfaceWithSelf.go --no-runtime-type-checking -+++ go/jsiicalc/pythonself/pythonself_IInterfaceWithSelf.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/ClassWithSelfKwarg__no_checks.go.diff 1`] = ` +--- go/jsiicalc/pythonself/ClassWithSelfKwarg__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/pythonself/ClassWithSelfKwarg__no_checks.go --runtime-type-checking +@@ -0,0 +1,10 @@ ++//go:build no_runtime_type_checking ++ ++package pythonself ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateNewClassWithSelfKwargParameters(props *StructWithSelf) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/IInterfaceWithSelf.go.diff 1`] = ` +--- go/jsiicalc/pythonself/IInterfaceWithSelf.go --no-runtime-type-checking ++++ go/jsiicalc/pythonself/IInterfaceWithSelf.go --runtime-type-checking @@ -12,10 +12,13 @@ type jsiiProxy_IInterfaceWithSelf struct { _ byte // padding @@ -35209,25 +35207,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/p "method", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself_IInterfaceWithSelf__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/pythonself/pythonself_IInterfaceWithSelf__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/pythonself/pythonself_IInterfaceWithSelf__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,10 @@ -+//go:build no_runtime_type_checking -+ -+package pythonself -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (i *jsiiProxy_IInterfaceWithSelf) validateMethodParameters(self *float64) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/pythonself_IInterfaceWithSelf__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/pythonself/pythonself_IInterfaceWithSelf__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/pythonself/pythonself_IInterfaceWithSelf__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/IInterfaceWithSelf__checks.go.diff 1`] = ` +--- go/jsiicalc/pythonself/IInterfaceWithSelf__checks.go --no-runtime-type-checking ++++ go/jsiicalc/pythonself/IInterfaceWithSelf__checks.go --runtime-type-checking @@ -0,0 +1,16 @@ +//go:build !no_runtime_type_checking + @@ -35247,68 +35229,25 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/p + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/isolated_Kwargs.go.diff 1`] = ` ---- go/jsiicalc/submodule/isolated/isolated_Kwargs.go --no-runtime-type-checking -+++ go/jsiicalc/submodule/isolated/isolated_Kwargs.go --runtime-type-checking -@@ -17,10 +17,13 @@ - } - - func Kwargs_Method(props *child.KwargsProps) *bool { - _init_.Initialize() - -+ if err := validateKwargs_MethodParameters(props); err != nil { -+ panic(err) -+ } - var returns *bool - - _jsii_.StaticInvoke( - "jsii-calc.submodule.isolated.Kwargs", - "method", -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/isolated_Kwargs__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/submodule/isolated/isolated_Kwargs__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/submodule/isolated/isolated_Kwargs__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/pythonself/IInterfaceWithSelf__no_checks.go.diff 1`] = ` +--- go/jsiicalc/pythonself/IInterfaceWithSelf__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/pythonself/IInterfaceWithSelf__no_checks.go --runtime-type-checking @@ -0,0 +1,10 @@ +//go:build no_runtime_type_checking + -+package isolated ++package pythonself + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateKwargs_MethodParameters(props *child.KwargsProps) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/isolated_Kwargs__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/submodule/isolated/isolated_Kwargs__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/submodule/isolated/isolated_Kwargs__runtime_type_checks.go --runtime-type-checking -@@ -0,0 +1,18 @@ -+//go:build !no_runtime_type_checking -+ -+package isolated -+ -+import ( -+ _jsii_ "github.com/aws/jsii-runtime-go/runtime" -+ -+ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/child" -+) -+ -+func validateKwargs_MethodParameters(props *child.KwargsProps) error { -+ if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { -+ return err -+ } -+ ++func (i *jsiiProxy_IInterfaceWithSelf) validateMethodParameters(self *float64) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/submodule_MyClass.go.diff 1`] = ` ---- go/jsiicalc/submodule/submodule_MyClass.go --no-runtime-type-checking -+++ go/jsiicalc/submodule/submodule_MyClass.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/MyClass.go.diff 1`] = ` +--- go/jsiicalc/submodule/MyClass.go --no-runtime-type-checking ++++ go/jsiicalc/submodule/MyClass.go --runtime-type-checking @@ -79,10 +79,13 @@ @@ -35339,29 +35278,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/s "methodWithSpecialParam", `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/submodule_MyClass__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/submodule/submodule_MyClass__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/submodule/submodule_MyClass__no_runtime_type_checking.go --runtime-type-checking -@@ -0,0 +1,14 @@ -+//go:build no_runtime_type_checking -+ -+package submodule -+ -+// Building without runtime type checking enabled, so all the below just return nil -+ -+func (m *jsiiProxy_MyClass) validateMethodWithSpecialParamParameters(param *param.SpecialParameter) error { -+ return nil -+} -+ -+func validateNewMyClassParameters(props *child.SomeStruct) error { -+ return nil -+} -+ -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/submodule_MyClass__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/submodule/submodule_MyClass__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/submodule/submodule_MyClass__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/MyClass__checks.go.diff 1`] = ` +--- go/jsiicalc/submodule/MyClass__checks.go --no-runtime-type-checking ++++ go/jsiicalc/submodule/MyClass__checks.go --runtime-type-checking @@ -0,0 +1,35 @@ +//go:build !no_runtime_type_checking + @@ -35400,44 +35319,107 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/s + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/union/union_ConsumesUnion.go.diff 1`] = ` ---- go/jsiicalc/union/union_ConsumesUnion.go --no-runtime-type-checking -+++ go/jsiicalc/union/union_ConsumesUnion.go --runtime-type-checking -@@ -14,10 +14,13 @@ +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/MyClass__no_checks.go.diff 1`] = ` +--- go/jsiicalc/submodule/MyClass__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/submodule/MyClass__no_checks.go --runtime-type-checking +@@ -0,0 +1,14 @@ ++//go:build no_runtime_type_checking ++ ++package submodule ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (m *jsiiProxy_MyClass) validateMethodWithSpecialParamParameters(param *param.SpecialParameter) error { ++ return nil ++} ++ ++func validateNewMyClassParameters(props *child.SomeStruct) error { ++ return nil ++} ++ +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/Kwargs.go.diff 1`] = ` +--- go/jsiicalc/submodule/isolated/Kwargs.go --no-runtime-type-checking ++++ go/jsiicalc/submodule/isolated/Kwargs.go --runtime-type-checking +@@ -17,10 +17,13 @@ } - func ConsumesUnion_UnionType(param interface{}) { + func Kwargs_Method(props *child.KwargsProps) *bool { _init_.Initialize() -+ if err := validateConsumesUnion_UnionTypeParameters(param); err != nil { ++ if err := validateKwargs_MethodParameters(props); err != nil { + panic(err) + } - _jsii_.StaticInvokeVoid( - "jsii-calc.union.ConsumesUnion", - "unionType", - []interface{}{param}, - ) + var returns *bool + + _jsii_.StaticInvoke( + "jsii-calc.submodule.isolated.Kwargs", + "method", +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/Kwargs__checks.go.diff 1`] = ` +--- go/jsiicalc/submodule/isolated/Kwargs__checks.go --no-runtime-type-checking ++++ go/jsiicalc/submodule/isolated/Kwargs__checks.go --runtime-type-checking +@@ -0,0 +1,18 @@ ++//go:build !no_runtime_type_checking ++ ++package isolated ++ ++import ( ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++ ++ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/child" ++) ++ ++func validateKwargs_MethodParameters(props *child.KwargsProps) error { ++ if err := _jsii_.ValidateStruct(props, func() string { return "parameter props" }); err != nil { ++ return err ++ } ++ ++ return nil ++} ++ `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/union/union_ConsumesUnion__no_runtime_type_checking.go.diff 1`] = ` ---- go/jsiicalc/union/union_ConsumesUnion__no_runtime_type_checking.go --no-runtime-type-checking -+++ go/jsiicalc/union/union_ConsumesUnion__no_runtime_type_checking.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/Kwargs__no_checks.go.diff 1`] = ` +--- go/jsiicalc/submodule/isolated/Kwargs__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/submodule/isolated/Kwargs__no_checks.go --runtime-type-checking @@ -0,0 +1,10 @@ +//go:build no_runtime_type_checking + -+package union ++package isolated + +// Building without runtime type checking enabled, so all the below just return nil + -+func validateConsumesUnion_UnionTypeParameters(param interface{}) error { ++func validateKwargs_MethodParameters(props *child.KwargsProps) error { + return nil +} + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/union/union_ConsumesUnion__runtime_type_checks.go.diff 1`] = ` ---- go/jsiicalc/union/union_ConsumesUnion__runtime_type_checks.go --no-runtime-type-checking -+++ go/jsiicalc/union/union_ConsumesUnion__runtime_type_checks.go --runtime-type-checking +exports[`Generated code for "jsii-calc": /go/jsiicalc/union/ConsumesUnion.go.diff 1`] = ` +--- go/jsiicalc/union/ConsumesUnion.go --no-runtime-type-checking ++++ go/jsiicalc/union/ConsumesUnion.go --runtime-type-checking +@@ -14,10 +14,13 @@ + } + + func ConsumesUnion_UnionType(param interface{}) { + _init_.Initialize() + ++ if err := validateConsumesUnion_UnionTypeParameters(param); err != nil { ++ panic(err) ++ } + _jsii_.StaticInvokeVoid( + "jsii-calc.union.ConsumesUnion", + "unionType", + []interface{}{param}, + ) +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/union/ConsumesUnion__checks.go.diff 1`] = ` +--- go/jsiicalc/union/ConsumesUnion__checks.go --no-runtime-type-checking ++++ go/jsiicalc/union/ConsumesUnion__checks.go --runtime-type-checking @@ -0,0 +1,32 @@ +//go:build !no_runtime_type_checking + @@ -35472,3 +35454,19 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/u +} + `; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/union/ConsumesUnion__no_checks.go.diff 1`] = ` +--- go/jsiicalc/union/ConsumesUnion__no_checks.go --no-runtime-type-checking ++++ go/jsiicalc/union/ConsumesUnion__no_checks.go --runtime-type-checking +@@ -0,0 +1,10 @@ ++//go:build no_runtime_type_checking ++ ++package union ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func validateConsumesUnion_UnionTypeParameters(param interface{}) error { ++ return nil ++} ++ +`; diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap index d01c555b50..5c0d391962 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.js.snap @@ -491,69 +491,6 @@ exports[`Generated code for "@scope/jsii-calc-base": /python/src/scope/j `; -exports[`Generated code for "@scope/jsii-calc-base": / 1`] = ` - - ┗━ 📁 python - ┗━ 📁 src - ┗━ 📁 scope - ┗━ 📁 jsii_calc_base - ┗━ 📄 __init__.py.diff -`; - -exports[`Generated code for "@scope/jsii-calc-base": /python/src/scope/jsii_calc_base/__init__.py.diff 1`] = ` ---- python/src/scope/jsii_calc_base/__init__.py --no-runtime-type-checking -+++ python/src/scope/jsii_calc_base/__init__.py --runtime-type-checking -@@ -50,10 +50,14 @@ - ) -> None: - ''' - :param foo: - - :param bar: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__e2d8a566db7d86eb1cb511cb869273dae39a21b3ad7041359aabb7bd283dcfef) -+ check_type(argname="argument foo", value=foo, expected_type=type_hints["foo"]) -+ check_type(argname="argument bar", value=bar, expected_type=type_hints["bar"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "foo": foo, - "bar": bar, - } - -@@ -117,10 +121,13 @@ - @builtins.classmethod - def consume(cls, *args: typing.Any) -> None: - ''' - :param args: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__66400f6ebe2f9a3fbb550342b894bebf4f5368890843f3917e2b903f62d48b38) -+ check_type(argname="argument args", value=args, expected_type=typing.Tuple[type_hints["args"], ...]) # pyright: ignore [reportGeneralTypeIssues] - return typing.cast(None, jsii.sinvoke(cls, "consume", [*args])) - - - __all__ = [ - "Base", -@@ -128,5 +135,19 @@ - "IBaseInterface", - "StaticConsumer", - ] - - publication.publish() -+ -+def _typecheckingstub__e2d8a566db7d86eb1cb511cb869273dae39a21b3ad7041359aabb7bd283dcfef( -+ *, -+ foo: _scope_jsii_calc_base_of_base_49fa37fe.Very, -+ bar: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__66400f6ebe2f9a3fbb550342b894bebf4f5368890843f3917e2b903f62d48b38( -+ *args: typing.Any, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = ` ┗━ 📁 python @@ -1016,67 +953,6 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": /python/src `; -exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = ` - - ┗━ 📁 python - ┗━ 📁 src - ┗━ 📁 scope - ┗━ 📁 jsii_calc_base_of_base - ┗━ 📄 __init__.py.diff -`; - -exports[`Generated code for "@scope/jsii-calc-base-of-base": /python/src/scope/jsii_calc_base_of_base/__init__.py.diff 1`] = ` ---- python/src/scope/jsii_calc_base_of_base/__init__.py --no-runtime-type-checking -+++ python/src/scope/jsii_calc_base_of_base/__init__.py --runtime-type-checking -@@ -39,10 +39,13 @@ - @builtins.classmethod - def consume(cls, *_args: typing.Any) -> None: - ''' - :param _args: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__740535cda6ecbc578919a2921dd1fa0b87c5dd735a2acd391963310cdf59f47c) -+ check_type(argname="argument _args", value=_args, expected_type=typing.Tuple[type_hints["_args"], ...]) # pyright: ignore [reportGeneralTypeIssues] - return typing.cast(None, jsii.sinvoke(cls, "consume", [*_args])) - - - class Very(metaclass=jsii.JSIIMeta, jsii_type="@scope/jsii-calc-base-of-base.Very"): - '''(experimental) Something here. -@@ -69,10 +72,13 @@ - class VeryBaseProps: - def __init__(self, *, foo: Very) -> None: - ''' - :param foo: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c314d9d6951cb6f41a208c5feb55cc9d30da774b67f6d47cb4fa13215b96f2b9) -+ check_type(argname="argument foo", value=foo, expected_type=type_hints["foo"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "foo": foo, - } - - @builtins.property -@@ -99,5 +105,18 @@ - "Very", - "VeryBaseProps", - ] - - publication.publish() -+ -+def _typecheckingstub__740535cda6ecbc578919a2921dd1fa0b87c5dd735a2acd391963310cdf59f47c( -+ *_args: typing.Any, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c314d9d6951cb6f41a208c5feb55cc9d30da774b67f6d47cb4fa13215b96f2b9( -+ *, -+ foo: Very, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` ┗━ 📁 python @@ -2319,257 +2195,6 @@ exports[`Generated code for "@scope/jsii-calc-lib": /python/src/scope/js `; -exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` - - ┗━ 📁 python - ┗━ 📁 src - ┗━ 📁 scope - ┗━ 📁 jsii_calc_lib - ┣━ 📄 __init__.py.diff - ┗━ 📁 custom_submodule_name - ┗━ 📄 __init__.py.diff -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /python/src/scope/jsii_calc_lib/__init__.py.diff 1`] = ` ---- python/src/scope/jsii_calc_lib/__init__.py --no-runtime-type-checking -+++ python/src/scope/jsii_calc_lib/__init__.py --runtime-type-checking -@@ -34,19 +34,25 @@ - ''' - :param very: - - - :stability: deprecated - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__46512218b53da06690990919b41a88d6c2379b11ef0a3243cf6d60add5197ae2) -+ check_type(argname="argument very", value=very, expected_type=type_hints["very"]) - jsii.create(self.__class__, self, [very]) - - @jsii.member(jsii_name="foo") - def foo(self, obj: _scope_jsii_calc_base_734f0262.IBaseInterface) -> None: - ''' - :param obj: - - - :stability: deprecated - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__e721760a6f0cb2ba909986665323a1f1f880769c379ae1f2ad0dbadf80ee9016) -+ check_type(argname="argument obj", value=obj, expected_type=type_hints["obj"]) - return typing.cast(None, jsii.invoke(self, "foo", [obj])) - - - @jsii.data_type( - jsii_type="@scope/jsii-calc-lib.DiamondLeft", -@@ -64,10 +70,14 @@ - :param hoisted_top: - :param left: - - :stability: deprecated - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__969bc4b33aa2d0684b20d440803d81dfda55aa9fa6398ac40f1afafc2114db5a) -+ check_type(argname="argument hoisted_top", value=hoisted_top, expected_type=type_hints["hoisted_top"]) -+ check_type(argname="argument left", value=left, expected_type=type_hints["left"]) - self._values: typing.Dict[builtins.str, typing.Any] = {} - if hoisted_top is not None: - self._values["hoisted_top"] = hoisted_top - if left is not None: - self._values["left"] = left -@@ -116,10 +126,14 @@ - :param hoisted_top: - :param right: - - :stability: deprecated - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__31f7eac552107efa0a4275f6798b003fcc3b6e74e0a463ae709af8b660b91dc4) -+ check_type(argname="argument hoisted_top", value=hoisted_top, expected_type=type_hints["hoisted_top"]) -+ check_type(argname="argument right", value=right, expected_type=type_hints["right"]) - self._values: typing.Dict[builtins.str, typing.Any] = {} - if hoisted_top is not None: - self._values["hoisted_top"] = hoisted_top - if right is not None: - self._values["right"] = right -@@ -317,10 +331,15 @@ - :param astring: (deprecated) A string value. - :param first_optional: - - :stability: deprecated - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__de81edc65427ea9129fd035388008307a6cae942eefc63cb3d9fd8b42956da06) -+ check_type(argname="argument anumber", value=anumber, expected_type=type_hints["anumber"]) -+ check_type(argname="argument astring", value=astring, expected_type=type_hints["astring"]) -+ check_type(argname="argument first_optional", value=first_optional, expected_type=type_hints["first_optional"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "anumber": anumber, - "astring": astring, - } - if first_optional is not None: -@@ -477,10 +496,15 @@ - :param optional2: - :param optional3: - - :stability: deprecated - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__82b4e5e8f3b46996124a87aac13a874f61bf9660a45a062bafa08046c027da63) -+ check_type(argname="argument optional1", value=optional1, expected_type=type_hints["optional1"]) -+ check_type(argname="argument optional2", value=optional2, expected_type=type_hints["optional2"]) -+ check_type(argname="argument optional3", value=optional3, expected_type=type_hints["optional3"]) - self._values: typing.Dict[builtins.str, typing.Any] = {} - if optional1 is not None: - self._values["optional1"] = optional1 - if optional2 is not None: - self._values["optional2"] = optional2 -@@ -540,10 +564,13 @@ - - :param value: The number. - - :stability: deprecated - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__adff4f4d0383c32ffdeb0bca92ae1ea2ebe0b2ea8d9bf5f5433287cc06e55e07) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.create(self.__class__, self, [value]) - - @builtins.property - @jsii.member(jsii_name="doubleValue") - def double_value(self) -> jsii.Number: -@@ -583,5 +610,57 @@ - publication.publish() - - # Loading modules to ensure their types are registered with the jsii runtime library - from . import custom_submodule_name - from . import deprecation_removal -+ -+def _typecheckingstub__46512218b53da06690990919b41a88d6c2379b11ef0a3243cf6d60add5197ae2( -+ very: _scope_jsii_calc_base_of_base_49fa37fe.Very, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__e721760a6f0cb2ba909986665323a1f1f880769c379ae1f2ad0dbadf80ee9016( -+ obj: _scope_jsii_calc_base_734f0262.IBaseInterface, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__969bc4b33aa2d0684b20d440803d81dfda55aa9fa6398ac40f1afafc2114db5a( -+ *, -+ hoisted_top: typing.Optional[builtins.str] = None, -+ left: typing.Optional[jsii.Number] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__31f7eac552107efa0a4275f6798b003fcc3b6e74e0a463ae709af8b660b91dc4( -+ *, -+ hoisted_top: typing.Optional[builtins.str] = None, -+ right: typing.Optional[builtins.bool] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__de81edc65427ea9129fd035388008307a6cae942eefc63cb3d9fd8b42956da06( -+ *, -+ anumber: jsii.Number, -+ astring: builtins.str, -+ first_optional: typing.Optional[typing.Sequence[builtins.str]] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__82b4e5e8f3b46996124a87aac13a874f61bf9660a45a062bafa08046c027da63( -+ *, -+ optional1: typing.Optional[builtins.str] = None, -+ optional2: typing.Optional[jsii.Number] = None, -+ optional3: typing.Optional[builtins.bool] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__adff4f4d0383c32ffdeb0bca92ae1ea2ebe0b2ea8d9bf5f5433287cc06e55e07( -+ value: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "@scope/jsii-calc-lib": /python/src/scope/jsii_calc_lib/custom_submodule_name/__init__.py.diff 1`] = ` ---- python/src/scope/jsii_calc_lib/custom_submodule_name/__init__.py --no-runtime-type-checking -+++ python/src/scope/jsii_calc_lib/custom_submodule_name/__init__.py --runtime-type-checking -@@ -97,10 +97,13 @@ - - :param name: - - :stability: deprecated - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5c03ed6e0d395f6fa262d12c7831dd2893af2098bf580a0c602a20f92c1ad24b) -+ check_type(argname="argument name", value=name, expected_type=type_hints["name"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "name": name, - } - - @builtins.property -@@ -135,10 +138,14 @@ - :param key: - :param value: - - :stability: deprecated - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__301126f287c0bfbbd3cb015833c5e0b2ced77e73d25597215c917612b67c3331) -+ check_type(argname="argument key", value=key, expected_type=type_hints["key"]) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "key": key, - "value": value, - } - -@@ -194,10 +201,13 @@ - ''' - :param reflectable: - - - :stability: deprecated - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__bed3b5b08c611933987ef5d9dfc131289e09ebcd26286417337c3708ca054e9f) -+ check_type(argname="argument reflectable", value=reflectable, expected_type=type_hints["reflectable"]) - return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.invoke(self, "asMap", [reflectable])) - - - __all__ = [ - "IReflectable", -@@ -205,5 +215,26 @@ - "ReflectableEntry", - "Reflector", - ] - - publication.publish() -+ -+def _typecheckingstub__5c03ed6e0d395f6fa262d12c7831dd2893af2098bf580a0c602a20f92c1ad24b( -+ *, -+ name: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__301126f287c0bfbbd3cb015833c5e0b2ced77e73d25597215c917612b67c3331( -+ *, -+ key: builtins.str, -+ value: typing.Any, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__bed3b5b08c611933987ef5d9dfc131289e09ebcd26286417337c3708ca054e9f( -+ reflectable: IReflectable, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - exports[`Generated code for "jsii-calc": / 1`] = ` ┗━ 📁 python @@ -14427,5813 +14052,3 @@ __all__ = [ publication.publish() `; - -exports[`Generated code for "jsii-calc": / 1`] = ` - - ┗━ 📁 python - ┗━ 📁 src - ┗━ 📁 jsii_calc - ┣━ 📄 __init__.py.diff - ┣━ 📁 anonymous - ┃ ┗━ 📄 __init__.py.diff - ┣━ 📁 cdk16625 - ┃ ┣━ 📄 __init__.py.diff - ┃ ┗━ 📁 donotimport - ┃ ┗━ 📄 __init__.py.diff - ┣━ 📁 cdk22369 - ┃ ┗━ 📄 __init__.py.diff - ┣━ 📁 composition - ┃ ┗━ 📄 __init__.py.diff - ┣━ 📁 derived_class_has_no_properties - ┃ ┗━ 📄 __init__.py.diff - ┣━ 📁 homonymous_forward_references - ┃ ┣━ 📁 bar - ┃ ┃ ┗━ 📄 __init__.py.diff - ┃ ┗━ 📁 foo - ┃ ┗━ 📄 __init__.py.diff - ┣━ 📁 interface_in_namespace_includes_classes - ┃ ┗━ 📄 __init__.py.diff - ┣━ 📁 interface_in_namespace_only_interface - ┃ ┗━ 📄 __init__.py.diff - ┣━ 📁 jsii3656 - ┃ ┗━ 📄 __init__.py.diff - ┣━ 📁 module2530 - ┃ ┗━ 📄 __init__.py.diff - ┣━ 📁 module2647 - ┃ ┗━ 📄 __init__.py.diff - ┣━ 📁 module2689 - ┃ ┣━ 📁 methods - ┃ ┃ ┗━ 📄 __init__.py.diff - ┃ ┗━ 📁 structs - ┃ ┗━ 📄 __init__.py.diff - ┣━ 📁 module2692 - ┃ ┣━ 📁 submodule1 - ┃ ┃ ┗━ 📄 __init__.py.diff - ┃ ┗━ 📁 submodule2 - ┃ ┗━ 📄 __init__.py.diff - ┣━ 📁 python_self - ┃ ┗━ 📄 __init__.py.diff - ┣━ 📁 submodule - ┃ ┣━ 📄 __init__.py.diff - ┃ ┣━ 📁 back_references - ┃ ┃ ┗━ 📄 __init__.py.diff - ┃ ┣━ 📁 child - ┃ ┃ ┗━ 📄 __init__.py.diff - ┃ ┗━ 📁 param - ┃ ┗━ 📄 __init__.py.diff - ┗━ 📁 union - ┗━ 📄 __init__.py.diff -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/__init__.py --runtime-type-checking -@@ -111,10 +111,13 @@ - def work_it_all(self, seed: builtins.str) -> builtins.str: - '''Sets \`\`seed\`\` to \`\`this.property\`\`, then calls \`\`someMethod\`\` with \`\`this.property\`\` and returns the result. - - :param seed: a \`\`string\`\`. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__8348af6419fc01178f78ba59cea59d0c7437626169866d772f4e957d09e6e13a) -+ check_type(argname="argument seed", value=seed, expected_type=type_hints["seed"]) - return typing.cast(builtins.str, jsii.invoke(self, "workItAll", [seed])) - - @builtins.property - @jsii.member(jsii_name="property") - @abc.abstractmethod -@@ -131,19 +134,25 @@ - @jsii.member(jsii_name="someMethod") - def _some_method(self, str: builtins.str) -> builtins.str: - ''' - :param str: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__06c06b97e36be962012901c4c1f542b3f51b377154f91bf1154d1bd475221829) -+ check_type(argname="argument str", value=str, expected_type=type_hints["str"]) - return typing.cast(builtins.str, jsii.invoke(self, "someMethod", [str])) - - @builtins.property - @jsii.member(jsii_name="property") - def _property(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "property")) - - @_property.setter - def _property(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__0f076015f51de68c2d0e6902c0d199c9058ad0bff9c11f58b2aae99578ece6ae) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "property", value) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class - typing.cast(typing.Any, AbstractSuite).__jsii_proxy_class__ = lambda : _AbstractSuiteProxy - -@@ -161,10 +170,13 @@ - @jsii.member(jsii_name="anyIn") - def any_in(self, inp: typing.Any) -> None: - ''' - :param inp: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__81a2d86a9598fa10dde4af8bd70d369967edc6febb332dc788702f6aea07f33c) -+ check_type(argname="argument inp", value=inp, expected_type=type_hints["inp"]) - return typing.cast(None, jsii.invoke(self, "anyIn", [inp])) - - @jsii.member(jsii_name="anyOut") - def any_out(self) -> typing.Any: - return typing.cast(typing.Any, jsii.invoke(self, "anyOut", [])) -@@ -172,10 +184,13 @@ - @jsii.member(jsii_name="enumMethod") - def enum_method(self, value: "StringEnum") -> "StringEnum": - ''' - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__56056c33132184bd4ad46f69c534777112c49b9a987cc7b962d4026cf550998c) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - return typing.cast("StringEnum", jsii.invoke(self, "enumMethod", [value])) - - @builtins.property - @jsii.member(jsii_name="enumPropertyValue") - def enum_property_value(self) -> jsii.Number: -@@ -186,73 +201,97 @@ - def any_array_property(self) -> typing.List[typing.Any]: - return typing.cast(typing.List[typing.Any], jsii.get(self, "anyArrayProperty")) - - @any_array_property.setter - def any_array_property(self, value: typing.List[typing.Any]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__1ab9ae75c746f751d2bf2ac254bcd1bee8eae7281ec936e222c9f29765fdcfa4) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "anyArrayProperty", value) - - @builtins.property - @jsii.member(jsii_name="anyMapProperty") - def any_map_property(self) -> typing.Mapping[builtins.str, typing.Any]: - return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.get(self, "anyMapProperty")) - - @any_map_property.setter - def any_map_property(self, value: typing.Mapping[builtins.str, typing.Any]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__f88e356a91a703923e622c02850435cc7f632a66f49ca79f00d42590d2928a5e) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "anyMapProperty", value) - - @builtins.property - @jsii.member(jsii_name="anyProperty") - def any_property(self) -> typing.Any: - return typing.cast(typing.Any, jsii.get(self, "anyProperty")) - - @any_property.setter - def any_property(self, value: typing.Any) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__d81f1a89ccd850ccdb0b96a43000dfcde30f3542bf797051c754610d641f2316) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "anyProperty", value) - - @builtins.property - @jsii.member(jsii_name="arrayProperty") - def array_property(self) -> typing.List[builtins.str]: - return typing.cast(typing.List[builtins.str], jsii.get(self, "arrayProperty")) - - @array_property.setter - def array_property(self, value: typing.List[builtins.str]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__0c663902e9a8a1db9aff59eb8642a68c944dc2e3385744098d2b51ecf2e2e11f) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "arrayProperty", value) - - @builtins.property - @jsii.member(jsii_name="booleanProperty") - def boolean_property(self) -> builtins.bool: - return typing.cast(builtins.bool, jsii.get(self, "booleanProperty")) - - @boolean_property.setter - def boolean_property(self, value: builtins.bool) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__106a83d3c77dbb6dbc6fcd706bca888d57ec37cd4beedf7dcc9d7d4428f44845) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "booleanProperty", value) - - @builtins.property - @jsii.member(jsii_name="dateProperty") - def date_property(self) -> datetime.datetime: - return typing.cast(datetime.datetime, jsii.get(self, "dateProperty")) - - @date_property.setter - def date_property(self, value: datetime.datetime) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5e62ea2f9629943c1138cad77629f47906644279c178b9436e4303e5a5f74c8a) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "dateProperty", value) - - @builtins.property - @jsii.member(jsii_name="enumProperty") - def enum_property(self) -> "AllTypesEnum": - return typing.cast("AllTypesEnum", jsii.get(self, "enumProperty")) - - @enum_property.setter - def enum_property(self, value: "AllTypesEnum") -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__f0d83d5dde352e12690bd34359b2272194b20ad0d4585d4cd235a62a68413cc7) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "enumProperty", value) - - @builtins.property - @jsii.member(jsii_name="jsonProperty") - def json_property(self) -> typing.Mapping[typing.Any, typing.Any]: - return typing.cast(typing.Mapping[typing.Any, typing.Any], jsii.get(self, "jsonProperty")) - - @json_property.setter - def json_property(self, value: typing.Mapping[typing.Any, typing.Any]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__8cddc5c03b0b87366a7bf274aedf92ced502b23fe811780c7f8c3da532cba3fc) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "jsonProperty", value) - - @builtins.property - @jsii.member(jsii_name="mapProperty") - def map_property( -@@ -263,28 +302,37 @@ - @map_property.setter - def map_property( - self, - value: typing.Mapping[builtins.str, _scope_jsii_calc_lib_c61f082f.Number], - ) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__ce34799b1443789feb28cffe434f5bcbb9cb940065992aa75dbb30eb89cd78e6) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "mapProperty", value) - - @builtins.property - @jsii.member(jsii_name="numberProperty") - def number_property(self) -> jsii.Number: - return typing.cast(jsii.Number, jsii.get(self, "numberProperty")) - - @number_property.setter - def number_property(self, value: jsii.Number) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c8fb4d044e2e7432d7e661aafdb286ebf21dfe5a82b9908dee57945f6892a63e) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "numberProperty", value) - - @builtins.property - @jsii.member(jsii_name="stringProperty") - def string_property(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "stringProperty")) - - @string_property.setter - def string_property(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__4e3dc199e54a9fbd40ceb20cecf887aa2aeca670e9ba223707466d9670eec9b9) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "stringProperty", value) - - @builtins.property - @jsii.member(jsii_name="unionArrayProperty") - def union_array_property( -@@ -295,10 +343,13 @@ - @union_array_property.setter - def union_array_property( - self, - value: typing.List[typing.Union[jsii.Number, _scope_jsii_calc_lib_c61f082f.NumericValue]], - ) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__4a9e87035008a2c1b649b911c8cfc02f2723230d8ced957948b2948c76caf61a) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "unionArrayProperty", value) - - @builtins.property - @jsii.member(jsii_name="unionMapProperty") - def union_map_property( -@@ -309,10 +360,13 @@ - @union_map_property.setter - def union_map_property( - self, - value: typing.Mapping[builtins.str, typing.Union[builtins.str, jsii.Number, _scope_jsii_calc_lib_c61f082f.Number]], - ) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__62ebee42e1871545bc2e82cfb9c7fe43b5a607c8f662caff89dda0f0ed99a3df) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "unionMapProperty", value) - - @builtins.property - @jsii.member(jsii_name="unionProperty") - def union_property( -@@ -323,19 +377,25 @@ - @union_property.setter - def union_property( - self, - value: typing.Union[builtins.str, jsii.Number, _scope_jsii_calc_lib_c61f082f.Number, "Multiply"], - ) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c9be2756a18e8a40eb03cf55231201574f76abf02996a73d0d75fefd1393473d) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "unionProperty", value) - - @builtins.property - @jsii.member(jsii_name="unknownArrayProperty") - def unknown_array_property(self) -> typing.List[typing.Any]: - return typing.cast(typing.List[typing.Any], jsii.get(self, "unknownArrayProperty")) - - @unknown_array_property.setter - def unknown_array_property(self, value: typing.List[typing.Any]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__e49729a44c21aef8c75584ff0991ddba3ee45184cacf816eb1a6a13b99e99ecc) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "unknownArrayProperty", value) - - @builtins.property - @jsii.member(jsii_name="unknownMapProperty") - def unknown_map_property(self) -> typing.Mapping[builtins.str, typing.Any]: -@@ -344,28 +404,37 @@ - @unknown_map_property.setter - def unknown_map_property( - self, - value: typing.Mapping[builtins.str, typing.Any], - ) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__f8de6b30de9bfa884f9de02e2abe57e9394fb7a387b5691f858b7b98817b1db7) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "unknownMapProperty", value) - - @builtins.property - @jsii.member(jsii_name="unknownProperty") - def unknown_property(self) -> typing.Any: - return typing.cast(typing.Any, jsii.get(self, "unknownProperty")) - - @unknown_property.setter - def unknown_property(self, value: typing.Any) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__901c3574a81e006fdf36f73e34f66b34f65ada4bddcb11cd15a51d6e3d9b59e4) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "unknownProperty", value) - - @builtins.property - @jsii.member(jsii_name="optionalEnumValue") - def optional_enum_value(self) -> typing.Optional["StringEnum"]: - return typing.cast(typing.Optional["StringEnum"], jsii.get(self, "optionalEnumValue")) - - @optional_enum_value.setter - def optional_enum_value(self, value: typing.Optional["StringEnum"]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__705bed55c0dbc20a3a1bad9a21931270f0c285e5b3b276e13bca645ffa7ccb0f) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "optionalEnumValue", value) - - - @jsii.enum(jsii_type="jsii-calc.AllTypesEnum") - class AllTypesEnum(enum.Enum): -@@ -385,36 +454,52 @@ - def get_bar(self, _p1: builtins.str, _p2: jsii.Number) -> None: - ''' - :param _p1: - - :param _p2: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__99730dd857f01c8e93755d3e4f1e04f44efd2e63487e37db32f0fae8d36c618e) -+ check_type(argname="argument _p1", value=_p1, expected_type=type_hints["_p1"]) -+ check_type(argname="argument _p2", value=_p2, expected_type=type_hints["_p2"]) - return typing.cast(None, jsii.invoke(self, "getBar", [_p1, _p2])) - - @jsii.member(jsii_name="getFoo") - def get_foo(self, with_param: builtins.str) -> builtins.str: - '''getXxx() is not allowed (see negatives), but getXxx(a, ...) is okay. - - :param with_param: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__7f25304a2274ca1691dbe05a223f32126250948b15187c5095780e5c9af08c2a) -+ check_type(argname="argument with_param", value=with_param, expected_type=type_hints["with_param"]) - return typing.cast(builtins.str, jsii.invoke(self, "getFoo", [with_param])) - - @jsii.member(jsii_name="setBar") - def set_bar(self, _x: builtins.str, _y: jsii.Number, _z: builtins.bool) -> None: - ''' - :param _x: - - :param _y: - - :param _z: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__12f6979e6d88948e4aebfe8c25ed814c21d19b4b549d6bc2db4620794e706238) -+ check_type(argname="argument _x", value=_x, expected_type=type_hints["_x"]) -+ check_type(argname="argument _y", value=_y, expected_type=type_hints["_y"]) -+ check_type(argname="argument _z", value=_z, expected_type=type_hints["_z"]) - return typing.cast(None, jsii.invoke(self, "setBar", [_x, _y, _z])) - - @jsii.member(jsii_name="setFoo") - def set_foo(self, _x: builtins.str, _y: jsii.Number) -> None: - '''setFoo(x) is not allowed (see negatives), but setXxx(a, b, ...) is okay. - - :param _x: - - :param _y: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__ca978ab380897c8607252c370202d45bc72e8b5cdc52549bb53b870299333d52) -+ check_type(argname="argument _x", value=_x, expected_type=type_hints["_x"]) -+ check_type(argname="argument _y", value=_y, expected_type=type_hints["_y"]) - return typing.cast(None, jsii.invoke(self, "setFoo", [_x, _y])) - - - class AmbiguousParameters( - metaclass=jsii.JSIIMeta, -@@ -430,10 +515,13 @@ - ''' - :param scope_: - - :param scope: - :param props: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__35fb7428c2ad70583f7b280c07cec184905b51e8e896efe6cc88eaf83a6f65c3) -+ check_type(argname="argument scope_", value=scope_, expected_type=type_hints["scope_"]) - props_ = StructParameterType(scope=scope, props=props) - - jsii.create(self.__class__, self, [scope_, props_]) - - @builtins.property -@@ -480,10 +568,13 @@ - @jsii.member(jsii_name="overrideMe") - def override_me(self, mult: jsii.Number) -> jsii.Number: - ''' - :param mult: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__49537950cbbeb6e2c62cb1b8a079cc9bb5cc6d06d95cf2229128539d2be886a3) -+ check_type(argname="argument mult", value=mult, expected_type=type_hints["mult"]) - return typing.cast(jsii.Number, jsii.ainvoke(self, "overrideMe", [mult])) - - @jsii.member(jsii_name="overrideMeToo") - def override_me_too(self) -> jsii.Number: - return typing.cast(jsii.Number, jsii.ainvoke(self, "overrideMeToo", [])) -@@ -544,10 +635,14 @@ - '''Creates a BinaryOperation. - - :param lhs: Left-hand side operand. - :param rhs: Right-hand side operand. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__408890be1949f7684db536e79081b85d00d72250ca9eb19c74db6ad226564784) -+ check_type(argname="argument lhs", value=lhs, expected_type=type_hints["lhs"]) -+ check_type(argname="argument rhs", value=rhs, expected_type=type_hints["rhs"]) - jsii.create(self.__class__, self, [lhs, rhs]) - - @jsii.member(jsii_name="hello") - def hello(self) -> builtins.str: - '''Say hello!''' -@@ -608,10 +703,13 @@ - - :param value: the value that should be returned. - - :return: \`\`value\`\` - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__67894f861ef38d2769b440d2fe71f549cb9e333247b385c5d6ae862b2eb04fc5) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - return typing.cast(typing.Any, jsii.invoke(self, "giveItBack", [value])) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class - typing.cast(typing.Any, BurriedAnonymousObject).__jsii_proxy_class__ = lambda : _BurriedAnonymousObjectProxy - -@@ -661,18 +759,24 @@ - def add(self, value: jsii.Number) -> None: - '''Adds a number to the current value. - - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__106b87a3d0b194bda7cee057654f752c82d9a92a3775bcc3b2dc5cf7814ba84d) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - return typing.cast(None, jsii.invoke(self, "add", [value])) - - @jsii.member(jsii_name="mul") - def mul(self, value: jsii.Number) -> None: - '''Multiplies the current value by a number. - - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__b0e9a9c8546dd024e1568b2e6d11bd847e53548d624f33afffdffacc77fe01ef) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - return typing.cast(None, jsii.invoke(self, "mul", [value])) - - @jsii.member(jsii_name="neg") - def neg(self) -> None: - '''Negates the current value.''' -@@ -682,10 +786,13 @@ - def pow(self, value: jsii.Number) -> None: - '''Raises the current value by a power. - - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c62707f1a80d6bc26c0b74205f8892c1777e6ed97359263df05628018d8ef6fc) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - return typing.cast(None, jsii.invoke(self, "pow", [value])) - - @jsii.member(jsii_name="readUnionValue") - def read_union_value(self) -> jsii.Number: - '''Returns teh value of the union property (if defined).''' -@@ -717,20 +824,26 @@ - '''The current value.''' - return typing.cast(_scope_jsii_calc_lib_c61f082f.NumericValue, jsii.get(self, "curr")) - - @curr.setter - def curr(self, value: _scope_jsii_calc_lib_c61f082f.NumericValue) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c74abb191c66f86aed2c139ec3e50b0442b6d3bdcd41beb06db17c9b3c5d93d0) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "curr", value) - - @builtins.property - @jsii.member(jsii_name="maxValue") - def max_value(self) -> typing.Optional[jsii.Number]: - '''The maximum value allows in this calculator.''' - return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "maxValue")) - - @max_value.setter - def max_value(self, value: typing.Optional[jsii.Number]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__1af5d9bb897bd9bfc2029e92d33fc306fc090e2d0a9bc0bd70fb01762e798fe6) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "maxValue", value) - - @builtins.property - @jsii.member(jsii_name="unionProperty") - def union_property( -@@ -742,10 +855,13 @@ - @union_property.setter - def union_property( - self, - value: typing.Optional[typing.Union["Add", "Multiply", "Power"]], - ) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__349b2a1dce95cb7ff4c5a7772d81772697767c5f4e7e5fd709847ff5e526c3c1) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "unionProperty", value) - - - @jsii.data_type( - jsii_type="jsii-calc.CalculatorProps", -@@ -762,10 +878,14 @@ - '''Properties for Calculator. - - :param initial_value: The initial value of the calculator. NOTE: Any number works here, it's fine. Default: 0 - :param maximum_value: The maximum value the calculator can store. Default: none - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__21033948ed66f89716ed818c4cf9e5a38a9252e042231e1e8e1672356d403bef) -+ check_type(argname="argument initial_value", value=initial_value, expected_type=type_hints["initial_value"]) -+ check_type(argname="argument maximum_value", value=maximum_value, expected_type=type_hints["maximum_value"]) - self._values: typing.Dict[builtins.str, typing.Any] = {} - if initial_value is not None: - self._values["initial_value"] = initial_value - if maximum_value is not None: - self._values["maximum_value"] = maximum_value -@@ -811,10 +931,13 @@ - union_property: typing.Sequence[typing.Mapping[builtins.str, typing.Union[typing.Union["StructA", typing.Dict[builtins.str, typing.Any]], typing.Union["StructB", typing.Dict[builtins.str, typing.Any]]]]], - ) -> None: - ''' - :param union_property: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__9e749834c2e46eee6370de7b60daabbff6e5c16febe9775b98a2b961b0d4e335) -+ check_type(argname="argument union_property", value=union_property, expected_type=type_hints["union_property"]) - jsii.create(self.__class__, self, [union_property]) - - @builtins.property - @jsii.member(jsii_name="unionProperty") - def union_property( -@@ -825,10 +948,13 @@ - @union_property.setter - def union_property( - self, - value: typing.List[typing.Mapping[builtins.str, typing.Union["StructA", "StructB"]]], - ) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__80b80f78c4ac7fda46ac2aec7ab826a87bef3eaaba64661c90f346972800baf5) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "unionProperty", value) - - - class ClassWithCollections( - metaclass=jsii.JSIIMeta, -@@ -841,10 +967,14 @@ - ) -> None: - ''' - :param map: - - :param array: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__7eb49cfb1282d7f1bd28096ff0407c0806693194f02f5c053936f99756a2a8fd) -+ check_type(argname="argument map", value=map, expected_type=type_hints["map"]) -+ check_type(argname="argument array", value=array, expected_type=type_hints["array"]) - jsii.create(self.__class__, self, [map, array]) - - @jsii.member(jsii_name="createAList") - @builtins.classmethod - def create_a_list(cls) -> typing.List[builtins.str]: -@@ -860,37 +990,49 @@ - def static_array(cls) -> typing.List[builtins.str]: # pyright: ignore [reportGeneralTypeIssues] - return typing.cast(typing.List[builtins.str], jsii.sget(cls, "staticArray")) - - @static_array.setter # type: ignore[no-redef] - def static_array(cls, value: typing.List[builtins.str]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__964903eb68623806c91fc9026cacfdc726cfbb287698530724c5a9938a7bb2ca) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.sset(cls, "staticArray", value) - - @jsii.python.classproperty - @jsii.member(jsii_name="staticMap") - def static_map(cls) -> typing.Mapping[builtins.str, builtins.str]: # pyright: ignore [reportGeneralTypeIssues] - return typing.cast(typing.Mapping[builtins.str, builtins.str], jsii.sget(cls, "staticMap")) - - @static_map.setter # type: ignore[no-redef] - def static_map(cls, value: typing.Mapping[builtins.str, builtins.str]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__8dd7203701e4915203e4778820ee40fe6bdd6f0bb2855c200f375606277e06c8) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.sset(cls, "staticMap", value) - - @builtins.property - @jsii.member(jsii_name="array") - def array(self) -> typing.List[builtins.str]: - return typing.cast(typing.List[builtins.str], jsii.get(self, "array")) - - @array.setter - def array(self, value: typing.List[builtins.str]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c0c76fec28076841e36c26581c26385de1e984d96e91ea434a61c4bf36c9b4d9) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "array", value) - - @builtins.property - @jsii.member(jsii_name="map") - def map(self) -> typing.Mapping[builtins.str, builtins.str]: - return typing.cast(typing.Mapping[builtins.str, builtins.str], jsii.get(self, "map")) - - @map.setter - def map(self, value: typing.Mapping[builtins.str, builtins.str]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5461a3c7bb81040765e4ca2e9effb12cc7f5fb018e5e1b8b21501a3f9cd6a8b3) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "map", value) - - - class ClassWithContainerTypes( - metaclass=jsii.JSIIMeta, -@@ -912,10 +1054,15 @@ - :param obj: - - :param array_prop: - :param obj_prop: - :param record_prop: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__11d94174b1d488125abef65967a384ceb599f4948eca6cb9be3d55e1979fb64f) -+ check_type(argname="argument array", value=array, expected_type=type_hints["array"]) -+ check_type(argname="argument record", value=record, expected_type=type_hints["record"]) -+ check_type(argname="argument obj", value=obj, expected_type=type_hints["obj"]) - props = ContainerProps( - array_prop=array_prop, obj_prop=obj_prop, record_prop=record_prop - ) - - jsii.create(self.__class__, self, [array, record, obj, props]) -@@ -965,17 +1112,23 @@ - ): - def __init__(self, int: builtins.str) -> None: - ''' - :param int: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c017a39e0da5d21f3a9acbfd00f6a5c84eb4cad306148504e7c835359d35537e) -+ check_type(argname="argument int", value=int, expected_type=type_hints["int"]) - jsii.create(self.__class__, self, [int]) - - @jsii.member(jsii_name="import") - def import_(self, assert_: builtins.str) -> builtins.str: - ''' - :param assert_: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__7a756cab89b47a2ae4c08f36162482b60fdf963b8ba638917a63c5e110b4d33e) -+ check_type(argname="argument assert_", value=assert_, expected_type=type_hints["assert_"]) - return typing.cast(builtins.str, jsii.invoke(self, "import", [assert_])) - - @builtins.property - @jsii.member(jsii_name="int") - def int(self) -> builtins.str: -@@ -994,10 +1147,13 @@ - def mutable_object(self) -> "IMutableObjectLiteral": - return typing.cast("IMutableObjectLiteral", jsii.get(self, "mutableObject")) - - @mutable_object.setter - def mutable_object(self, value: "IMutableObjectLiteral") -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__3afbef7e05ef43a18b9260b86660c09b15be66fabeae128c9a9f99b729da7143) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "mutableObject", value) - - - class ClassWithNestedUnion( - metaclass=jsii.JSIIMeta, -@@ -1008,10 +1164,13 @@ - union_property: typing.Sequence[typing.Union[typing.Mapping[builtins.str, typing.Union[typing.Union["StructA", typing.Dict[builtins.str, typing.Any]], typing.Union["StructB", typing.Dict[builtins.str, typing.Any]]]], typing.Sequence[typing.Union[typing.Union["StructA", typing.Dict[builtins.str, typing.Any]], typing.Union["StructB", typing.Dict[builtins.str, typing.Any]]]]]], - ) -> None: - ''' - :param union_property: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__0b8f0f729686dad01c8555a3b1bc47509e495bd18f1560ef045b558884b2a1fb) -+ check_type(argname="argument union_property", value=union_property, expected_type=type_hints["union_property"]) - jsii.create(self.__class__, self, [union_property]) - - @builtins.property - @jsii.member(jsii_name="unionProperty") - def union_property( -@@ -1022,10 +1181,13 @@ - @union_property.setter - def union_property( - self, - value: typing.List[typing.Union[typing.Mapping[builtins.str, typing.Union["StructA", "StructB"]], typing.List[typing.Union["StructA", "StructB"]]]], - ) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__a8a15eb37393d5188c71779e29278367f7b3600c6dd48bdbcd502cdf510c3c15) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "unionProperty", value) - - - class ConfusingToJackson( - metaclass=jsii.JSIIMeta, -@@ -1056,10 +1218,13 @@ - @union_property.setter - def union_property( - self, - value: typing.Optional[typing.Union[_scope_jsii_calc_lib_c61f082f.IFriendly, typing.List[typing.Union[_scope_jsii_calc_lib_c61f082f.IFriendly, "AbstractClass"]]]], - ) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__ec229cc92e04670f4dca9546759b3b39ee813eb1aa18057135bb155d08971e6a) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "unionProperty", value) - - - @jsii.data_type( - jsii_type="jsii-calc.ConfusingToJacksonStruct", -@@ -1073,10 +1238,13 @@ - union_property: typing.Optional[typing.Union[_scope_jsii_calc_lib_c61f082f.IFriendly, typing.Sequence[typing.Union[_scope_jsii_calc_lib_c61f082f.IFriendly, "AbstractClass"]]]] = None, - ) -> None: - ''' - :param union_property: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__481b1113b85e6dc9d7ba31c3ef5654e3550abac1edef9204348ab0f9554f61c1) -+ check_type(argname="argument union_property", value=union_property, expected_type=type_hints["union_property"]) - self._values: typing.Dict[builtins.str, typing.Any] = {} - if union_property is not None: - self._values["union_property"] = union_property - - @builtins.property -@@ -1104,10 +1272,13 @@ - ): - def __init__(self, consumer: "PartiallyInitializedThisConsumer") -> None: - ''' - :param consumer: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5676fcb3395f1db1a013537fa52220553e5e418c2a9d97aa2f9541c00ffe259e) -+ check_type(argname="argument consumer", value=consumer, expected_type=type_hints["consumer"]) - jsii.create(self.__class__, self, [consumer]) - - - class Constructors(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Constructors"): - def __init__(self) -> None: -@@ -1155,10 +1326,13 @@ - ): - def __init__(self, delegate: "IStructReturningDelegate") -> None: - ''' - :param delegate: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5c5defc6d683ee91707f8b7770d8d2fb11d381b9c928d7e5d6e2c5c495395f38) -+ check_type(argname="argument delegate", value=delegate, expected_type=type_hints["delegate"]) - jsii.create(self.__class__, self, [delegate]) - - @jsii.member(jsii_name="workItBaby") - def work_it_baby(self) -> "StructB": - return typing.cast("StructB", jsii.invoke(self, "workItBaby", [])) -@@ -1187,10 +1361,13 @@ - - Returns whether the bell was rung. - - :param ringer: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__1df814299f3f9720be108d84bdfd61bc591699a79a3c8ac6d450bfb0a9610278) -+ check_type(argname="argument ringer", value=ringer, expected_type=type_hints["ringer"]) - return typing.cast(builtins.bool, jsii.sinvoke(cls, "staticImplementedByObjectLiteral", [ringer])) - - @jsii.member(jsii_name="staticImplementedByPrivateClass") - @builtins.classmethod - def static_implemented_by_private_class( -@@ -1201,10 +1378,13 @@ - - Return whether the bell was rung. - - :param ringer: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__2f08bd2d56e856071db5f777b63fe2577f9e96dbfcd91e4044d0eda2d26f9017) -+ check_type(argname="argument ringer", value=ringer, expected_type=type_hints["ringer"]) - return typing.cast(builtins.bool, jsii.sinvoke(cls, "staticImplementedByPrivateClass", [ringer])) - - @jsii.member(jsii_name="staticImplementedByPublicClass") - @builtins.classmethod - def static_implemented_by_public_class(cls, ringer: "IBellRinger") -> builtins.bool: -@@ -1212,10 +1392,13 @@ - - Return whether the bell was rung. - - :param ringer: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__4a2b7f0a05298ddaec112cb088cc71cfa2856aaa1d8414a5157d581b6d5a7293) -+ check_type(argname="argument ringer", value=ringer, expected_type=type_hints["ringer"]) - return typing.cast(builtins.bool, jsii.sinvoke(cls, "staticImplementedByPublicClass", [ringer])) - - @jsii.member(jsii_name="staticWhenTypedAsClass") - @builtins.classmethod - def static_when_typed_as_class(cls, ringer: "IConcreteBellRinger") -> builtins.bool: -@@ -1223,50 +1406,65 @@ - - Return whether the bell was rung. - - :param ringer: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__f751da3f5766ea4973eb2d89086565259f0a3cd626425a7eec723afd7b64f392) -+ check_type(argname="argument ringer", value=ringer, expected_type=type_hints["ringer"]) - return typing.cast(builtins.bool, jsii.sinvoke(cls, "staticWhenTypedAsClass", [ringer])) - - @jsii.member(jsii_name="implementedByObjectLiteral") - def implemented_by_object_literal(self, ringer: "IBellRinger") -> builtins.bool: - '''...if the interface is implemented using an object literal. - - Returns whether the bell was rung. - - :param ringer: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__cca04fe4a4c41a0034087ab0c574d1d2f1d0427d87a806fc660446b6a7e5290a) -+ check_type(argname="argument ringer", value=ringer, expected_type=type_hints["ringer"]) - return typing.cast(builtins.bool, jsii.invoke(self, "implementedByObjectLiteral", [ringer])) - - @jsii.member(jsii_name="implementedByPrivateClass") - def implemented_by_private_class(self, ringer: "IBellRinger") -> builtins.bool: - '''...if the interface is implemented using a private class. - - Return whether the bell was rung. - - :param ringer: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__7bde53b867de290d21a419baa46b8e833a0d394835a1ce2be3b429179b2ddce5) -+ check_type(argname="argument ringer", value=ringer, expected_type=type_hints["ringer"]) - return typing.cast(builtins.bool, jsii.invoke(self, "implementedByPrivateClass", [ringer])) - - @jsii.member(jsii_name="implementedByPublicClass") - def implemented_by_public_class(self, ringer: "IBellRinger") -> builtins.bool: - '''...if the interface is implemented using a public class. - - Return whether the bell was rung. - - :param ringer: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__988e53d92b16fb4b7224c654f985a074cbfa7dd5f567df005b41522641ad92ac) -+ check_type(argname="argument ringer", value=ringer, expected_type=type_hints["ringer"]) - return typing.cast(builtins.bool, jsii.invoke(self, "implementedByPublicClass", [ringer])) - - @jsii.member(jsii_name="whenTypedAsClass") - def when_typed_as_class(self, ringer: "IConcreteBellRinger") -> builtins.bool: - '''If the parameter is a concrete class instead of an interface. - - Return whether the bell was rung. - - :param ringer: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__1d786308546ae61deacb465c6f501fe7e0be028973494548b57e0480759ed460) -+ check_type(argname="argument ringer", value=ringer, expected_type=type_hints["ringer"]) - return typing.cast(builtins.bool, jsii.invoke(self, "whenTypedAsClass", [ringer])) - - - class ConsumersOfThisCrazyTypeSystem( - metaclass=jsii.JSIIMeta, -@@ -1281,20 +1479,26 @@ - obj: "IAnotherPublicInterface", - ) -> builtins.str: - ''' - :param obj: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__83037a3f429b90a38d2d9532a347144030578d83f68817b1a5677ebcd1b38e12) -+ check_type(argname="argument obj", value=obj, expected_type=type_hints["obj"]) - return typing.cast(builtins.str, jsii.invoke(self, "consumeAnotherPublicInterface", [obj])) - - @jsii.member(jsii_name="consumeNonInternalInterface") - def consume_non_internal_interface( - self, - obj: "INonInternalInterface", - ) -> typing.Any: - ''' - :param obj: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__139bf4e63e56bef32e364c5972e055de5cba153d49cc821740fba1d51f73ef70) -+ check_type(argname="argument obj", value=obj, expected_type=type_hints["obj"]) - return typing.cast(typing.Any, jsii.invoke(self, "consumeNonInternalInterface", [obj])) - - - @jsii.data_type( - jsii_type="jsii-calc.ContainerProps", -@@ -1316,10 +1520,15 @@ - ''' - :param array_prop: - :param obj_prop: - :param record_prop: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__2be181b08e5a2c0e1e3f3a84732a423af31039117701d35431ee251d343ca9d5) -+ check_type(argname="argument array_prop", value=array_prop, expected_type=type_hints["array_prop"]) -+ check_type(argname="argument obj_prop", value=obj_prop, expected_type=type_hints["obj_prop"]) -+ check_type(argname="argument record_prop", value=record_prop, expected_type=type_hints["record_prop"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "array_prop": array_prop, - "obj_prop": obj_prop, - "record_prop": record_prop, - } -@@ -1385,17 +1594,23 @@ - data: typing.Mapping[builtins.str, typing.Any], - ) -> builtins.str: - ''' - :param data: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__dd941dcba8415b4b4dbb95bc3f55ac3404bdaf303822dfc7093fb615dc66b2cf) -+ check_type(argname="argument data", value=data, expected_type=type_hints["data"]) - return typing.cast(builtins.str, jsii.invoke(self, "renderArbitrary", [data])) - - @jsii.member(jsii_name="renderMap") - def render_map(self, map: typing.Mapping[builtins.str, typing.Any]) -> builtins.str: - ''' - :param map: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__9008dfc97234c0f2895caaa88d20a94de081c3cd97c38f9a012f13cdae75fbd6) -+ check_type(argname="argument map", value=map, expected_type=type_hints["map"]) - return typing.cast(builtins.str, jsii.invoke(self, "renderMap", [map])) - - - class Default(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Default"): - '''A class named "Default". -@@ -1424,10 +1639,15 @@ - ''' - :param arg1: - - :param arg2: - - :param arg3: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__019e6ec86ae7ee325dc404a7025eaf0edcb164e166535a831bccf6658adfbb10) -+ check_type(argname="argument arg1", value=arg1, expected_type=type_hints["arg1"]) -+ check_type(argname="argument arg2", value=arg2, expected_type=type_hints["arg2"]) -+ check_type(argname="argument arg3", value=arg3, expected_type=type_hints["arg3"]) - jsii.create(self.__class__, self, [arg1, arg2, arg3]) - - @builtins.property - @jsii.member(jsii_name="arg1") - def arg1(self) -> jsii.Number: -@@ -1485,10 +1705,14 @@ - - :deprecated: this constructor is "just" okay - - :stability: deprecated - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__f64945b01dd806fcd872f369983e1fa6b3db8811cb0682ac6adf88aebb0aabda) -+ check_type(argname="argument readonly_string", value=readonly_string, expected_type=type_hints["readonly_string"]) -+ check_type(argname="argument mutable_number", value=mutable_number, expected_type=type_hints["mutable_number"]) - jsii.create(self.__class__, self, [readonly_string, mutable_number]) - - @jsii.member(jsii_name="method") - def method(self) -> None: - ''' -@@ -1518,10 +1742,13 @@ - ''' - return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - - @mutable_property.setter - def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__3aef3220b38be7daf4208453b1766d9eafb6a74bd51dfb351d21235a205afa34) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "mutableProperty", value) - - - @jsii.enum(jsii_type="jsii-calc.DeprecatedEnum") - class DeprecatedEnum(enum.Enum): -@@ -1557,10 +1784,13 @@ - - :deprecated: it just wraps a string - - :stability: deprecated - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__cdee1d6893b4921a8d7cf0a9c957a543b69f7a98eb3cedd7ece84871fc81c767) -+ check_type(argname="argument readonly_property", value=readonly_property, expected_type=type_hints["readonly_property"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "readonly_property": readonly_property, - } - - @builtins.property -@@ -1625,10 +1855,21 @@ - :param non_primitive: An example of a non primitive property. - :param another_optional: This is optional. - :param optional_any: - :param optional_array: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c544311353634d5a2f08144f0c184afbcb700d8304b9f49deae99f19e1e7b0af) -+ check_type(argname="argument anumber", value=anumber, expected_type=type_hints["anumber"]) -+ check_type(argname="argument astring", value=astring, expected_type=type_hints["astring"]) -+ check_type(argname="argument first_optional", value=first_optional, expected_type=type_hints["first_optional"]) -+ check_type(argname="argument another_required", value=another_required, expected_type=type_hints["another_required"]) -+ check_type(argname="argument bool", value=bool, expected_type=type_hints["bool"]) -+ check_type(argname="argument non_primitive", value=non_primitive, expected_type=type_hints["non_primitive"]) -+ check_type(argname="argument another_optional", value=another_optional, expected_type=type_hints["another_optional"]) -+ check_type(argname="argument optional_any", value=optional_any, expected_type=type_hints["optional_any"]) -+ check_type(argname="argument optional_array", value=optional_array, expected_type=type_hints["optional_array"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "anumber": anumber, - "astring": astring, - "another_required": another_required, - "bool": bool, -@@ -1749,10 +1990,16 @@ - :param hoisted_top: - :param left: - :param right: - :param bottom: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__865cdfdd094ca753189170221ee7d6a0e59c2c0bcfdeff3dc37bb87dd39515ca) -+ check_type(argname="argument hoisted_top", value=hoisted_top, expected_type=type_hints["hoisted_top"]) -+ check_type(argname="argument left", value=left, expected_type=type_hints["left"]) -+ check_type(argname="argument right", value=right, expected_type=type_hints["right"]) -+ check_type(argname="argument bottom", value=bottom, expected_type=type_hints["bottom"]) - self._values: typing.Dict[builtins.str, typing.Any] = {} - if hoisted_top is not None: - self._values["hoisted_top"] = hoisted_top - if left is not None: - self._values["left"] = left -@@ -1810,10 +2057,13 @@ - class DiamondInheritanceBaseLevelStruct: - def __init__(self, *, base_level_property: builtins.str) -> None: - ''' - :param base_level_property: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__cfa52ba952c3d4a7e6df7fba3f619bf3ac14c52e829cce862a5fa495e45d0e70) -+ check_type(argname="argument base_level_property", value=base_level_property, expected_type=type_hints["base_level_property"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "base_level_property": base_level_property, - } - - @builtins.property -@@ -1851,10 +2101,14 @@ - ) -> None: - ''' - :param base_level_property: - :param first_mid_level_property: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__354311bd3d60d2b3b4ea927d6a96bdf66aa6d1109c29bfcd96266051c7c30a5e) -+ check_type(argname="argument base_level_property", value=base_level_property, expected_type=type_hints["base_level_property"]) -+ check_type(argname="argument first_mid_level_property", value=first_mid_level_property, expected_type=type_hints["first_mid_level_property"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "base_level_property": base_level_property, - "first_mid_level_property": first_mid_level_property, - } - -@@ -1899,10 +2153,14 @@ - ) -> None: - ''' - :param base_level_property: - :param second_mid_level_property: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__8074c5f38699399b9e6f8708c125bef5d7c89118c36ffcce8582d66cac2197da) -+ check_type(argname="argument base_level_property", value=base_level_property, expected_type=type_hints["base_level_property"]) -+ check_type(argname="argument second_mid_level_property", value=second_mid_level_property, expected_type=type_hints["second_mid_level_property"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "base_level_property": base_level_property, - "second_mid_level_property": second_mid_level_property, - } - -@@ -1958,10 +2216,16 @@ - :param base_level_property: - :param first_mid_level_property: - :param second_mid_level_property: - :param top_level_property: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__9384691e88dd3ab7e55516762b2076445d94bd6d9348db1b93f79de9f4ae0ea1) -+ check_type(argname="argument base_level_property", value=base_level_property, expected_type=type_hints["base_level_property"]) -+ check_type(argname="argument first_mid_level_property", value=first_mid_level_property, expected_type=type_hints["first_mid_level_property"]) -+ check_type(argname="argument second_mid_level_property", value=second_mid_level_property, expected_type=type_hints["second_mid_level_property"]) -+ check_type(argname="argument top_level_property", value=top_level_property, expected_type=type_hints["top_level_property"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "base_level_property": base_level_property, - "first_mid_level_property": first_mid_level_property, - "second_mid_level_property": second_mid_level_property, - "top_level_property": top_level_property, -@@ -2041,10 +2305,13 @@ - @jsii.member(jsii_name="changePrivatePropertyValue") - def change_private_property_value(self, new_value: builtins.str) -> None: - ''' - :param new_value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5ae2124576c295a0c88fc75be0e57258f0f72e63c733e7493367b8558266510e) -+ check_type(argname="argument new_value", value=new_value, expected_type=type_hints["new_value"]) - return typing.cast(None, jsii.invoke(self, "changePrivatePropertyValue", [new_value])) - - @jsii.member(jsii_name="privateMethodValue") - def private_method_value(self) -> builtins.str: - return typing.cast(builtins.str, jsii.invoke(self, "privateMethodValue", [])) -@@ -2073,10 +2340,15 @@ - ''' - :param _required_any: - - :param _optional_any: - - :param _optional_string: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__8ffaadb351f5c2c48a7368068d5c88e0c7836deefe0e13aa9fe53ac104052fd5) -+ check_type(argname="argument _required_any", value=_required_any, expected_type=type_hints["_required_any"]) -+ check_type(argname="argument _optional_any", value=_optional_any, expected_type=type_hints["_optional_any"]) -+ check_type(argname="argument _optional_string", value=_optional_string, expected_type=type_hints["_optional_string"]) - return typing.cast(None, jsii.invoke(self, "method", [_required_any, _optional_any, _optional_string])) - - - class DocumentedClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DocumentedClass"): - '''Here's the first line of the TSDoc comment. -@@ -2140,10 +2412,14 @@ - ) -> builtins.str: - ''' - :param optional: - - :param things: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5af7b38b9b5c170ebd3e05c215e05f10e6843b03868850dad87a5a149b90e790) -+ check_type(argname="argument optional", value=optional, expected_type=type_hints["optional"]) -+ check_type(argname="argument things", value=things, expected_type=typing.Tuple[type_hints["things"], ...]) # pyright: ignore [reportGeneralTypeIssues] - return typing.cast(builtins.str, jsii.invoke(self, "optionalAndVariadic", [optional, *things])) - - - @jsii.data_type( - jsii_type="jsii-calc.DummyObj", -@@ -2153,10 +2429,13 @@ - class DummyObj: - def __init__(self, *, example: builtins.str) -> None: - ''' - :param example: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__ae5d543014149876cec8b005abbb94c112981cccaf318870c7fe4e8353c2c675) -+ check_type(argname="argument example", value=example, expected_type=type_hints["example"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "example": example, - } - - @builtins.property -@@ -2185,28 +2464,37 @@ - - def __init__(self, value_store: builtins.str) -> None: - ''' - :param value_store: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c0d457497f870b36d210f01af9890c6624684d1e53da833858e801c18baf9fbb) -+ check_type(argname="argument value_store", value=value_store, expected_type=type_hints["value_store"]) - jsii.create(self.__class__, self, [value_store]) - - @builtins.property - @jsii.member(jsii_name="dynamicProperty") - def dynamic_property(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "dynamicProperty")) - - @dynamic_property.setter - def dynamic_property(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__4f40c12fae2ef2673f3f324c0c452f65c187c1b3e6552b86768465a2d20de051) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "dynamicProperty", value) - - @builtins.property - @jsii.member(jsii_name="valueStore") - def value_store(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "valueStore")) - - @value_store.setter - def value_store(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__9106fb2a86e944ce0c61537852ab2d310a8a53448c6946af051de0325a67fa1a) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "valueStore", value) - - - class DynamicPropertyBearerChild( - DynamicPropertyBearer, -@@ -2215,20 +2503,26 @@ - ): - def __init__(self, original_value: builtins.str) -> None: - ''' - :param original_value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__ad557fbd0532aa4220227645f5aae3e73ebae6b529cfe074430abf30d18cd5e9) -+ check_type(argname="argument original_value", value=original_value, expected_type=type_hints["original_value"]) - jsii.create(self.__class__, self, [original_value]) - - @jsii.member(jsii_name="overrideValue") - def override_value(self, new_value: builtins.str) -> builtins.str: - '''Sets \`\`this.dynamicProperty\`\` to the new value, and returns the old value. - - :param new_value: the new value to be set. - - :return: the old value that was set. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__a4026611d197b83d9a37b973ba97c69254e674921a7d89d0eb57ac41a19b636e) -+ check_type(argname="argument new_value", value=new_value, expected_type=type_hints["new_value"]) - return typing.cast(builtins.str, jsii.invoke(self, "overrideValue", [new_value])) - - @builtins.property - @jsii.member(jsii_name="originalValue") - def original_value(self) -> builtins.str: -@@ -2241,10 +2535,13 @@ - def __init__(self, clock: "IWallClock") -> None: - '''Creates a new instance of Entropy. - - :param clock: your implementation of \`\`WallClock\`\`. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__2a7f203302b2610301f1b36f34453db0f5572f2e02b0bc4c9933fd670e594222) -+ check_type(argname="argument clock", value=clock, expected_type=type_hints["clock"]) - jsii.create(self.__class__, self, [clock]) - - @jsii.member(jsii_name="increase") - def increase(self) -> builtins.str: - '''Increases entropy by consuming time from the clock (yes, this is a long shot, please don't judge). -@@ -2272,10 +2569,13 @@ - - :param word: the value to return. - - :return: \`\`word\`\`. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__a90d161fb7d47a195a192cf987ac6968fc2c6fbe27005bdd7684478a3d956e66) -+ check_type(argname="argument word", value=word, expected_type=type_hints["word"]) - return typing.cast(builtins.str, jsii.invoke(self, "repeat", [word])) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class - typing.cast(typing.Any, Entropy).__jsii_proxy_class__ = lambda : _EntropyProxy - -@@ -2312,10 +2612,14 @@ - are being erased when sending values from native code to JS. - - :param opts: - - :param key: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__b87cc89f87e9b1c180227625f3aba9395da5a8b258a88e605d466edb9004d709) -+ check_type(argname="argument opts", value=opts, expected_type=type_hints["opts"]) -+ check_type(argname="argument key", value=key, expected_type=type_hints["key"]) - return typing.cast(builtins.bool, jsii.sinvoke(cls, "doesKeyExist", [opts, key])) - - @jsii.member(jsii_name="prop1IsNull") - @builtins.classmethod - def prop1_is_null(cls) -> typing.Mapping[builtins.str, typing.Any]: -@@ -2343,10 +2647,14 @@ - ) -> None: - ''' - :param option1: - :param option2: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__d34e4f5dab670ec3ea298ec2cda50be32700f7f52dcef6a618ca9cb3706062ee) -+ check_type(argname="argument option1", value=option1, expected_type=type_hints["option1"]) -+ check_type(argname="argument option2", value=option2, expected_type=type_hints["option2"]) - self._values: typing.Dict[builtins.str, typing.Any] = {} - if option1 is not None: - self._values["option1"] = option1 - if option2 is not None: - self._values["option2"] = option2 -@@ -2390,10 +2698,14 @@ - :param readonly_string: - - :param mutable_number: - - - :stability: experimental - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__6a92c7223d00e7a0a2f0611cbb689671885b835bb26eedc8eb4a4d12e4ed5021) -+ check_type(argname="argument readonly_string", value=readonly_string, expected_type=type_hints["readonly_string"]) -+ check_type(argname="argument mutable_number", value=mutable_number, expected_type=type_hints["mutable_number"]) - jsii.create(self.__class__, self, [readonly_string, mutable_number]) - - @jsii.member(jsii_name="method") - def method(self) -> None: - ''' -@@ -2417,10 +2729,13 @@ - ''' - return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - - @mutable_property.setter - def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__52559292c6e04ad49e53e443b1a4c56149833b8f12876d779bb8860fcb231b41) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "mutableProperty", value) - - - @jsii.enum(jsii_type="jsii-calc.ExperimentalEnum") - class ExperimentalEnum(enum.Enum): -@@ -2448,10 +2763,13 @@ - ''' - :param readonly_property: - - :stability: experimental - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__b0c8f4c6eca5af7072a4a7c737950b39e75c61a56c505deb94edc5cd0995ed7d) -+ check_type(argname="argument readonly_property", value=readonly_property, expected_type=type_hints["readonly_property"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "readonly_property": readonly_property, - } - - @builtins.property -@@ -2481,10 +2799,13 @@ - ): - def __init__(self, success: builtins.bool) -> None: - ''' - :param success: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__dad018fa707514e8023df185b5e6e0a4b611bec563fe57abd9b81939b8833ebb) -+ check_type(argname="argument success", value=success, expected_type=type_hints["success"]) - jsii.create(self.__class__, self, [success]) - - @builtins.property - @jsii.member(jsii_name="success") - def success(self) -> builtins.bool: -@@ -2500,10 +2821,14 @@ - def __init__(self, *, boom: builtins.bool, prop: builtins.str) -> None: - ''' - :param boom: - :param prop: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__861a5ec03219f6c9fecd1b039faa2e53075227ff0d28f8eb66929909bc0c3096) -+ check_type(argname="argument boom", value=boom, expected_type=type_hints["boom"]) -+ check_type(argname="argument prop", value=prop, expected_type=type_hints["prop"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "boom": boom, - "prop": prop, - } - -@@ -2545,10 +2870,14 @@ - :param readonly_string: - - :param mutable_number: - - - :external: true - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__82149b1f61aca58419f6ba4c74c8bb1c5c241433707e64ea4626937b294d8fe5) -+ check_type(argname="argument readonly_string", value=readonly_string, expected_type=type_hints["readonly_string"]) -+ check_type(argname="argument mutable_number", value=mutable_number, expected_type=type_hints["mutable_number"]) - jsii.create(self.__class__, self, [readonly_string, mutable_number]) - - @jsii.member(jsii_name="method") - def method(self) -> None: - ''' -@@ -2572,10 +2901,13 @@ - ''' - return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - - @mutable_property.setter - def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__8380ec30b1f8773df7b5b27be8811be79b04f1d17c8eca83f83927eb56cdfd34) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "mutableProperty", value) - - - @jsii.enum(jsii_type="jsii-calc.ExternalEnum") - class ExternalEnum(enum.Enum): -@@ -2603,10 +2935,13 @@ - ''' - :param readonly_property: - - :external: true - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__8e8843a5fc914ec2c1e3baccdad526ea4d48eee37296f6812f3c0673ef86794f) -+ check_type(argname="argument readonly_property", value=readonly_property, expected_type=type_hints["readonly_property"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "readonly_property": readonly_property, - } - - @builtins.property -@@ -2749,10 +3084,13 @@ - def __init__(self, *, name: typing.Optional[builtins.str] = None) -> None: - '''These are some arguments you can pass to a method. - - :param name: The name of the greetee. Default: world - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__3dce87825e36304d54521ce5524aa7e230fa5d505b0abbc79101fd9014f2cbd9) -+ check_type(argname="argument name", value=name, expected_type=type_hints["name"]) - self._values: typing.Dict[builtins.str, typing.Any] = {} - if name is not None: - self._values["name"] = name - - @builtins.property -@@ -2789,10 +3127,13 @@ - friendly: _scope_jsii_calc_lib_c61f082f.IFriendly, - ) -> builtins.str: - ''' - :param friendly: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__d17f0544be961cba6cabfbb40f28c196963de107fcaef9c56d8227bdcb359431) -+ check_type(argname="argument friendly", value=friendly, expected_type=type_hints["friendly"]) - return typing.cast(builtins.str, jsii.invoke(self, "betterGreeting", [friendly])) - - - @jsii.interface(jsii_type="jsii-calc.IAnonymousImplementationProvider") - class IAnonymousImplementationProvider(typing_extensions.Protocol): -@@ -2872,10 +3213,13 @@ - def a(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "a")) - - @a.setter - def a(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__3eabfcad9a21b26024f4c1480ca127a3d6c6888067f0ae991d5922a49bfe81d4) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "a", value) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface - typing.cast(typing.Any, IAnotherPublicInterface).__jsii_proxy_class__ = lambda : _IAnotherPublicInterfaceProxy - -@@ -2918,10 +3262,13 @@ - @jsii.member(jsii_name="yourTurn") - def your_turn(self, bell: IBell) -> None: - ''' - :param bell: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__d127476ce3b6e59ff9f375f547c1b6e1826d7a3969612c0605ebd0017d2b985d) -+ check_type(argname="argument bell", value=bell, expected_type=type_hints["bell"]) - return typing.cast(None, jsii.invoke(self, "yourTurn", [bell])) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface - typing.cast(typing.Any, IBellRinger).__jsii_proxy_class__ = lambda : _IBellRingerProxy - -@@ -2946,10 +3293,13 @@ - @jsii.member(jsii_name="yourTurn") - def your_turn(self, bell: "Bell") -> None: - ''' - :param bell: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__2c34aaac5945bdc61c4f56492dee5608e1852940835d94d3e991fed377db66f2) -+ check_type(argname="argument bell", value=bell, expected_type=type_hints["bell"]) - return typing.cast(None, jsii.invoke(self, "yourTurn", [bell])) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface - typing.cast(typing.Any, IConcreteBellRinger).__jsii_proxy_class__ = lambda : _IConcreteBellRingerProxy - -@@ -3005,10 +3355,13 @@ - ''' - return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - - @mutable_property.setter - def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__e4d76200a6c5bdbdd51f208229da8bfd8f6f4c967af28e1e733579780e9d4a0e) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "mutableProperty", value) - - @jsii.member(jsii_name="method") - def method(self) -> None: - ''' -@@ -3063,10 +3416,13 @@ - ''' - return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - - @mutable_property.setter - def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__6e68d313f3254be7145220b211c66f45749aa8efc15aaf93d96330eb3cb7c6c7) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "mutableProperty", value) - - @jsii.member(jsii_name="method") - def method(self) -> None: - ''' -@@ -3108,10 +3464,13 @@ - def private(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "private")) - - @private.setter - def private(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__8199a83e86f8a4cf29ddc53d2b2151c37c7fa10d29562b454127376d1867d6da) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "private", value) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface - typing.cast(typing.Any, IExtendsPrivateInterface).__jsii_proxy_class__ = lambda : _IExtendsPrivateInterfaceProxy - -@@ -3157,10 +3516,13 @@ - ''' - return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - - @mutable_property.setter - def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__a904d745cb9f037de717ed7a2b1d3a207493564662fdbe1d7c63e60a24f9bace) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "mutableProperty", value) - - @jsii.member(jsii_name="method") - def method(self) -> None: - ''' -@@ -3342,10 +3704,14 @@ - ) -> None: - ''' - :param arg1: - - :param arg2: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5568c72c746dd5221cb6fb7b741ed7a3346c346d7a30863c5abe3d99ada53098) -+ check_type(argname="argument arg1", value=arg1, expected_type=type_hints["arg1"]) -+ check_type(argname="argument arg2", value=arg2, expected_type=type_hints["arg2"]) - return typing.cast(None, jsii.invoke(self, "hello", [arg1, arg2])) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface - typing.cast(typing.Any, IInterfaceWithOptionalMethodArguments).__jsii_proxy_class__ = lambda : _IInterfaceWithOptionalMethodArgumentsProxy - -@@ -3380,10 +3746,13 @@ - def read_write_string(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "readWriteString")) - - @read_write_string.setter - def read_write_string(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__858de6e8785f18ad264a158ca83a0fc1e0a6299efa9f77a0b31eaaffaa5b086c) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "readWriteString", value) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface - typing.cast(typing.Any, IInterfaceWithProperties).__jsii_proxy_class__ = lambda : _IInterfaceWithPropertiesProxy - -@@ -3413,10 +3782,13 @@ - def foo(self) -> jsii.Number: - return typing.cast(jsii.Number, jsii.get(self, "foo")) - - @foo.setter - def foo(self, value: jsii.Number) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c571c6749392bc04e123a99b926edaf10b88be6b6d6b6a3937cae9893af5119e) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "foo", value) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface - typing.cast(typing.Any, IInterfaceWithPropertiesExtension).__jsii_proxy_class__ = lambda : _IInterfaceWithPropertiesExtensionProxy - -@@ -3936,10 +4308,13 @@ - def value(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "value")) - - @value.setter - def value(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__e0395944061fad9d5156b633dc20682ff9759ae0acb88df574b159f4919ab3a5) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "value", value) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface - typing.cast(typing.Any, IMutableObjectLiteral).__jsii_proxy_class__ = lambda : _IMutableObjectLiteralProxy - -@@ -3975,19 +4350,25 @@ - def b(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "b")) - - @b.setter - def b(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__9d1e4198ba3f4e6b6a6f4ce0a4a185223ec216368c0c3304c69b029aba13ca49) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "b", value) - - @builtins.property - @jsii.member(jsii_name="c") - def c(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "c")) - - @c.setter - def c(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__6774e195ab25dab5790e1d187eb30be56997804d5186753a9928f2575f81977b) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "c", value) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface - typing.cast(typing.Any, INonInternalInterface).__jsii_proxy_class__ = lambda : _INonInternalInterfaceProxy - -@@ -4020,10 +4401,13 @@ - def property(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "property")) - - @property.setter - def property(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__831f664cd567fd4e707fd175e9c9e13519f3ca587b792d7d5bc79f427589a802) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "property", value) - - @jsii.member(jsii_name="wasSet") - def was_set(self) -> builtins.bool: - return typing.cast(builtins.bool, jsii.invoke(self, "wasSet", [])) -@@ -4216,10 +4600,13 @@ - def mutable_property(self) -> typing.Optional[jsii.Number]: - return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - - @mutable_property.setter - def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__254a58386276f7b7d5a41dddd674375b8942c2cad4deb6c2d24b55d240d14350) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "mutableProperty", value) - - @jsii.member(jsii_name="method") - def method(self) -> None: - return typing.cast(None, jsii.invoke(self, "method", [])) -@@ -4286,10 +4673,13 @@ - def prop(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "prop")) - - @prop.setter - def prop(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__10bb8b026d6c8368d479cf0da8b27c049c5f9088f173a63624e515dd36607439) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "prop", value) - - - class Implementation(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Implementation"): - def __init__(self) -> None: -@@ -4335,10 +4725,13 @@ - def private(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "private")) - - @private.setter - def private(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__2df4d055b033cdfdf7ad915b451ddc787ad68fb64b7e02386a9d8e591c1657af) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "private", value) - - - @jsii.data_type( - jsii_type="jsii-calc.ImplictBaseOfBase", -@@ -4356,10 +4749,15 @@ - ''' - :param foo: - - :param bar: - - :param goo: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__b70592e4d080897239bf5f8b0de5b6b464cd9e888e39fca1082c04b5cbeca890) -+ check_type(argname="argument foo", value=foo, expected_type=type_hints["foo"]) -+ check_type(argname="argument bar", value=bar, expected_type=type_hints["bar"]) -+ check_type(argname="argument goo", value=goo, expected_type=type_hints["goo"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "foo": foo, - "bar": bar, - "goo": goo, - } -@@ -4434,10 +4832,13 @@ - count: jsii.Number, - ) -> typing.List[_scope_jsii_calc_lib_c61f082f.IDoublable]: - ''' - :param count: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__1d6e348a61ed27bfc8b7928365798b43e0130ca2b720c1105baca04fa093d194) -+ check_type(argname="argument count", value=count, expected_type=type_hints["count"]) - return typing.cast(typing.List[_scope_jsii_calc_lib_c61f082f.IDoublable], jsii.sinvoke(cls, "makeInterfaces", [count])) - - - class Isomorphism(metaclass=jsii.JSIIAbstractClass, jsii_type="jsii-calc.Isomorphism"): - '''Checks the "same instance" isomorphism is preserved within the constructor. -@@ -4542,19 +4943,25 @@ - def prop_a(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "propA")) - - @prop_a.setter - def prop_a(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__30ce308abdc1d2462c00bf7a4acc194ec05d61ddee24b2e79c674aa7034e5ffa) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "propA", value) - - @builtins.property - @jsii.member(jsii_name="propB") - def prop_b(self) -> jsii.Number: - return typing.cast(jsii.Number, jsii.get(self, "propB")) - - @prop_b.setter - def prop_b(self, value: jsii.Number) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__eef7c487e6f0c4d81dd633cf70121104ff8f3458fa52a418df64bcab9fe4bd3e) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "propB", value) - - - class JavaReservedWords( - metaclass=jsii.JSIIMeta, -@@ -4776,10 +5183,13 @@ - def while_(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "while")) - - @while_.setter - def while_(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__a7654af9a241e67ad498c3eb33b98e6cdb1558487bb9b02dcce41f75334b76ad) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "while", value) - - - @jsii.implements(IJsii487External2, IJsii487External) - class Jsii487Derived(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Jsii487Derived"): -@@ -4881,10 +5291,13 @@ - @builtins.classmethod - def stringify(cls, value: typing.Any = None) -> typing.Optional[builtins.str]: - ''' - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__43f45c49ecee3d08351b82aa5cdc3548d9dafa534cd2d99da8b5c5c9188e9a54) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - return typing.cast(typing.Optional[builtins.str], jsii.sinvoke(cls, "stringify", [value])) - - - class LevelOne(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.LevelOne"): - '''Validates that nested classes get correct code generation for the occasional forward reference.''' -@@ -4914,10 +5327,13 @@ - class PropBooleanValue: - def __init__(self, *, value: builtins.bool) -> None: - ''' - :param value: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__ef705a05998260349d35c748c557e65cf539d53e136eb9191250080bdce852c3) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "value": value, - } - - @builtins.property -@@ -4951,10 +5367,13 @@ - ''' - :param prop: - ''' - if isinstance(prop, dict): - prop = LevelOne.PropBooleanValue(**prop) -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__2a9e65060bf85c3d49b79ada1f9394ae146c380a4212c190065e031098d570b8) -+ check_type(argname="argument prop", value=prop, expected_type=type_hints["prop"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "prop": prop, - } - - @builtins.property -@@ -4989,10 +5408,13 @@ - ''' - :param prop: - ''' - if isinstance(prop, dict): - prop = LevelOne.PropProperty(**prop) -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__479be5d5625f656c28cf12ffdc2cef9d6d74aae555551630f440fcb05351d261) -+ check_type(argname="argument prop", value=prop, expected_type=type_hints["prop"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "prop": prop, - } - - @builtins.property -@@ -5040,10 +5462,17 @@ - :param cpu: The number of cpu units used by the task. Valid values, which determines your range of valid values for the memory parameter: 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments This default is set in the underlying FargateTaskDefinition construct. Default: 256 - :param memory_mib: The amount (in MiB) of memory used by the task. This field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter: 0.5GB, 1GB, 2GB - Available cpu values: 256 (.25 vCPU) 1GB, 2GB, 3GB, 4GB - Available cpu values: 512 (.5 vCPU) 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - Available cpu values: 1024 (1 vCPU) Between 4GB and 16GB in 1GB increments - Available cpu values: 2048 (2 vCPU) Between 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU) This default is set in the underlying FargateTaskDefinition construct. Default: 512 - :param public_load_balancer: Determines whether the Application Load Balancer will be internet-facing. Default: true - :param public_tasks: Determines whether your Fargate Service will be assigned a public IP address. Default: false - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__b3d89a25beb0ebd10c196d941aa924197ae9a2def08f1f414c190a2a6d943d9c) -+ check_type(argname="argument container_port", value=container_port, expected_type=type_hints["container_port"]) -+ check_type(argname="argument cpu", value=cpu, expected_type=type_hints["cpu"]) -+ check_type(argname="argument memory_mib", value=memory_mib, expected_type=type_hints["memory_mib"]) -+ check_type(argname="argument public_load_balancer", value=public_load_balancer, expected_type=type_hints["public_load_balancer"]) -+ check_type(argname="argument public_tasks", value=public_tasks, expected_type=type_hints["public_tasks"]) - self._values: typing.Dict[builtins.str, typing.Any] = {} - if container_port is not None: - self._values["container_port"] = container_port - if cpu is not None: - self._values["cpu"] = cpu -@@ -5170,10 +5599,14 @@ - '''Creates a BinaryOperation. - - :param lhs: Left-hand side operand. - :param rhs: Right-hand side operand. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__7e73465ea858e34d4df8697d34f29a53ca3c3a41c47946382e5d49f498e3747d) -+ check_type(argname="argument lhs", value=lhs, expected_type=type_hints["lhs"]) -+ check_type(argname="argument rhs", value=rhs, expected_type=type_hints["rhs"]) - jsii.create(self.__class__, self, [lhs, rhs]) - - @jsii.member(jsii_name="farewell") - def farewell(self) -> builtins.str: - '''Say farewell.''' -@@ -5221,10 +5654,13 @@ - class NestedStruct: - def __init__(self, *, number_prop: jsii.Number) -> None: - ''' - :param number_prop: When provided, must be > 0. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__04dae031a5097183ccda93eb91ec51a8a6fa1133134a6a398f1f05c581bc0091) -+ check_type(argname="argument number_prop", value=number_prop, expected_type=type_hints["number_prop"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "number_prop": number_prop, - } - - @builtins.property -@@ -5295,17 +5731,24 @@ - def __init__(self, _param1: builtins.str, optional: typing.Any = None) -> None: - ''' - :param _param1: - - :param optional: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__218107d38285901ff40e08163f0de0bac5d835bd64c21c0a735e8d72399ebe35) -+ check_type(argname="argument _param1", value=_param1, expected_type=type_hints["_param1"]) -+ check_type(argname="argument optional", value=optional, expected_type=type_hints["optional"]) - jsii.create(self.__class__, self, [_param1, optional]) - - @jsii.member(jsii_name="giveMeUndefined") - def give_me_undefined(self, value: typing.Any = None) -> None: - ''' - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__a109cd8429db09172895a3eb04ca7e9d5c92129c7ca7a50f85fa89b6f6ab366b) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - return typing.cast(None, jsii.invoke(self, "giveMeUndefined", [value])) - - @jsii.member(jsii_name="giveMeUndefinedInsideAnObject") - def give_me_undefined_inside_an_object( - self, -@@ -5333,10 +5776,13 @@ - def change_me_to_undefined(self) -> typing.Optional[builtins.str]: - return typing.cast(typing.Optional[builtins.str], jsii.get(self, "changeMeToUndefined")) - - @change_me_to_undefined.setter - def change_me_to_undefined(self, value: typing.Optional[builtins.str]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__7102c29a709c4297fb88615c74a3e42a584364ac4ccba5c1db42a65e05184d1b) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "changeMeToUndefined", value) - - - @jsii.data_type( - jsii_type="jsii-calc.NullShouldBeTreatedAsUndefinedData", -@@ -5355,10 +5801,14 @@ - ) -> None: - ''' - :param array_with_three_elements_and_undefined_as_second_argument: - :param this_should_be_undefined: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__ae8d47cabe4d36f88c891d250d7e792432b0d153223789ec3687e714ba92a5f3) -+ check_type(argname="argument array_with_three_elements_and_undefined_as_second_argument", value=array_with_three_elements_and_undefined_as_second_argument, expected_type=type_hints["array_with_three_elements_and_undefined_as_second_argument"]) -+ check_type(argname="argument this_should_be_undefined", value=this_should_be_undefined, expected_type=type_hints["this_should_be_undefined"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "array_with_three_elements_and_undefined_as_second_argument": array_with_three_elements_and_undefined_as_second_argument, - } - if this_should_be_undefined is not None: - self._values["this_should_be_undefined"] = this_should_be_undefined -@@ -5393,17 +5843,23 @@ - - def __init__(self, generator: IRandomNumberGenerator) -> None: - ''' - :param generator: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__3c1812783ba0b3b2146a3dd9609a6e12af404502ff5fbb9b9a9be49bf576122b) -+ check_type(argname="argument generator", value=generator, expected_type=type_hints["generator"]) - jsii.create(self.__class__, self, [generator]) - - @jsii.member(jsii_name="isSameGenerator") - def is_same_generator(self, gen: IRandomNumberGenerator) -> builtins.bool: - ''' - :param gen: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__151b90e9765ce9a05ae13e568f4ba7c9e36e34c1cd991c5c1ee0249869fd4cce) -+ check_type(argname="argument gen", value=gen, expected_type=type_hints["gen"]) - return typing.cast(builtins.bool, jsii.invoke(self, "isSameGenerator", [gen])) - - @jsii.member(jsii_name="nextTimes100") - def next_times100(self) -> jsii.Number: - return typing.cast(jsii.Number, jsii.invoke(self, "nextTimes100", [])) -@@ -5413,10 +5869,13 @@ - def generator(self) -> IRandomNumberGenerator: - return typing.cast(IRandomNumberGenerator, jsii.get(self, "generator")) - - @generator.setter - def generator(self, value: IRandomNumberGenerator) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__0f5a1cc548d3db6e156cec5671bc04b980132e529c77f3bb5aaa58427db35e7c) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "generator", value) - - - class ObjectRefsInCollections( - metaclass=jsii.JSIIMeta, -@@ -5434,10 +5893,13 @@ - ) -> jsii.Number: - '''Returns the sum of all values. - - :param values: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__f5cb9f9511b0248cd4c0c4bec4eed9e75e7690012237fdb1b39b3f7b3bb0392e) -+ check_type(argname="argument values", value=values, expected_type=type_hints["values"]) - return typing.cast(jsii.Number, jsii.invoke(self, "sumFromArray", [values])) - - @jsii.member(jsii_name="sumFromMap") - def sum_from_map( - self, -@@ -5445,10 +5907,13 @@ - ) -> jsii.Number: - '''Returns the sum of all values in a map. - - :param values: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__ca5199647728e53a1ec89d4fd7dad9aeb7239f8c1213c51b4e2eda734daa4cf4) -+ check_type(argname="argument values", value=values, expected_type=type_hints["values"]) - return typing.cast(jsii.Number, jsii.invoke(self, "sumFromMap", [values])) - - - class ObjectWithPropertyProvider( - metaclass=jsii.JSIIMeta, -@@ -5489,10 +5954,13 @@ - ): - def __init__(self, delegate: IInterfaceWithOptionalMethodArguments) -> None: - ''' - :param delegate: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__da93d15e57e6e2a1857cd7df156fb2a55ec91715c97323f20268def40f72137c) -+ check_type(argname="argument delegate", value=delegate, expected_type=type_hints["delegate"]) - jsii.create(self.__class__, self, [delegate]) - - @jsii.member(jsii_name="invokeWithOptional") - def invoke_with_optional(self) -> None: - return typing.cast(None, jsii.invoke(self, "invokeWithOptional", [])) -@@ -5515,10 +5983,15 @@ - ''' - :param arg1: - - :param arg2: - - :param arg3: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5f6c5e5b55379123a8bd2bc457d9a5e9a0d34dd512b2bd2f59c6a5bec2a95f14) -+ check_type(argname="argument arg1", value=arg1, expected_type=type_hints["arg1"]) -+ check_type(argname="argument arg2", value=arg2, expected_type=type_hints["arg2"]) -+ check_type(argname="argument arg3", value=arg3, expected_type=type_hints["arg3"]) - jsii.create(self.__class__, self, [arg1, arg2, arg3]) - - @builtins.property - @jsii.member(jsii_name="arg1") - def arg1(self) -> jsii.Number: -@@ -5543,10 +6016,13 @@ - class OptionalStruct: - def __init__(self, *, field: typing.Optional[builtins.str] = None) -> None: - ''' - :param field: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__26ecd0d4ea200acf388a8b91f17bfd3c09b6c7f8e0a84228b89c27ace672d0b1) -+ check_type(argname="argument field", value=field, expected_type=type_hints["field"]) - self._values: typing.Dict[builtins.str, typing.Any] = {} - if field is not None: - self._values["field"] = field - - @builtins.property -@@ -5622,10 +6098,13 @@ - def _override_read_write(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "overrideReadWrite")) - - @_override_read_write.setter - def _override_read_write(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__72ca8c3c148afe2b76dc14b63b8e2baf0bbf28802add3f88490cb5d3792825fb) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "overrideReadWrite", value) - - - class OverrideReturnsObject( - metaclass=jsii.JSIIMeta, -@@ -5637,10 +6116,13 @@ - @jsii.member(jsii_name="test") - def test(self, obj: IReturnsNumber) -> jsii.Number: - ''' - :param obj: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__ca8d417ddf787890441d6903718eebaf7fde3508b3466202724fdac3a17ba79b) -+ check_type(argname="argument obj", value=obj, expected_type=type_hints["obj"]) - return typing.cast(jsii.Number, jsii.invoke(self, "test", [obj])) - - - class ParamShadowsBuiltins( - metaclass=jsii.JSIIMeta, -@@ -5662,10 +6144,14 @@ - :param str: should be set to something that is NOT a valid expression in Python (e.g: "\${NOPE}""). - :param boolean_property: - :param string_property: - :param struct_property: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__32a51b5d61d5ca58d33e8f6b9d9e1c4f16b39bf431a669250d4c290de0bbf46f) -+ check_type(argname="argument builtins", value=builtins, expected_type=type_hints["builtins"]) -+ check_type(argname="argument str", value=str, expected_type=type_hints["str"]) - props = ParamShadowsBuiltinsProps( - boolean_property=boolean_property, - string_property=string_property, - struct_property=struct_property, - ) -@@ -5695,10 +6181,15 @@ - :param string_property: - :param struct_property: - ''' - if isinstance(struct_property, dict): - struct_property = StructA(**struct_property) -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c93d69c5c8307eec2d1c6e8d5f9892234fbdd24bb5cce3f5ea1e210276bc58c1) -+ check_type(argname="argument boolean_property", value=boolean_property, expected_type=type_hints["boolean_property"]) -+ check_type(argname="argument string_property", value=string_property, expected_type=type_hints["string_property"]) -+ check_type(argname="argument struct_property", value=struct_property, expected_type=type_hints["struct_property"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "boolean_property": boolean_property, - "string_property": string_property, - "struct_property": struct_property, - } -@@ -5751,10 +6242,13 @@ - scope: _scope_jsii_calc_lib_c61f082f.Number, - ) -> _scope_jsii_calc_lib_c61f082f.Number: - ''' - :param scope: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__ae63c91319764cabd02536ac5b03026eb3f4071497b2a04adf93ca02985507ae) -+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"]) - return typing.cast(_scope_jsii_calc_lib_c61f082f.Number, jsii.invoke(self, "useScope", [scope])) - - - @jsii.data_type( - jsii_type="jsii-calc.ParentStruct982", -@@ -5765,10 +6259,13 @@ - def __init__(self, *, foo: builtins.str) -> None: - '''https://github.com/aws/jsii/issues/982. - - :param foo: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__f6db465208dd616dc4f171643676a159b21fe5963ec9a3d1fd752e5cb291868d) -+ check_type(argname="argument foo", value=foo, expected_type=type_hints["foo"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "foo": foo, - } - - @builtins.property -@@ -5823,10 +6320,15 @@ - ''' - :param obj: - - :param dt: - - :param ev: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__85c3ad65f24d8d5af99d7777a0379b793f45ac0e0e39714f279b8f2d58dbcfdb) -+ check_type(argname="argument obj", value=obj, expected_type=type_hints["obj"]) -+ check_type(argname="argument dt", value=dt, expected_type=type_hints["dt"]) -+ check_type(argname="argument ev", value=ev, expected_type=type_hints["ev"]) - return typing.cast(builtins.str, jsii.invoke(self, "consumePartiallyInitializedThis", [obj, dt, ev])) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class - typing.cast(typing.Any, PartiallyInitializedThisConsumer).__jsii_proxy_class__ = lambda : _PartiallyInitializedThisConsumerProxy - -@@ -5841,10 +6343,13 @@ - friendly: _scope_jsii_calc_lib_c61f082f.IFriendly, - ) -> builtins.str: - ''' - :param friendly: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__edbbf85a7c4217635da7418d28aa61c4e11f7a0c1e9c960528ed4e7bee1ad541) -+ check_type(argname="argument friendly", value=friendly, expected_type=type_hints["friendly"]) - return typing.cast(builtins.str, jsii.invoke(self, "sayHello", [friendly])) - - - class Power( - _CompositeOperation_1c4d123b, -@@ -5861,10 +6366,14 @@ - '''Creates a Power operation. - - :param base: The base of the power. - :param pow: The number of times to multiply. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__df4f41b4c003b9ba61f07f4d41a4059f167ea41c03ea29933966d2caeb831d8c) -+ check_type(argname="argument base", value=base, expected_type=type_hints["base"]) -+ check_type(argname="argument pow", value=pow, expected_type=type_hints["pow"]) - jsii.create(self.__class__, self, [base, pow]) - - @builtins.property - @jsii.member(jsii_name="base") - def base(self) -> _scope_jsii_calc_lib_c61f082f.NumericValue: -@@ -6087,10 +6596,13 @@ - value: _scope_jsii_calc_lib_c61f082f.EnumFromScopedModule, - ) -> None: - ''' - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__235768085718ab33214221cff3145bb2a82c28916350f273995760a428a1aba3) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - return typing.cast(None, jsii.invoke(self, "saveFoo", [value])) - - @builtins.property - @jsii.member(jsii_name="foo") - def foo( -@@ -6101,10 +6613,13 @@ - @foo.setter - def foo( - self, - value: typing.Optional[_scope_jsii_calc_lib_c61f082f.EnumFromScopedModule], - ) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__100c679fa10c1938fc087475a1e5fcdf7c2cbff383b1c02b1d09471cb4f23123) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "foo", value) - - - class ReturnsPrivateImplementationOfInterface( - metaclass=jsii.JSIIMeta, -@@ -6146,10 +6661,14 @@ - :param string_prop: May not be empty. - :param nested_struct: - ''' - if isinstance(nested_struct, dict): - nested_struct = NestedStruct(**nested_struct) -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__cf66d7b4f4a567aefacbafc24f61d33a942afde3d167676ed65ea82da95cd36e) -+ check_type(argname="argument string_prop", value=string_prop, expected_type=type_hints["string_prop"]) -+ check_type(argname="argument nested_struct", value=nested_struct, expected_type=type_hints["nested_struct"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "string_prop": string_prop, - } - if nested_struct is not None: - self._values["nested_struct"] = nested_struct -@@ -6216,17 +6735,25 @@ - ''' - :param arg1: - - :param arg2: - - :param arg3: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__6db501e892de783af62ff728e59cc3155afc51ddc2dff77cce61ffe698e2e1f3) -+ check_type(argname="argument arg1", value=arg1, expected_type=type_hints["arg1"]) -+ check_type(argname="argument arg2", value=arg2, expected_type=type_hints["arg2"]) -+ check_type(argname="argument arg3", value=arg3, expected_type=type_hints["arg3"]) - return typing.cast(None, jsii.invoke(self, "methodWithDefaultedArguments", [arg1, arg2, arg3])) - - @jsii.member(jsii_name="methodWithOptionalAnyArgument") - def method_with_optional_any_argument(self, arg: typing.Any = None) -> None: - ''' - :param arg: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5978f09aaa3317742377437d5735571f672119325c2b5d69f26153bae6764c85) -+ check_type(argname="argument arg", value=arg, expected_type=type_hints["arg"]) - return typing.cast(None, jsii.invoke(self, "methodWithOptionalAnyArgument", [arg])) - - @jsii.member(jsii_name="methodWithOptionalArguments") - def method_with_optional_arguments( - self, -@@ -6238,10 +6765,15 @@ - - :param arg1: - - :param arg2: - - :param arg3: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c894904fd4904d7e110da91df846a8ec0970051a274bba5ad95c2b7dc1125cc2) -+ check_type(argname="argument arg1", value=arg1, expected_type=type_hints["arg1"]) -+ check_type(argname="argument arg2", value=arg2, expected_type=type_hints["arg2"]) -+ check_type(argname="argument arg3", value=arg3, expected_type=type_hints["arg3"]) - return typing.cast(None, jsii.invoke(self, "methodWithOptionalArguments", [arg1, arg2, arg3])) - - - @jsii.data_type( - jsii_type="jsii-calc.SecondLevelStruct", -@@ -6260,10 +6792,14 @@ - ) -> None: - ''' - :param deeper_required_prop: It's long and required. - :param deeper_optional_prop: It's long, but you'll almost never pass it. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__e7383b9a36a10b88815e6c310c7b13c611260f5ccb143b75dac114873643350d) -+ check_type(argname="argument deeper_required_prop", value=deeper_required_prop, expected_type=type_hints["deeper_required_prop"]) -+ check_type(argname="argument deeper_optional_prop", value=deeper_optional_prop, expected_type=type_hints["deeper_optional_prop"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "deeper_required_prop": deeper_required_prop, - } - if deeper_optional_prop is not None: - self._values["deeper_optional_prop"] = deeper_optional_prop -@@ -6325,10 +6861,13 @@ - @jsii.member(jsii_name="isSingletonInt") - def is_singleton_int(self, value: jsii.Number) -> builtins.bool: - ''' - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__2ccde09a2986c421795069d44c46d9e2d7470609094b8b7177c6b154360f7435) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - return typing.cast(builtins.bool, jsii.invoke(self, "isSingletonInt", [value])) - - - @jsii.enum(jsii_type="jsii-calc.SingletonIntEnum") - class SingletonIntEnum(enum.Enum): -@@ -6347,10 +6886,13 @@ - @jsii.member(jsii_name="isSingletonString") - def is_singleton_string(self, value: builtins.str) -> builtins.bool: - ''' - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__76cbdc0bba36d674ab013a40d091c1f3ccb139f10e78844ebc868bfa5d707ef8) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - return typing.cast(builtins.bool, jsii.invoke(self, "isSingletonString", [value])) - - - @jsii.enum(jsii_type="jsii-calc.SingletonStringEnum") - class SingletonStringEnum(enum.Enum): -@@ -6374,10 +6916,14 @@ - ) -> None: - ''' - :param property: - :param yet_anoter_one: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__1b795ca2a3052da38144d10d87f230e74bcfa497af1262580f53908be48f6710) -+ check_type(argname="argument property", value=property, expected_type=type_hints["property"]) -+ check_type(argname="argument yet_anoter_one", value=yet_anoter_one, expected_type=type_hints["yet_anoter_one"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "property": property, - "yet_anoter_one": yet_anoter_one, - } - -@@ -6428,10 +6974,14 @@ - ) -> None: - ''' - :param readonly_string: - - :param mutable_number: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__8c577a76d55e32f4b62a2a005d0c321bf9d0784b2f6cea5f10e297f3f79fc4bb) -+ check_type(argname="argument readonly_string", value=readonly_string, expected_type=type_hints["readonly_string"]) -+ check_type(argname="argument mutable_number", value=mutable_number, expected_type=type_hints["mutable_number"]) - jsii.create(self.__class__, self, [readonly_string, mutable_number]) - - @jsii.member(jsii_name="method") - def method(self) -> None: - return typing.cast(None, jsii.invoke(self, "method", [])) -@@ -6446,10 +6996,13 @@ - def mutable_property(self) -> typing.Optional[jsii.Number]: - return typing.cast(typing.Optional[jsii.Number], jsii.get(self, "mutableProperty")) - - @mutable_property.setter - def mutable_property(self, value: typing.Optional[jsii.Number]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__737be2f0376e64bd8c0980aee9fc6afd796bb4d0cb3415eab28d054f15881752) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "mutableProperty", value) - - - @jsii.enum(jsii_type="jsii-calc.StableEnum") - class StableEnum(enum.Enum): -@@ -6465,10 +7018,13 @@ - class StableStruct: - def __init__(self, *, readonly_property: builtins.str) -> None: - ''' - :param readonly_property: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__4bbf1eebbce12768b1d2ef90968ffdbe749e42ce8bcdaf4c8750314d2160c5ea) -+ check_type(argname="argument readonly_property", value=readonly_property, expected_type=type_hints["readonly_property"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "readonly_property": readonly_property, - } - - @builtins.property -@@ -6505,10 +7061,13 @@ - def static_variable(cls) -> builtins.bool: # pyright: ignore [reportGeneralTypeIssues] - return typing.cast(builtins.bool, jsii.sget(cls, "staticVariable")) - - @static_variable.setter # type: ignore[no-redef] - def static_variable(cls, value: builtins.bool) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__cf00e16ec45ebcadc1f7003eb344ecf452096a12a1a76ff0e15fce1066d716d2) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.sset(cls, "staticVariable", value) - - - class StaticHelloParent( - metaclass=jsii.JSIIMeta, -@@ -6538,19 +7097,25 @@ - class Statics(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Statics"): - def __init__(self, value: builtins.str) -> None: - ''' - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__69df39c5fc3367bba974a46518d9122ce067721f56037ef6e1faedf479222822) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.create(self.__class__, self, [value]) - - @jsii.member(jsii_name="staticMethod") - @builtins.classmethod - def static_method(cls, name: builtins.str) -> builtins.str: - '''Jsdocs for static method. - - :param name: The name of the person to say hello to. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c4597464b7867e98bf0052f7808e080b75874d088aeac980865a4fc19e47a6d1) -+ check_type(argname="argument name", value=name, expected_type=type_hints["name"]) - return typing.cast(builtins.str, jsii.sinvoke(cls, "staticMethod", [name])) - - @jsii.member(jsii_name="justMethod") - def just_method(self) -> builtins.str: - return typing.cast(builtins.str, jsii.invoke(self, "justMethod", [])) -@@ -6587,19 +7152,25 @@ - ''' - return typing.cast("Statics", jsii.sget(cls, "instance")) - - @instance.setter # type: ignore[no-redef] - def instance(cls, value: "Statics") -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__748a4d0813e4a3ab750bd52215b9ff4dee315d39b160d47884780ea7c4b10daf) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.sset(cls, "instance", value) - - @jsii.python.classproperty - @jsii.member(jsii_name="nonConstStatic") - def non_const_static(cls) -> jsii.Number: # pyright: ignore [reportGeneralTypeIssues] - return typing.cast(jsii.Number, jsii.sget(cls, "nonConstStatic")) - - @non_const_static.setter # type: ignore[no-redef] - def non_const_static(cls, value: jsii.Number) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5d0ed37ae4b7f5bd294a768da342f4735c6636e0197883a5727e46ed81deec69) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.sset(cls, "nonConstStatic", value) - - @builtins.property - @jsii.member(jsii_name="value") - def value(self) -> builtins.str: -@@ -6622,10 +7193,13 @@ - def you_see_me(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "youSeeMe")) - - @you_see_me.setter - def you_see_me(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__aa3b9a5342b6fe1366fac3279219c5bae15389881ddd050c544c1d0001853482) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "youSeeMe", value) - - - @jsii.data_type( - jsii_type="jsii-calc.StructA", -@@ -6648,10 +7222,15 @@ - - :param required_string: - :param optional_number: - :param optional_string: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c9e4f6413d6ce49f4a289256d84d0fa97f7abac1877fc8d49f80f4a7d83a4972) -+ check_type(argname="argument required_string", value=required_string, expected_type=type_hints["required_string"]) -+ check_type(argname="argument optional_number", value=optional_number, expected_type=type_hints["optional_number"]) -+ check_type(argname="argument optional_string", value=optional_string, expected_type=type_hints["optional_string"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "required_string": required_string, - } - if optional_number is not None: - self._values["optional_number"] = optional_number -@@ -6709,10 +7288,15 @@ - :param optional_boolean: - :param optional_struct_a: - ''' - if isinstance(optional_struct_a, dict): - optional_struct_a = StructA(**optional_struct_a) -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__4d335a3a7bbc35ed76509a5e85466d6d29221efebdd6dd4de639ef040628f332) -+ check_type(argname="argument required_string", value=required_string, expected_type=type_hints["required_string"]) -+ check_type(argname="argument optional_boolean", value=optional_boolean, expected_type=type_hints["optional_boolean"]) -+ check_type(argname="argument optional_struct_a", value=optional_struct_a, expected_type=type_hints["optional_struct_a"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "required_string": required_string, - } - if optional_boolean is not None: - self._values["optional_boolean"] = optional_boolean -@@ -6764,10 +7348,14 @@ - See: https://github.com/aws/aws-cdk/issues/4302 - - :param scope: - :param props: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__7eb7b6caeb33bbd3740ca0fc027022df9d4fade4a7d1943a334f2869ab44bd98) -+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"]) -+ check_type(argname="argument props", value=props, expected_type=type_hints["props"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "scope": scope, - } - if props is not None: - self._values["props"] = props -@@ -6810,10 +7398,14 @@ - ) -> jsii.Number: - ''' - :param _positional: - - :param inputs: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__e3587fc6359e7cd1adf0bb70ed66e1cd69faa462a530e07c8d25a96b942cb943) -+ check_type(argname="argument _positional", value=_positional, expected_type=type_hints["_positional"]) -+ check_type(argname="argument inputs", value=inputs, expected_type=typing.Tuple[type_hints["inputs"], ...]) # pyright: ignore [reportGeneralTypeIssues] - return typing.cast(jsii.Number, jsii.sinvoke(cls, "howManyVarArgsDidIPass", [_positional, *inputs])) - - @jsii.member(jsii_name="roundTrip") - @builtins.classmethod - def round_trip( -@@ -6828,10 +7420,13 @@ - :param _positional: - - :param required: This is a required field. - :param second_level: A union to really stress test our serialization. - :param optional: You don't have to pass this. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__b60fd8dad9496da93546e0555f2f8a7a34711e7160c06dc64a47f095f1539d02) -+ check_type(argname="argument _positional", value=_positional, expected_type=type_hints["_positional"]) - input = TopLevelStruct( - required=required, second_level=second_level, optional=optional - ) - - return typing.cast("TopLevelStruct", jsii.sinvoke(cls, "roundTrip", [_positional, input])) -@@ -6848,10 +7443,13 @@ - struct: typing.Union[typing.Union[StructA, typing.Dict[builtins.str, typing.Any]], typing.Union[StructB, typing.Dict[builtins.str, typing.Any]]], - ) -> builtins.bool: - ''' - :param struct: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__1c22dd35a08877498e4c2c0ed61e220c19d83da3b6a1e278dfcb7af4d76d2df8) -+ check_type(argname="argument struct", value=struct, expected_type=type_hints["struct"]) - return typing.cast(builtins.bool, jsii.sinvoke(cls, "isStructA", [struct])) - - @jsii.member(jsii_name="isStructB") - @builtins.classmethod - def is_struct_b( -@@ -6859,18 +7457,24 @@ - struct: typing.Union[typing.Union[StructA, typing.Dict[builtins.str, typing.Any]], typing.Union[StructB, typing.Dict[builtins.str, typing.Any]]], - ) -> builtins.bool: - ''' - :param struct: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__bfb5d0235b42940b9a17c7bb3182f454c7652fdb031f8993719a701d42833623) -+ check_type(argname="argument struct", value=struct, expected_type=type_hints["struct"]) - return typing.cast(builtins.bool, jsii.sinvoke(cls, "isStructB", [struct])) - - @jsii.member(jsii_name="provideStruct") - @builtins.classmethod - def provide_struct(cls, which: builtins.str) -> typing.Union[StructA, StructB]: - ''' - :param which: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__e3e3d0b072ef214d95806fb0366dd1f4a92b97932f845c9364616c9348bce502) -+ check_type(argname="argument which", value=which, expected_type=type_hints["which"]) - return typing.cast(typing.Union[StructA, StructB], jsii.sinvoke(cls, "provideStruct", [which])) - - - @jsii.data_type( - jsii_type="jsii-calc.StructWithCollectionOfUnionts", -@@ -6884,10 +7488,13 @@ - union_property: typing.Sequence[typing.Mapping[builtins.str, typing.Union[typing.Union[StructA, typing.Dict[builtins.str, typing.Any]], typing.Union[StructB, typing.Dict[builtins.str, typing.Any]]]]], - ) -> None: - ''' - :param union_property: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__06173422e8b2a410ef992bee26115592516245e72f1a99397919d18bfebc1259) -+ check_type(argname="argument union_property", value=union_property, expected_type=type_hints["union_property"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "union_property": union_property, - } - - @builtins.property -@@ -6924,10 +7531,14 @@ - ) -> None: - ''' - :param foo: An enum value. - :param bar: Optional enum value (of type integer). Default: AllTypesEnum.YOUR_ENUM_VALUE - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__9fac60639e71eb35a422d891e6b571b3ba2118da50de35e8ba784bbb73928be9) -+ check_type(argname="argument foo", value=foo, expected_type=type_hints["foo"]) -+ check_type(argname="argument bar", value=bar, expected_type=type_hints["bar"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "foo": foo, - } - if bar is not None: - self._values["bar"] = bar -@@ -6983,10 +7594,16 @@ - :param default: - :param assert_: - :param result: - :param that: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__21b11cdfe2d95237cdddef417a67936ff8529ea3cef4bd7e80fe498f1e27527d) -+ check_type(argname="argument default", value=default, expected_type=type_hints["default"]) -+ check_type(argname="argument assert_", value=assert_, expected_type=type_hints["assert_"]) -+ check_type(argname="argument result", value=result, expected_type=type_hints["result"]) -+ check_type(argname="argument that", value=that, expected_type=type_hints["that"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "default": default, - } - if assert_ is not None: - self._values["assert_"] = assert_ -@@ -7056,10 +7673,13 @@ - @parts.setter - def parts( - self, - value: typing.List[_scope_jsii_calc_lib_c61f082f.NumericValue], - ) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__e2e14d04b1a68f16d9aef0965aa4ffbc51af3cbd2d201ac6e236d861b10c2fbf) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "parts", value) - - - @jsii.data_type( - jsii_type="jsii-calc.SupportsNiceJavaBuilderProps", -@@ -7075,10 +7695,14 @@ - ) -> None: - ''' - :param bar: Some number, like 42. - :param id: An \`\`id\`\` field here is terrible API design, because the constructor of \`\`SupportsNiceJavaBuilder\`\` already has a parameter named \`\`id\`\`. But here we are, doing it like we didn't care. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__11e78aa6557af36be636eea7a1a9b1d6ebf38d63d876b270de65a5f23152b605) -+ check_type(argname="argument bar", value=bar, expected_type=type_hints["bar"]) -+ check_type(argname="argument id", value=id, expected_type=type_hints["id"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "bar": bar, - } - if id is not None: - self._values["id"] = id -@@ -7127,10 +7751,13 @@ - ''' - :param id_: some identifier of your choice. - :param bar: Some number, like 42. - :param id: An \`\`id\`\` field here is terrible API design, because the constructor of \`\`SupportsNiceJavaBuilder\`\` already has a parameter named \`\`id\`\`. But here we are, doing it like we didn't care. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__46b91a4f1b85f01437aa8a6dda82c7c9e02f0b2ae5324f8c1591fa7ff74feaa0) -+ check_type(argname="argument id_", value=id_, expected_type=type_hints["id_"]) - props = SupportsNiceJavaBuilderProps(bar=bar, id=id) - - jsii.create(self.__class__, self, [id_, props]) - - @builtins.property -@@ -7168,17 +7795,23 @@ - @jsii.member(jsii_name="modifyOtherProperty") - def modify_other_property(self, value: builtins.str) -> None: - ''' - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__a961c6dee96c75a70470863d82c09136094c1d72d47aafe7f105c7733536dd4d) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - return typing.cast(None, jsii.invoke(self, "modifyOtherProperty", [value])) - - @jsii.member(jsii_name="modifyValueOfTheProperty") - def modify_value_of_the_property(self, value: builtins.str) -> None: - ''' - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__f3d4d3109122672e8fa17c64fb60787d84a098ee0ee0857d4a10ffe5345a1908) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - return typing.cast(None, jsii.invoke(self, "modifyValueOfTheProperty", [value])) - - @jsii.member(jsii_name="readA") - def read_a(self) -> jsii.Number: - return typing.cast(jsii.Number, jsii.invoke(self, "readA", [])) -@@ -7198,17 +7831,23 @@ - @jsii.member(jsii_name="virtualMethod") - def virtual_method(self, n: jsii.Number) -> jsii.Number: - ''' - :param n: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__ba36c4cb32b9551fe1c3e91bd834b2e97f7ee93d0b5919acfb1c4fd3d6161295) -+ check_type(argname="argument n", value=n, expected_type=type_hints["n"]) - return typing.cast(jsii.Number, jsii.invoke(self, "virtualMethod", [n])) - - @jsii.member(jsii_name="writeA") - def write_a(self, value: jsii.Number) -> None: - ''' - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__7118412729d7ec6272cded791897b09f12ee70e1ca550853121f98ceb30ee0e7) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - return typing.cast(None, jsii.invoke(self, "writeA", [value])) - - @builtins.property - @jsii.member(jsii_name="readonlyProperty") - def readonly_property(self) -> builtins.str: -@@ -7219,46 +7858,61 @@ - def a(self) -> jsii.Number: - return typing.cast(jsii.Number, jsii.get(self, "a")) - - @a.setter - def a(self, value: jsii.Number) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c361a6694d6564ff5c16af012cfaf94cac0a971928a1d0fb014c27f971287836) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "a", value) - - @builtins.property - @jsii.member(jsii_name="callerIsProperty") - def caller_is_property(self) -> jsii.Number: - return typing.cast(jsii.Number, jsii.get(self, "callerIsProperty")) - - @caller_is_property.setter - def caller_is_property(self, value: jsii.Number) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__d5d44f6e3395b0db421bab95a6dd7d1560538c63f136025c6b216ffb01eae179) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "callerIsProperty", value) - - @builtins.property - @jsii.member(jsii_name="otherProperty") - def other_property(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "otherProperty")) - - @other_property.setter - def other_property(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__64c8c65ae76fcafb4b6d28e75f8fd31efad60ab9e71d11cbd5877c28c45d8f70) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "otherProperty", value) - - @builtins.property - @jsii.member(jsii_name="theProperty") - def the_property(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "theProperty")) - - @the_property.setter - def the_property(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__52ea95020be0094da769c873214a182768aa2de47b1c4c3dff43f1226edfe281) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "theProperty", value) - - @builtins.property - @jsii.member(jsii_name="valueOfOtherProperty") - def value_of_other_property(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "valueOfOtherProperty")) - - @value_of_other_property.setter - def value_of_other_property(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__21d6ffe465a7e42c257c8318bf2bee38ecbc6b1959e6e945e769e365afb3e55d) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "valueOfOtherProperty", value) - - - class TestStructWithEnum( - metaclass=jsii.JSIIMeta, -@@ -7341,10 +7995,15 @@ - ''' - :param required: This is a required field. - :param second_level: A union to really stress test our serialization. - :param optional: You don't have to pass this. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__74359fdf4e6a6505a1c0bc4c2c687826dde0a7696de75fc39f9ed57d89137f96) -+ check_type(argname="argument required", value=required, expected_type=type_hints["required"]) -+ check_type(argname="argument second_level", value=second_level, expected_type=type_hints["second_level"]) -+ check_type(argname="argument optional", value=optional, expected_type=type_hints["optional"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "required": required, - "second_level": second_level, - } - if optional is not None: -@@ -7435,10 +8094,13 @@ - - def __init__(self, operand: _scope_jsii_calc_lib_c61f082f.NumericValue) -> None: - ''' - :param operand: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__e31f878fe14747887a58683a15ca9c8ab54ec35cd6e3a665ad70dd53deadb573) -+ check_type(argname="argument operand", value=operand, expected_type=type_hints["operand"]) - jsii.create(self.__class__, self, [operand]) - - @builtins.property - @jsii.member(jsii_name="operand") - def operand(self) -> _scope_jsii_calc_lib_c61f082f.NumericValue: -@@ -7469,10 +8131,14 @@ - ) -> None: - ''' - :param bar: - :param foo: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__223de5294ccc50da976adb8794cb8556981e31d63a2c8b249f7dfbd9e2d99eac) -+ check_type(argname="argument bar", value=bar, expected_type=type_hints["bar"]) -+ check_type(argname="argument foo", value=foo, expected_type=type_hints["foo"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "bar": bar, - } - if foo is not None: - self._values["foo"] = foo -@@ -7509,10 +8175,13 @@ - - def __init__(self, delegate: typing.Mapping[builtins.str, typing.Any]) -> None: - ''' - :param delegate: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__aaaf822e80c6473bff9b1da58151a278cd846ae0614db9af97bc57ea6f899ce2) -+ check_type(argname="argument delegate", value=delegate, expected_type=type_hints["delegate"]) - jsii.create(self.__class__, self, [delegate]) - - @jsii.python.classproperty - @jsii.member(jsii_name="reflector") - def REFLECTOR(cls) -> _scope_jsii_calc_lib_custom_submodule_name_c61f082f.Reflector: -@@ -7555,10 +8224,13 @@ - ): - def __init__(self, obj: IInterfaceWithProperties) -> None: - ''' - :param obj: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__73d1545891c65d400938add489402441cb083c61d214ad7a922b6417d3984732) -+ check_type(argname="argument obj", value=obj, expected_type=type_hints["obj"]) - jsii.create(self.__class__, self, [obj]) - - @jsii.member(jsii_name="justRead") - def just_read(self) -> builtins.str: - return typing.cast(builtins.str, jsii.invoke(self, "justRead", [])) -@@ -7569,17 +8241,23 @@ - ext: IInterfaceWithPropertiesExtension, - ) -> builtins.str: - ''' - :param ext: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__60f3870a6dceb3773397b75ec3f3b664f38c2cc3d2f37dc055262663d12f41a8) -+ check_type(argname="argument ext", value=ext, expected_type=type_hints["ext"]) - return typing.cast(builtins.str, jsii.invoke(self, "readStringAndNumber", [ext])) - - @jsii.member(jsii_name="writeAndRead") - def write_and_read(self, value: builtins.str) -> builtins.str: - ''' - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__42edcb376aed0b6e6fec7d7df016bda9e3a31df0e47ecabb5465d1c84d16a414) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - return typing.cast(builtins.str, jsii.invoke(self, "writeAndRead", [value])) - - @builtins.property - @jsii.member(jsii_name="obj") - def obj(self) -> IInterfaceWithProperties: -@@ -7589,25 +8267,34 @@ - class VariadicInvoker(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VariadicInvoker"): - def __init__(self, method: "VariadicMethod") -> None: - ''' - :param method: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__6d238d6a2f6e464c570c3176db3d78d62e0be9908b705705c8f6d7b6b2385c54) -+ check_type(argname="argument method", value=method, expected_type=type_hints["method"]) - jsii.create(self.__class__, self, [method]) - - @jsii.member(jsii_name="asArray") - def as_array(self, *values: jsii.Number) -> typing.List[jsii.Number]: - ''' - :param values: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__43f32dfb73f1a7fe9c86c00bbc381391db4812c13b5b72363ddcfcd57638c368) -+ check_type(argname="argument values", value=values, expected_type=typing.Tuple[type_hints["values"], ...]) # pyright: ignore [reportGeneralTypeIssues] - return typing.cast(typing.List[jsii.Number], jsii.invoke(self, "asArray", [*values])) - - - class VariadicMethod(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.VariadicMethod"): - def __init__(self, *prefix: jsii.Number) -> None: - ''' - :param prefix: a prefix that will be use for all values returned by \`\`#asArray\`\`. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__a33769c23320f9f6bce3e3a70c594135cf44ca5c9c6d1de1cae8cc62a99d49e9) -+ check_type(argname="argument prefix", value=prefix, expected_type=typing.Tuple[type_hints["prefix"], ...]) # pyright: ignore [reportGeneralTypeIssues] - jsii.create(self.__class__, self, [*prefix]) - - @jsii.member(jsii_name="asArray") - def as_array( - self, -@@ -7616,10 +8303,14 @@ - ) -> typing.List[jsii.Number]: - ''' - :param first: the first element of the array to be returned (after the \`\`prefix\`\` provided at construction time). - :param others: other elements to be included in the array. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__1c18f2c7d91dcdc13843ff1637ed95a1f1c1ed99384d6276ee493b0ca579b4a4) -+ check_type(argname="argument first", value=first, expected_type=type_hints["first"]) -+ check_type(argname="argument others", value=others, expected_type=typing.Tuple[type_hints["others"], ...]) # pyright: ignore [reportGeneralTypeIssues] - return typing.cast(typing.List[jsii.Number], jsii.invoke(self, "asArray", [first, *others])) - - - class VariadicTypeUnion( - metaclass=jsii.JSIIMeta, -@@ -7627,19 +8318,25 @@ - ): - def __init__(self, *union: typing.Union[StructA, StructB]) -> None: - ''' - :param union: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__f18ff2aa5c744d99cc2b37e705d6ed44823660f714c20539c148c9e34e123752) -+ check_type(argname="argument union", value=union, expected_type=typing.Tuple[type_hints["union"], ...]) # pyright: ignore [reportGeneralTypeIssues] - jsii.create(self.__class__, self, [*union]) - - @builtins.property - @jsii.member(jsii_name="union") - def union(self) -> typing.List[typing.Union[StructA, StructB]]: - return typing.cast(typing.List[typing.Union[StructA, StructB]], jsii.get(self, "union")) - - @union.setter - def union(self, value: typing.List[typing.Union[StructA, StructB]]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__01944feab2feb5a9fdf3d356f62de139685f520d3bb3a38ddc5c42d0b03963fe) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "union", value) - - - class VirtualMethodPlayground( - metaclass=jsii.JSIIMeta, -@@ -7651,38 +8348,53 @@ - @jsii.member(jsii_name="overrideMeAsync") - def override_me_async(self, index: jsii.Number) -> jsii.Number: - ''' - :param index: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5efa2ef42e261d5c38c59d5e216e587cb3005bbbb5b4a62e926087ee58478a36) -+ check_type(argname="argument index", value=index, expected_type=type_hints["index"]) - return typing.cast(jsii.Number, jsii.ainvoke(self, "overrideMeAsync", [index])) - - @jsii.member(jsii_name="overrideMeSync") - def override_me_sync(self, index: jsii.Number) -> jsii.Number: - ''' - :param index: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__ca8f2360b0292d0b5329ac52818673aece7fb01cf2f09567e60ff65b7728c9cc) -+ check_type(argname="argument index", value=index, expected_type=type_hints["index"]) - return typing.cast(jsii.Number, jsii.invoke(self, "overrideMeSync", [index])) - - @jsii.member(jsii_name="parallelSumAsync") - def parallel_sum_async(self, count: jsii.Number) -> jsii.Number: - ''' - :param count: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5bc99fd66b59152ee7799cf716c91bec428d7091eb33ece69057f9ca9b9fdb19) -+ check_type(argname="argument count", value=count, expected_type=type_hints["count"]) - return typing.cast(jsii.Number, jsii.ainvoke(self, "parallelSumAsync", [count])) - - @jsii.member(jsii_name="serialSumAsync") - def serial_sum_async(self, count: jsii.Number) -> jsii.Number: - ''' - :param count: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__58451fb4813d1aa8877a55de41f1ef8bd30300048337edb2bcf16985abbb6f45) -+ check_type(argname="argument count", value=count, expected_type=type_hints["count"]) - return typing.cast(jsii.Number, jsii.ainvoke(self, "serialSumAsync", [count])) - - @jsii.member(jsii_name="sumSync") - def sum_sync(self, count: jsii.Number) -> jsii.Number: - ''' - :param count: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__7ac4c09636b11fefb0a54fbd52b88fc2b4c5c356eb07189a0d2545601f3bef9c) -+ check_type(argname="argument count", value=count, expected_type=type_hints["count"]) - return typing.cast(jsii.Number, jsii.invoke(self, "sumSync", [count])) - - - class VoidCallback( - metaclass=jsii.JSIIAbstractClass, -@@ -7730,10 +8442,13 @@ - - def __init__(self, private_field: typing.Optional[builtins.str] = None) -> None: - ''' - :param private_field: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__01fcbc911a24b1fa352275e1273526114db562d2c278b742181eba6e8cb11ad4) -+ check_type(argname="argument private_field", value=private_field, expected_type=type_hints["private_field"]) - jsii.create(self.__class__, self, [private_field]) - - @builtins.property - @jsii.member(jsii_name="success") - def success(self) -> builtins.bool: -@@ -7774,10 +8489,13 @@ - @jsii.member(jsii_name="abstractMethod") - def abstract_method(self, name: builtins.str) -> builtins.str: - ''' - :param name: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__af1f574dee5c4eb581961518ccf32b4060094ed2f9b7e60bece1ed48e3fc45a1) -+ check_type(argname="argument name", value=name, expected_type=type_hints["name"]) - return typing.cast(builtins.str, jsii.invoke(self, "abstractMethod", [name])) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class - typing.cast(typing.Any, AbstractClass).__jsii_proxy_class__ = lambda : _AbstractClassProxy - -@@ -7793,10 +8511,14 @@ - '''Creates a BinaryOperation. - - :param lhs: Left-hand side operand. - :param rhs: Right-hand side operand. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__c0e59e6ea7e78215051bf4fe6b69de179aefb4116a344decdfaab4b6b15189b8) -+ check_type(argname="argument lhs", value=lhs, expected_type=type_hints["lhs"]) -+ check_type(argname="argument rhs", value=rhs, expected_type=type_hints["rhs"]) - jsii.create(self.__class__, self, [lhs, rhs]) - - @jsii.member(jsii_name="toString") - def to_string(self) -> builtins.str: - '''String representation of the value.''' -@@ -7840,10 +8562,13 @@ - def rung(self) -> builtins.bool: - return typing.cast(builtins.bool, jsii.get(self, "rung")) - - @rung.setter - def rung(self, value: builtins.bool) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__fa23831ecd0b539d7689616a0557240dc1a45f924fafe58c0d5f0ac464eecf94) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "rung", value) - - - @jsii.data_type( - jsii_type="jsii-calc.ChildStruct982", -@@ -7854,10 +8579,14 @@ - def __init__(self, *, foo: builtins.str, bar: jsii.Number) -> None: - ''' - :param foo: - :param bar: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__84a0b7e93c52a4977e9726c1186b64f57ff35c59c5bc0e7250da1d3236e70208) -+ check_type(argname="argument foo", value=foo, expected_type=type_hints["foo"]) -+ check_type(argname="argument bar", value=bar, expected_type=type_hints["bar"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "foo": foo, - "bar": bar, - } - -@@ -7898,37 +8627,49 @@ - def a(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "a")) - - @a.setter - def a(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__720d53a768711730e792d129fcff6272627608d1d3942f42e3010e61a3463b31) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "a", value) - - @builtins.property - @jsii.member(jsii_name="b") - def b(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "b")) - - @b.setter - def b(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5236e267a6763b672404dac13a3d5e50c03eb03d35fe2c18cbe7f649933301f1) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "b", value) - - @builtins.property - @jsii.member(jsii_name="c") - def c(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "c")) - - @c.setter - def c(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__1bd3b16d1aaf127e7610a230095bced32c4c3ef1cadc73f6b24c76b3ebffdd8e) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "c", value) - - @builtins.property - @jsii.member(jsii_name="d") - def d(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "d")) - - @d.setter - def d(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__4e685d8185af60a2f5c9bcffe812224568fe893228304e510b4d989f92c19b90) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "d", value) - - - @jsii.implements(INonInternalInterface) - class ClassThatImplementsThePrivateInterface( -@@ -7943,37 +8684,49 @@ - def a(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "a")) - - @a.setter - def a(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__6499a25aa5ac6723e26c4c716dd2d62a1f9ecd75ae2a476d3213fa5fe8792a1d) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "a", value) - - @builtins.property - @jsii.member(jsii_name="b") - def b(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "b")) - - @b.setter - def b(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5da75e226d085b0daac7742a86525ea697c77a044896ce80d48677f5fadb2d57) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "b", value) - - @builtins.property - @jsii.member(jsii_name="c") - def c(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "c")) - - @c.setter - def c(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__538f9410afd2d028ca599a233896016121b326bd90d69693e949aff75d72caf3) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "c", value) - - @builtins.property - @jsii.member(jsii_name="e") - def e(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "e")) - - @e.setter - def e(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__ba8bf3471001981f03d1ad5b84a1b0a4a4d7d556c72734d25d96637a60ad2477) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "e", value) - - - @jsii.implements(IInterfaceWithProperties) - class ClassWithPrivateConstructorAndAutomaticProperties( -@@ -7991,10 +8744,14 @@ - ) -> "ClassWithPrivateConstructorAndAutomaticProperties": - ''' - :param read_only_string: - - :param read_write_string: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__71399b17d07223b2b83f0d7b33d5172c49eb3d0cf3fe38d6059d4c9b7f471113) -+ check_type(argname="argument read_only_string", value=read_only_string, expected_type=type_hints["read_only_string"]) -+ check_type(argname="argument read_write_string", value=read_write_string, expected_type=type_hints["read_write_string"]) - return typing.cast("ClassWithPrivateConstructorAndAutomaticProperties", jsii.sinvoke(cls, "create", [read_only_string, read_write_string])) - - @builtins.property - @jsii.member(jsii_name="readOnlyString") - def read_only_string(self) -> builtins.str: -@@ -8005,10 +8762,13 @@ - def read_write_string(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "readWriteString")) - - @read_write_string.setter - def read_write_string(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__e308499c7b9268c91ee3dc9e4a9c975efdfaa0cd72bd877383c6c64e8f2768d0) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "readWriteString", value) - - - @jsii.implements(IIndirectlyImplemented) - class FullCombo(BaseClass, metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.FullCombo"): -@@ -8123,10 +8883,13 @@ - ): - def __init__(self, property: builtins.str) -> None: - ''' - :param property: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__148cd823b5de47723c8a76d0553f3ff6c880ba8ecec14b9a86bd89025a18f4d3) -+ check_type(argname="argument property", value=property, expected_type=type_hints["property"]) - jsii.create(self.__class__, self, [property]) - - @jsii.member(jsii_name="bar") - def bar(self) -> None: - return typing.cast(None, jsii.invoke(self, "bar", [])) -@@ -8147,10 +8910,13 @@ - - def __init__(self, operand: _scope_jsii_calc_lib_c61f082f.NumericValue) -> None: - ''' - :param operand: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__e7aa949631662ae6f6ab2804e4a231fa264a1c879d86efa8267e53158c50e647) -+ check_type(argname="argument operand", value=operand, expected_type=type_hints["operand"]) - jsii.create(self.__class__, self, [operand]) - - @jsii.member(jsii_name="farewell") - def farewell(self) -> builtins.str: - '''Say farewell.''' -@@ -8210,10 +8976,16 @@ - :param id: some identifier. - :param default_bar: the default value of \`\`bar\`\`. - :param props: some props once can provide. - :param rest: a variadic continuation. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__2f90423a63bd0fc04016022e622b4bf01d35f365e38b15153d0a4d6fa014ee5b) -+ check_type(argname="argument id", value=id, expected_type=type_hints["id"]) -+ check_type(argname="argument default_bar", value=default_bar, expected_type=type_hints["default_bar"]) -+ check_type(argname="argument props", value=props, expected_type=type_hints["props"]) -+ check_type(argname="argument rest", value=rest, expected_type=typing.Tuple[type_hints["rest"], ...]) # pyright: ignore [reportGeneralTypeIssues] - jsii.create(self.__class__, self, [id, default_bar, props, *rest]) - - @builtins.property - @jsii.member(jsii_name="id") - def id(self) -> jsii.Number: -@@ -8509,5 +9281,1522 @@ - from . import nodirect - from . import onlystatic - from . import python_self - from . import submodule - from . import union -+ -+def _typecheckingstub__8348af6419fc01178f78ba59cea59d0c7437626169866d772f4e957d09e6e13a( -+ seed: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__06c06b97e36be962012901c4c1f542b3f51b377154f91bf1154d1bd475221829( -+ str: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__0f076015f51de68c2d0e6902c0d199c9058ad0bff9c11f58b2aae99578ece6ae( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__81a2d86a9598fa10dde4af8bd70d369967edc6febb332dc788702f6aea07f33c( -+ inp: typing.Any, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__56056c33132184bd4ad46f69c534777112c49b9a987cc7b962d4026cf550998c( -+ value: StringEnum, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__1ab9ae75c746f751d2bf2ac254bcd1bee8eae7281ec936e222c9f29765fdcfa4( -+ value: typing.List[typing.Any], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__f88e356a91a703923e622c02850435cc7f632a66f49ca79f00d42590d2928a5e( -+ value: typing.Mapping[builtins.str, typing.Any], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__d81f1a89ccd850ccdb0b96a43000dfcde30f3542bf797051c754610d641f2316( -+ value: typing.Any, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__0c663902e9a8a1db9aff59eb8642a68c944dc2e3385744098d2b51ecf2e2e11f( -+ value: typing.List[builtins.str], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__106a83d3c77dbb6dbc6fcd706bca888d57ec37cd4beedf7dcc9d7d4428f44845( -+ value: builtins.bool, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5e62ea2f9629943c1138cad77629f47906644279c178b9436e4303e5a5f74c8a( -+ value: datetime.datetime, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__f0d83d5dde352e12690bd34359b2272194b20ad0d4585d4cd235a62a68413cc7( -+ value: AllTypesEnum, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__8cddc5c03b0b87366a7bf274aedf92ced502b23fe811780c7f8c3da532cba3fc( -+ value: typing.Mapping[typing.Any, typing.Any], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__ce34799b1443789feb28cffe434f5bcbb9cb940065992aa75dbb30eb89cd78e6( -+ value: typing.Mapping[builtins.str, _scope_jsii_calc_lib_c61f082f.Number], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c8fb4d044e2e7432d7e661aafdb286ebf21dfe5a82b9908dee57945f6892a63e( -+ value: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__4e3dc199e54a9fbd40ceb20cecf887aa2aeca670e9ba223707466d9670eec9b9( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__4a9e87035008a2c1b649b911c8cfc02f2723230d8ced957948b2948c76caf61a( -+ value: typing.List[typing.Union[jsii.Number, _scope_jsii_calc_lib_c61f082f.NumericValue]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__62ebee42e1871545bc2e82cfb9c7fe43b5a607c8f662caff89dda0f0ed99a3df( -+ value: typing.Mapping[builtins.str, typing.Union[builtins.str, jsii.Number, _scope_jsii_calc_lib_c61f082f.Number]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c9be2756a18e8a40eb03cf55231201574f76abf02996a73d0d75fefd1393473d( -+ value: typing.Union[builtins.str, jsii.Number, _scope_jsii_calc_lib_c61f082f.Number, Multiply], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__e49729a44c21aef8c75584ff0991ddba3ee45184cacf816eb1a6a13b99e99ecc( -+ value: typing.List[typing.Any], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__f8de6b30de9bfa884f9de02e2abe57e9394fb7a387b5691f858b7b98817b1db7( -+ value: typing.Mapping[builtins.str, typing.Any], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__901c3574a81e006fdf36f73e34f66b34f65ada4bddcb11cd15a51d6e3d9b59e4( -+ value: typing.Any, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__705bed55c0dbc20a3a1bad9a21931270f0c285e5b3b276e13bca645ffa7ccb0f( -+ value: typing.Optional[StringEnum], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__99730dd857f01c8e93755d3e4f1e04f44efd2e63487e37db32f0fae8d36c618e( -+ _p1: builtins.str, -+ _p2: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__7f25304a2274ca1691dbe05a223f32126250948b15187c5095780e5c9af08c2a( -+ with_param: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__12f6979e6d88948e4aebfe8c25ed814c21d19b4b549d6bc2db4620794e706238( -+ _x: builtins.str, -+ _y: jsii.Number, -+ _z: builtins.bool, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__ca978ab380897c8607252c370202d45bc72e8b5cdc52549bb53b870299333d52( -+ _x: builtins.str, -+ _y: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__35fb7428c2ad70583f7b280c07cec184905b51e8e896efe6cc88eaf83a6f65c3( -+ scope_: Bell, -+ *, -+ scope: builtins.str, -+ props: typing.Optional[builtins.bool] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__49537950cbbeb6e2c62cb1b8a079cc9bb5cc6d06d95cf2229128539d2be886a3( -+ mult: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__408890be1949f7684db536e79081b85d00d72250ca9eb19c74db6ad226564784( -+ lhs: _scope_jsii_calc_lib_c61f082f.NumericValue, -+ rhs: _scope_jsii_calc_lib_c61f082f.NumericValue, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__67894f861ef38d2769b440d2fe71f549cb9e333247b385c5d6ae862b2eb04fc5( -+ value: typing.Any, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__106b87a3d0b194bda7cee057654f752c82d9a92a3775bcc3b2dc5cf7814ba84d( -+ value: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__b0e9a9c8546dd024e1568b2e6d11bd847e53548d624f33afffdffacc77fe01ef( -+ value: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c62707f1a80d6bc26c0b74205f8892c1777e6ed97359263df05628018d8ef6fc( -+ value: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c74abb191c66f86aed2c139ec3e50b0442b6d3bdcd41beb06db17c9b3c5d93d0( -+ value: _scope_jsii_calc_lib_c61f082f.NumericValue, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__1af5d9bb897bd9bfc2029e92d33fc306fc090e2d0a9bc0bd70fb01762e798fe6( -+ value: typing.Optional[jsii.Number], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__349b2a1dce95cb7ff4c5a7772d81772697767c5f4e7e5fd709847ff5e526c3c1( -+ value: typing.Optional[typing.Union[Add, Multiply, Power]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__21033948ed66f89716ed818c4cf9e5a38a9252e042231e1e8e1672356d403bef( -+ *, -+ initial_value: typing.Optional[jsii.Number] = None, -+ maximum_value: typing.Optional[jsii.Number] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__9e749834c2e46eee6370de7b60daabbff6e5c16febe9775b98a2b961b0d4e335( -+ union_property: typing.Sequence[typing.Mapping[builtins.str, typing.Union[typing.Union[StructA, typing.Dict[builtins.str, typing.Any]], typing.Union[StructB, typing.Dict[builtins.str, typing.Any]]]]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__80b80f78c4ac7fda46ac2aec7ab826a87bef3eaaba64661c90f346972800baf5( -+ value: typing.List[typing.Mapping[builtins.str, typing.Union[StructA, StructB]]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__7eb49cfb1282d7f1bd28096ff0407c0806693194f02f5c053936f99756a2a8fd( -+ map: typing.Mapping[builtins.str, builtins.str], -+ array: typing.Sequence[builtins.str], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__964903eb68623806c91fc9026cacfdc726cfbb287698530724c5a9938a7bb2ca( -+ value: typing.List[builtins.str], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__8dd7203701e4915203e4778820ee40fe6bdd6f0bb2855c200f375606277e06c8( -+ value: typing.Mapping[builtins.str, builtins.str], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c0c76fec28076841e36c26581c26385de1e984d96e91ea434a61c4bf36c9b4d9( -+ value: typing.List[builtins.str], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5461a3c7bb81040765e4ca2e9effb12cc7f5fb018e5e1b8b21501a3f9cd6a8b3( -+ value: typing.Mapping[builtins.str, builtins.str], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__11d94174b1d488125abef65967a384ceb599f4948eca6cb9be3d55e1979fb64f( -+ array: typing.Sequence[typing.Union[DummyObj, typing.Dict[builtins.str, typing.Any]]], -+ record: typing.Mapping[builtins.str, typing.Union[DummyObj, typing.Dict[builtins.str, typing.Any]]], -+ obj: typing.Mapping[builtins.str, typing.Union[DummyObj, typing.Dict[builtins.str, typing.Any]]], -+ *, -+ array_prop: typing.Sequence[typing.Union[DummyObj, typing.Dict[builtins.str, typing.Any]]], -+ obj_prop: typing.Mapping[builtins.str, typing.Union[DummyObj, typing.Dict[builtins.str, typing.Any]]], -+ record_prop: typing.Mapping[builtins.str, typing.Union[DummyObj, typing.Dict[builtins.str, typing.Any]]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c017a39e0da5d21f3a9acbfd00f6a5c84eb4cad306148504e7c835359d35537e( -+ int: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__7a756cab89b47a2ae4c08f36162482b60fdf963b8ba638917a63c5e110b4d33e( -+ assert_: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__3afbef7e05ef43a18b9260b86660c09b15be66fabeae128c9a9f99b729da7143( -+ value: IMutableObjectLiteral, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__0b8f0f729686dad01c8555a3b1bc47509e495bd18f1560ef045b558884b2a1fb( -+ union_property: typing.Sequence[typing.Union[typing.Mapping[builtins.str, typing.Union[typing.Union[StructA, typing.Dict[builtins.str, typing.Any]], typing.Union[StructB, typing.Dict[builtins.str, typing.Any]]]], typing.Sequence[typing.Union[typing.Union[StructA, typing.Dict[builtins.str, typing.Any]], typing.Union[StructB, typing.Dict[builtins.str, typing.Any]]]]]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__a8a15eb37393d5188c71779e29278367f7b3600c6dd48bdbcd502cdf510c3c15( -+ value: typing.List[typing.Union[typing.Mapping[builtins.str, typing.Union[StructA, StructB]], typing.List[typing.Union[StructA, StructB]]]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__ec229cc92e04670f4dca9546759b3b39ee813eb1aa18057135bb155d08971e6a( -+ value: typing.Optional[typing.Union[_scope_jsii_calc_lib_c61f082f.IFriendly, typing.List[typing.Union[_scope_jsii_calc_lib_c61f082f.IFriendly, AbstractClass]]]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__481b1113b85e6dc9d7ba31c3ef5654e3550abac1edef9204348ab0f9554f61c1( -+ *, -+ union_property: typing.Optional[typing.Union[_scope_jsii_calc_lib_c61f082f.IFriendly, typing.Sequence[typing.Union[_scope_jsii_calc_lib_c61f082f.IFriendly, AbstractClass]]]] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5676fcb3395f1db1a013537fa52220553e5e418c2a9d97aa2f9541c00ffe259e( -+ consumer: PartiallyInitializedThisConsumer, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5c5defc6d683ee91707f8b7770d8d2fb11d381b9c928d7e5d6e2c5c495395f38( -+ delegate: IStructReturningDelegate, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__1df814299f3f9720be108d84bdfd61bc591699a79a3c8ac6d450bfb0a9610278( -+ ringer: IBellRinger, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__2f08bd2d56e856071db5f777b63fe2577f9e96dbfcd91e4044d0eda2d26f9017( -+ ringer: IBellRinger, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__4a2b7f0a05298ddaec112cb088cc71cfa2856aaa1d8414a5157d581b6d5a7293( -+ ringer: IBellRinger, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__f751da3f5766ea4973eb2d89086565259f0a3cd626425a7eec723afd7b64f392( -+ ringer: IConcreteBellRinger, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__cca04fe4a4c41a0034087ab0c574d1d2f1d0427d87a806fc660446b6a7e5290a( -+ ringer: IBellRinger, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__7bde53b867de290d21a419baa46b8e833a0d394835a1ce2be3b429179b2ddce5( -+ ringer: IBellRinger, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__988e53d92b16fb4b7224c654f985a074cbfa7dd5f567df005b41522641ad92ac( -+ ringer: IBellRinger, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__1d786308546ae61deacb465c6f501fe7e0be028973494548b57e0480759ed460( -+ ringer: IConcreteBellRinger, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__83037a3f429b90a38d2d9532a347144030578d83f68817b1a5677ebcd1b38e12( -+ obj: IAnotherPublicInterface, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__139bf4e63e56bef32e364c5972e055de5cba153d49cc821740fba1d51f73ef70( -+ obj: INonInternalInterface, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__2be181b08e5a2c0e1e3f3a84732a423af31039117701d35431ee251d343ca9d5( -+ *, -+ array_prop: typing.Sequence[typing.Union[DummyObj, typing.Dict[builtins.str, typing.Any]]], -+ obj_prop: typing.Mapping[builtins.str, typing.Union[DummyObj, typing.Dict[builtins.str, typing.Any]]], -+ record_prop: typing.Mapping[builtins.str, typing.Union[DummyObj, typing.Dict[builtins.str, typing.Any]]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__dd941dcba8415b4b4dbb95bc3f55ac3404bdaf303822dfc7093fb615dc66b2cf( -+ data: typing.Mapping[builtins.str, typing.Any], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__9008dfc97234c0f2895caaa88d20a94de081c3cd97c38f9a012f13cdae75fbd6( -+ map: typing.Mapping[builtins.str, typing.Any], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__019e6ec86ae7ee325dc404a7025eaf0edcb164e166535a831bccf6658adfbb10( -+ arg1: typing.Optional[jsii.Number] = None, -+ arg2: typing.Optional[builtins.str] = None, -+ arg3: typing.Optional[datetime.datetime] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__f64945b01dd806fcd872f369983e1fa6b3db8811cb0682ac6adf88aebb0aabda( -+ readonly_string: builtins.str, -+ mutable_number: typing.Optional[jsii.Number] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__3aef3220b38be7daf4208453b1766d9eafb6a74bd51dfb351d21235a205afa34( -+ value: typing.Optional[jsii.Number], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__cdee1d6893b4921a8d7cf0a9c957a543b69f7a98eb3cedd7ece84871fc81c767( -+ *, -+ readonly_property: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c544311353634d5a2f08144f0c184afbcb700d8304b9f49deae99f19e1e7b0af( -+ *, -+ anumber: jsii.Number, -+ astring: builtins.str, -+ first_optional: typing.Optional[typing.Sequence[builtins.str]] = None, -+ another_required: datetime.datetime, -+ bool: builtins.bool, -+ non_primitive: DoubleTrouble, -+ another_optional: typing.Optional[typing.Mapping[builtins.str, _scope_jsii_calc_lib_c61f082f.NumericValue]] = None, -+ optional_any: typing.Any = None, -+ optional_array: typing.Optional[typing.Sequence[builtins.str]] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__865cdfdd094ca753189170221ee7d6a0e59c2c0bcfdeff3dc37bb87dd39515ca( -+ *, -+ hoisted_top: typing.Optional[builtins.str] = None, -+ left: typing.Optional[jsii.Number] = None, -+ right: typing.Optional[builtins.bool] = None, -+ bottom: typing.Optional[datetime.datetime] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__cfa52ba952c3d4a7e6df7fba3f619bf3ac14c52e829cce862a5fa495e45d0e70( -+ *, -+ base_level_property: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__354311bd3d60d2b3b4ea927d6a96bdf66aa6d1109c29bfcd96266051c7c30a5e( -+ *, -+ base_level_property: builtins.str, -+ first_mid_level_property: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__8074c5f38699399b9e6f8708c125bef5d7c89118c36ffcce8582d66cac2197da( -+ *, -+ base_level_property: builtins.str, -+ second_mid_level_property: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__9384691e88dd3ab7e55516762b2076445d94bd6d9348db1b93f79de9f4ae0ea1( -+ *, -+ base_level_property: builtins.str, -+ first_mid_level_property: builtins.str, -+ second_mid_level_property: builtins.str, -+ top_level_property: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5ae2124576c295a0c88fc75be0e57258f0f72e63c733e7493367b8558266510e( -+ new_value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__8ffaadb351f5c2c48a7368068d5c88e0c7836deefe0e13aa9fe53ac104052fd5( -+ _required_any: typing.Any, -+ _optional_any: typing.Any = None, -+ _optional_string: typing.Optional[builtins.str] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5af7b38b9b5c170ebd3e05c215e05f10e6843b03868850dad87a5a149b90e790( -+ optional: typing.Optional[builtins.str] = None, -+ *things: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__ae5d543014149876cec8b005abbb94c112981cccaf318870c7fe4e8353c2c675( -+ *, -+ example: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c0d457497f870b36d210f01af9890c6624684d1e53da833858e801c18baf9fbb( -+ value_store: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__4f40c12fae2ef2673f3f324c0c452f65c187c1b3e6552b86768465a2d20de051( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__9106fb2a86e944ce0c61537852ab2d310a8a53448c6946af051de0325a67fa1a( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__ad557fbd0532aa4220227645f5aae3e73ebae6b529cfe074430abf30d18cd5e9( -+ original_value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__a4026611d197b83d9a37b973ba97c69254e674921a7d89d0eb57ac41a19b636e( -+ new_value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__2a7f203302b2610301f1b36f34453db0f5572f2e02b0bc4c9933fd670e594222( -+ clock: IWallClock, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__a90d161fb7d47a195a192cf987ac6968fc2c6fbe27005bdd7684478a3d956e66( -+ word: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__b87cc89f87e9b1c180227625f3aba9395da5a8b258a88e605d466edb9004d709( -+ opts: typing.Union[EraseUndefinedHashValuesOptions, typing.Dict[builtins.str, typing.Any]], -+ key: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__d34e4f5dab670ec3ea298ec2cda50be32700f7f52dcef6a618ca9cb3706062ee( -+ *, -+ option1: typing.Optional[builtins.str] = None, -+ option2: typing.Optional[builtins.str] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__6a92c7223d00e7a0a2f0611cbb689671885b835bb26eedc8eb4a4d12e4ed5021( -+ readonly_string: builtins.str, -+ mutable_number: typing.Optional[jsii.Number] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__52559292c6e04ad49e53e443b1a4c56149833b8f12876d779bb8860fcb231b41( -+ value: typing.Optional[jsii.Number], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__b0c8f4c6eca5af7072a4a7c737950b39e75c61a56c505deb94edc5cd0995ed7d( -+ *, -+ readonly_property: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__dad018fa707514e8023df185b5e6e0a4b611bec563fe57abd9b81939b8833ebb( -+ success: builtins.bool, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__861a5ec03219f6c9fecd1b039faa2e53075227ff0d28f8eb66929909bc0c3096( -+ *, -+ boom: builtins.bool, -+ prop: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__82149b1f61aca58419f6ba4c74c8bb1c5c241433707e64ea4626937b294d8fe5( -+ readonly_string: builtins.str, -+ mutable_number: typing.Optional[jsii.Number] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__8380ec30b1f8773df7b5b27be8811be79b04f1d17c8eca83f83927eb56cdfd34( -+ value: typing.Optional[jsii.Number], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__8e8843a5fc914ec2c1e3baccdad526ea4d48eee37296f6812f3c0673ef86794f( -+ *, -+ readonly_property: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__3dce87825e36304d54521ce5524aa7e230fa5d505b0abbc79101fd9014f2cbd9( -+ *, -+ name: typing.Optional[builtins.str] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__d17f0544be961cba6cabfbb40f28c196963de107fcaef9c56d8227bdcb359431( -+ friendly: _scope_jsii_calc_lib_c61f082f.IFriendly, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__3eabfcad9a21b26024f4c1480ca127a3d6c6888067f0ae991d5922a49bfe81d4( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__d127476ce3b6e59ff9f375f547c1b6e1826d7a3969612c0605ebd0017d2b985d( -+ bell: IBell, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__2c34aaac5945bdc61c4f56492dee5608e1852940835d94d3e991fed377db66f2( -+ bell: Bell, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__e4d76200a6c5bdbdd51f208229da8bfd8f6f4c967af28e1e733579780e9d4a0e( -+ value: typing.Optional[jsii.Number], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__6e68d313f3254be7145220b211c66f45749aa8efc15aaf93d96330eb3cb7c6c7( -+ value: typing.Optional[jsii.Number], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__8199a83e86f8a4cf29ddc53d2b2151c37c7fa10d29562b454127376d1867d6da( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__a904d745cb9f037de717ed7a2b1d3a207493564662fdbe1d7c63e60a24f9bace( -+ value: typing.Optional[jsii.Number], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5568c72c746dd5221cb6fb7b741ed7a3346c346d7a30863c5abe3d99ada53098( -+ arg1: builtins.str, -+ arg2: typing.Optional[jsii.Number] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__858de6e8785f18ad264a158ca83a0fc1e0a6299efa9f77a0b31eaaffaa5b086c( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c571c6749392bc04e123a99b926edaf10b88be6b6d6b6a3937cae9893af5119e( -+ value: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__e0395944061fad9d5156b633dc20682ff9759ae0acb88df574b159f4919ab3a5( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__9d1e4198ba3f4e6b6a6f4ce0a4a185223ec216368c0c3304c69b029aba13ca49( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__6774e195ab25dab5790e1d187eb30be56997804d5186753a9928f2575f81977b( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__831f664cd567fd4e707fd175e9c9e13519f3ca587b792d7d5bc79f427589a802( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__254a58386276f7b7d5a41dddd674375b8942c2cad4deb6c2d24b55d240d14350( -+ value: typing.Optional[jsii.Number], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__10bb8b026d6c8368d479cf0da8b27c049c5f9088f173a63624e515dd36607439( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__2df4d055b033cdfdf7ad915b451ddc787ad68fb64b7e02386a9d8e591c1657af( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__b70592e4d080897239bf5f8b0de5b6b464cd9e888e39fca1082c04b5cbeca890( -+ *, -+ foo: _scope_jsii_calc_base_of_base_49fa37fe.Very, -+ bar: builtins.str, -+ goo: datetime.datetime, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__1d6e348a61ed27bfc8b7928365798b43e0130ca2b720c1105baca04fa093d194( -+ count: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__30ce308abdc1d2462c00bf7a4acc194ec05d61ddee24b2e79c674aa7034e5ffa( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__eef7c487e6f0c4d81dd633cf70121104ff8f3458fa52a418df64bcab9fe4bd3e( -+ value: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__a7654af9a241e67ad498c3eb33b98e6cdb1558487bb9b02dcce41f75334b76ad( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__43f45c49ecee3d08351b82aa5cdc3548d9dafa534cd2d99da8b5c5c9188e9a54( -+ value: typing.Any = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__ef705a05998260349d35c748c557e65cf539d53e136eb9191250080bdce852c3( -+ *, -+ value: builtins.bool, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__2a9e65060bf85c3d49b79ada1f9394ae146c380a4212c190065e031098d570b8( -+ *, -+ prop: typing.Union[LevelOne.PropBooleanValue, typing.Dict[builtins.str, typing.Any]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__479be5d5625f656c28cf12ffdc2cef9d6d74aae555551630f440fcb05351d261( -+ *, -+ prop: typing.Union[LevelOne.PropProperty, typing.Dict[builtins.str, typing.Any]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__b3d89a25beb0ebd10c196d941aa924197ae9a2def08f1f414c190a2a6d943d9c( -+ *, -+ container_port: typing.Optional[jsii.Number] = None, -+ cpu: typing.Optional[builtins.str] = None, -+ memory_mib: typing.Optional[builtins.str] = None, -+ public_load_balancer: typing.Optional[builtins.bool] = None, -+ public_tasks: typing.Optional[builtins.bool] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__7e73465ea858e34d4df8697d34f29a53ca3c3a41c47946382e5d49f498e3747d( -+ lhs: _scope_jsii_calc_lib_c61f082f.NumericValue, -+ rhs: _scope_jsii_calc_lib_c61f082f.NumericValue, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__04dae031a5097183ccda93eb91ec51a8a6fa1133134a6a398f1f05c581bc0091( -+ *, -+ number_prop: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__218107d38285901ff40e08163f0de0bac5d835bd64c21c0a735e8d72399ebe35( -+ _param1: builtins.str, -+ optional: typing.Any = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__a109cd8429db09172895a3eb04ca7e9d5c92129c7ca7a50f85fa89b6f6ab366b( -+ value: typing.Any = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__7102c29a709c4297fb88615c74a3e42a584364ac4ccba5c1db42a65e05184d1b( -+ value: typing.Optional[builtins.str], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__ae8d47cabe4d36f88c891d250d7e792432b0d153223789ec3687e714ba92a5f3( -+ *, -+ array_with_three_elements_and_undefined_as_second_argument: typing.Sequence[typing.Any], -+ this_should_be_undefined: typing.Any = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__3c1812783ba0b3b2146a3dd9609a6e12af404502ff5fbb9b9a9be49bf576122b( -+ generator: IRandomNumberGenerator, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__151b90e9765ce9a05ae13e568f4ba7c9e36e34c1cd991c5c1ee0249869fd4cce( -+ gen: IRandomNumberGenerator, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__0f5a1cc548d3db6e156cec5671bc04b980132e529c77f3bb5aaa58427db35e7c( -+ value: IRandomNumberGenerator, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__f5cb9f9511b0248cd4c0c4bec4eed9e75e7690012237fdb1b39b3f7b3bb0392e( -+ values: typing.Sequence[_scope_jsii_calc_lib_c61f082f.NumericValue], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__ca5199647728e53a1ec89d4fd7dad9aeb7239f8c1213c51b4e2eda734daa4cf4( -+ values: typing.Mapping[builtins.str, _scope_jsii_calc_lib_c61f082f.NumericValue], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__da93d15e57e6e2a1857cd7df156fb2a55ec91715c97323f20268def40f72137c( -+ delegate: IInterfaceWithOptionalMethodArguments, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5f6c5e5b55379123a8bd2bc457d9a5e9a0d34dd512b2bd2f59c6a5bec2a95f14( -+ arg1: jsii.Number, -+ arg2: builtins.str, -+ arg3: typing.Optional[datetime.datetime] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__26ecd0d4ea200acf388a8b91f17bfd3c09b6c7f8e0a84228b89c27ace672d0b1( -+ *, -+ field: typing.Optional[builtins.str] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__72ca8c3c148afe2b76dc14b63b8e2baf0bbf28802add3f88490cb5d3792825fb( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__ca8d417ddf787890441d6903718eebaf7fde3508b3466202724fdac3a17ba79b( -+ obj: IReturnsNumber, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__32a51b5d61d5ca58d33e8f6b9d9e1c4f16b39bf431a669250d4c290de0bbf46f( -+ builtins: builtins.str, -+ str: builtins.str, -+ *, -+ boolean_property: builtins.bool, -+ string_property: builtins.str, -+ struct_property: typing.Union[StructA, typing.Dict[builtins.str, typing.Any]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c93d69c5c8307eec2d1c6e8d5f9892234fbdd24bb5cce3f5ea1e210276bc58c1( -+ *, -+ boolean_property: builtins.bool, -+ string_property: builtins.str, -+ struct_property: typing.Union[StructA, typing.Dict[builtins.str, typing.Any]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__ae63c91319764cabd02536ac5b03026eb3f4071497b2a04adf93ca02985507ae( -+ scope: _scope_jsii_calc_lib_c61f082f.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__f6db465208dd616dc4f171643676a159b21fe5963ec9a3d1fd752e5cb291868d( -+ *, -+ foo: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__85c3ad65f24d8d5af99d7777a0379b793f45ac0e0e39714f279b8f2d58dbcfdb( -+ obj: ConstructorPassesThisOut, -+ dt: datetime.datetime, -+ ev: AllTypesEnum, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__edbbf85a7c4217635da7418d28aa61c4e11f7a0c1e9c960528ed4e7bee1ad541( -+ friendly: _scope_jsii_calc_lib_c61f082f.IFriendly, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__df4f41b4c003b9ba61f07f4d41a4059f167ea41c03ea29933966d2caeb831d8c( -+ base: _scope_jsii_calc_lib_c61f082f.NumericValue, -+ pow: _scope_jsii_calc_lib_c61f082f.NumericValue, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__235768085718ab33214221cff3145bb2a82c28916350f273995760a428a1aba3( -+ value: _scope_jsii_calc_lib_c61f082f.EnumFromScopedModule, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__100c679fa10c1938fc087475a1e5fcdf7c2cbff383b1c02b1d09471cb4f23123( -+ value: typing.Optional[_scope_jsii_calc_lib_c61f082f.EnumFromScopedModule], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__cf66d7b4f4a567aefacbafc24f61d33a942afde3d167676ed65ea82da95cd36e( -+ *, -+ string_prop: builtins.str, -+ nested_struct: typing.Optional[typing.Union[NestedStruct, typing.Dict[builtins.str, typing.Any]]] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__6db501e892de783af62ff728e59cc3155afc51ddc2dff77cce61ffe698e2e1f3( -+ arg1: typing.Optional[jsii.Number] = None, -+ arg2: typing.Optional[builtins.str] = None, -+ arg3: typing.Optional[datetime.datetime] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5978f09aaa3317742377437d5735571f672119325c2b5d69f26153bae6764c85( -+ arg: typing.Any = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c894904fd4904d7e110da91df846a8ec0970051a274bba5ad95c2b7dc1125cc2( -+ arg1: jsii.Number, -+ arg2: builtins.str, -+ arg3: typing.Optional[datetime.datetime] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__e7383b9a36a10b88815e6c310c7b13c611260f5ccb143b75dac114873643350d( -+ *, -+ deeper_required_prop: builtins.str, -+ deeper_optional_prop: typing.Optional[builtins.str] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__2ccde09a2986c421795069d44c46d9e2d7470609094b8b7177c6b154360f7435( -+ value: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__76cbdc0bba36d674ab013a40d091c1f3ccb139f10e78844ebc868bfa5d707ef8( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__1b795ca2a3052da38144d10d87f230e74bcfa497af1262580f53908be48f6710( -+ *, -+ property: builtins.str, -+ yet_anoter_one: builtins.bool, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__8c577a76d55e32f4b62a2a005d0c321bf9d0784b2f6cea5f10e297f3f79fc4bb( -+ readonly_string: builtins.str, -+ mutable_number: typing.Optional[jsii.Number] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__737be2f0376e64bd8c0980aee9fc6afd796bb4d0cb3415eab28d054f15881752( -+ value: typing.Optional[jsii.Number], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__4bbf1eebbce12768b1d2ef90968ffdbe749e42ce8bcdaf4c8750314d2160c5ea( -+ *, -+ readonly_property: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__cf00e16ec45ebcadc1f7003eb344ecf452096a12a1a76ff0e15fce1066d716d2( -+ value: builtins.bool, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__69df39c5fc3367bba974a46518d9122ce067721f56037ef6e1faedf479222822( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c4597464b7867e98bf0052f7808e080b75874d088aeac980865a4fc19e47a6d1( -+ name: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__748a4d0813e4a3ab750bd52215b9ff4dee315d39b160d47884780ea7c4b10daf( -+ value: Statics, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5d0ed37ae4b7f5bd294a768da342f4735c6636e0197883a5727e46ed81deec69( -+ value: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__aa3b9a5342b6fe1366fac3279219c5bae15389881ddd050c544c1d0001853482( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c9e4f6413d6ce49f4a289256d84d0fa97f7abac1877fc8d49f80f4a7d83a4972( -+ *, -+ required_string: builtins.str, -+ optional_number: typing.Optional[jsii.Number] = None, -+ optional_string: typing.Optional[builtins.str] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__4d335a3a7bbc35ed76509a5e85466d6d29221efebdd6dd4de639ef040628f332( -+ *, -+ required_string: builtins.str, -+ optional_boolean: typing.Optional[builtins.bool] = None, -+ optional_struct_a: typing.Optional[typing.Union[StructA, typing.Dict[builtins.str, typing.Any]]] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__7eb7b6caeb33bbd3740ca0fc027022df9d4fade4a7d1943a334f2869ab44bd98( -+ *, -+ scope: builtins.str, -+ props: typing.Optional[builtins.bool] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__e3587fc6359e7cd1adf0bb70ed66e1cd69faa462a530e07c8d25a96b942cb943( -+ _positional: jsii.Number, -+ *inputs: TopLevelStruct, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__b60fd8dad9496da93546e0555f2f8a7a34711e7160c06dc64a47f095f1539d02( -+ _positional: jsii.Number, -+ *, -+ required: builtins.str, -+ second_level: typing.Union[jsii.Number, typing.Union[SecondLevelStruct, typing.Dict[builtins.str, typing.Any]]], -+ optional: typing.Optional[builtins.str] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__1c22dd35a08877498e4c2c0ed61e220c19d83da3b6a1e278dfcb7af4d76d2df8( -+ struct: typing.Union[typing.Union[StructA, typing.Dict[builtins.str, typing.Any]], typing.Union[StructB, typing.Dict[builtins.str, typing.Any]]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__bfb5d0235b42940b9a17c7bb3182f454c7652fdb031f8993719a701d42833623( -+ struct: typing.Union[typing.Union[StructA, typing.Dict[builtins.str, typing.Any]], typing.Union[StructB, typing.Dict[builtins.str, typing.Any]]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__e3e3d0b072ef214d95806fb0366dd1f4a92b97932f845c9364616c9348bce502( -+ which: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__06173422e8b2a410ef992bee26115592516245e72f1a99397919d18bfebc1259( -+ *, -+ union_property: typing.Sequence[typing.Mapping[builtins.str, typing.Union[typing.Union[StructA, typing.Dict[builtins.str, typing.Any]], typing.Union[StructB, typing.Dict[builtins.str, typing.Any]]]]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__9fac60639e71eb35a422d891e6b571b3ba2118da50de35e8ba784bbb73928be9( -+ *, -+ foo: StringEnum, -+ bar: typing.Optional[AllTypesEnum] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__21b11cdfe2d95237cdddef417a67936ff8529ea3cef4bd7e80fe498f1e27527d( -+ *, -+ default: builtins.str, -+ assert_: typing.Optional[builtins.str] = None, -+ result: typing.Optional[builtins.str] = None, -+ that: typing.Optional[builtins.str] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__e2e14d04b1a68f16d9aef0965aa4ffbc51af3cbd2d201ac6e236d861b10c2fbf( -+ value: typing.List[_scope_jsii_calc_lib_c61f082f.NumericValue], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__11e78aa6557af36be636eea7a1a9b1d6ebf38d63d876b270de65a5f23152b605( -+ *, -+ bar: jsii.Number, -+ id: typing.Optional[builtins.str] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__46b91a4f1b85f01437aa8a6dda82c7c9e02f0b2ae5324f8c1591fa7ff74feaa0( -+ id_: jsii.Number, -+ *, -+ bar: jsii.Number, -+ id: typing.Optional[builtins.str] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__a961c6dee96c75a70470863d82c09136094c1d72d47aafe7f105c7733536dd4d( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__f3d4d3109122672e8fa17c64fb60787d84a098ee0ee0857d4a10ffe5345a1908( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__ba36c4cb32b9551fe1c3e91bd834b2e97f7ee93d0b5919acfb1c4fd3d6161295( -+ n: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__7118412729d7ec6272cded791897b09f12ee70e1ca550853121f98ceb30ee0e7( -+ value: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c361a6694d6564ff5c16af012cfaf94cac0a971928a1d0fb014c27f971287836( -+ value: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__d5d44f6e3395b0db421bab95a6dd7d1560538c63f136025c6b216ffb01eae179( -+ value: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__64c8c65ae76fcafb4b6d28e75f8fd31efad60ab9e71d11cbd5877c28c45d8f70( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__52ea95020be0094da769c873214a182768aa2de47b1c4c3dff43f1226edfe281( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__21d6ffe465a7e42c257c8318bf2bee38ecbc6b1959e6e945e769e365afb3e55d( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__74359fdf4e6a6505a1c0bc4c2c687826dde0a7696de75fc39f9ed57d89137f96( -+ *, -+ required: builtins.str, -+ second_level: typing.Union[jsii.Number, typing.Union[SecondLevelStruct, typing.Dict[builtins.str, typing.Any]]], -+ optional: typing.Optional[builtins.str] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__e31f878fe14747887a58683a15ca9c8ab54ec35cd6e3a665ad70dd53deadb573( -+ operand: _scope_jsii_calc_lib_c61f082f.NumericValue, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__223de5294ccc50da976adb8794cb8556981e31d63a2c8b249f7dfbd9e2d99eac( -+ *, -+ bar: typing.Union[builtins.str, jsii.Number, AllTypes], -+ foo: typing.Optional[typing.Union[builtins.str, jsii.Number]] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__aaaf822e80c6473bff9b1da58151a278cd846ae0614db9af97bc57ea6f899ce2( -+ delegate: typing.Mapping[builtins.str, typing.Any], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__73d1545891c65d400938add489402441cb083c61d214ad7a922b6417d3984732( -+ obj: IInterfaceWithProperties, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__60f3870a6dceb3773397b75ec3f3b664f38c2cc3d2f37dc055262663d12f41a8( -+ ext: IInterfaceWithPropertiesExtension, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__42edcb376aed0b6e6fec7d7df016bda9e3a31df0e47ecabb5465d1c84d16a414( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__6d238d6a2f6e464c570c3176db3d78d62e0be9908b705705c8f6d7b6b2385c54( -+ method: VariadicMethod, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__43f32dfb73f1a7fe9c86c00bbc381391db4812c13b5b72363ddcfcd57638c368( -+ *values: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__a33769c23320f9f6bce3e3a70c594135cf44ca5c9c6d1de1cae8cc62a99d49e9( -+ *prefix: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__1c18f2c7d91dcdc13843ff1637ed95a1f1c1ed99384d6276ee493b0ca579b4a4( -+ first: jsii.Number, -+ *others: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__f18ff2aa5c744d99cc2b37e705d6ed44823660f714c20539c148c9e34e123752( -+ *union: typing.Union[StructA, StructB], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__01944feab2feb5a9fdf3d356f62de139685f520d3bb3a38ddc5c42d0b03963fe( -+ value: typing.List[typing.Union[StructA, StructB]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5efa2ef42e261d5c38c59d5e216e587cb3005bbbb5b4a62e926087ee58478a36( -+ index: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__ca8f2360b0292d0b5329ac52818673aece7fb01cf2f09567e60ff65b7728c9cc( -+ index: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5bc99fd66b59152ee7799cf716c91bec428d7091eb33ece69057f9ca9b9fdb19( -+ count: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__58451fb4813d1aa8877a55de41f1ef8bd30300048337edb2bcf16985abbb6f45( -+ count: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__7ac4c09636b11fefb0a54fbd52b88fc2b4c5c356eb07189a0d2545601f3bef9c( -+ count: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__01fcbc911a24b1fa352275e1273526114db562d2c278b742181eba6e8cb11ad4( -+ private_field: typing.Optional[builtins.str] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__af1f574dee5c4eb581961518ccf32b4060094ed2f9b7e60bece1ed48e3fc45a1( -+ name: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__c0e59e6ea7e78215051bf4fe6b69de179aefb4116a344decdfaab4b6b15189b8( -+ lhs: _scope_jsii_calc_lib_c61f082f.NumericValue, -+ rhs: _scope_jsii_calc_lib_c61f082f.NumericValue, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__fa23831ecd0b539d7689616a0557240dc1a45f924fafe58c0d5f0ac464eecf94( -+ value: builtins.bool, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__84a0b7e93c52a4977e9726c1186b64f57ff35c59c5bc0e7250da1d3236e70208( -+ *, -+ foo: builtins.str, -+ bar: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__720d53a768711730e792d129fcff6272627608d1d3942f42e3010e61a3463b31( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5236e267a6763b672404dac13a3d5e50c03eb03d35fe2c18cbe7f649933301f1( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__1bd3b16d1aaf127e7610a230095bced32c4c3ef1cadc73f6b24c76b3ebffdd8e( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__4e685d8185af60a2f5c9bcffe812224568fe893228304e510b4d989f92c19b90( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__6499a25aa5ac6723e26c4c716dd2d62a1f9ecd75ae2a476d3213fa5fe8792a1d( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5da75e226d085b0daac7742a86525ea697c77a044896ce80d48677f5fadb2d57( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__538f9410afd2d028ca599a233896016121b326bd90d69693e949aff75d72caf3( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__ba8bf3471001981f03d1ad5b84a1b0a4a4d7d556c72734d25d96637a60ad2477( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__71399b17d07223b2b83f0d7b33d5172c49eb3d0cf3fe38d6059d4c9b7f471113( -+ read_only_string: builtins.str, -+ read_write_string: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__e308499c7b9268c91ee3dc9e4a9c975efdfaa0cd72bd877383c6c64e8f2768d0( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__148cd823b5de47723c8a76d0553f3ff6c880ba8ecec14b9a86bd89025a18f4d3( -+ property: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__e7aa949631662ae6f6ab2804e4a231fa264a1c879d86efa8267e53158c50e647( -+ operand: _scope_jsii_calc_lib_c61f082f.NumericValue, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__2f90423a63bd0fc04016022e622b4bf01d35f365e38b15153d0a4d6fa014ee5b( -+ id: jsii.Number, -+ default_bar: typing.Optional[jsii.Number] = None, -+ props: typing.Optional[typing.Union[SupportsNiceJavaBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None, -+ *rest: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/anonymous/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/anonymous/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/anonymous/__init__.py --runtime-type-checking -@@ -54,31 +54,58 @@ - @builtins.classmethod - def consume(cls, option: typing.Union[IOptionA, IOptionB]) -> builtins.str: - ''' - :param option: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__132536bffc9129421b4ae0a6539d0bbfdc1c52c3de007c4546d2f2626ba8c31e) -+ check_type(argname="argument option", value=option, expected_type=type_hints["option"]) - return typing.cast(builtins.str, jsii.sinvoke(cls, "consume", [option])) - - @jsii.member(jsii_name="privideAsAny") - @builtins.classmethod - def privide_as_any(cls, which: builtins.str) -> typing.Any: - ''' - :param which: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__d461fff988e22833dcf37c5193332d48b9e455d605f2a1e708ab0d111a1659c7) -+ check_type(argname="argument which", value=which, expected_type=type_hints["which"]) - return typing.cast(typing.Any, jsii.sinvoke(cls, "privideAsAny", [which])) - - @jsii.member(jsii_name="provide") - @builtins.classmethod - def provide(cls, which: builtins.str) -> typing.Union[IOptionA, IOptionB]: - ''' - :param which: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__f841b966136dfd090628b12290eedd178724cc8f332e05aba2b3a035f07dae50) -+ check_type(argname="argument which", value=which, expected_type=type_hints["which"]) - return typing.cast(typing.Union[IOptionA, IOptionB], jsii.sinvoke(cls, "provide", [which])) - - - __all__ = [ - "IOptionA", - "IOptionB", - "UseOptions", - ] - - publication.publish() -+ -+def _typecheckingstub__132536bffc9129421b4ae0a6539d0bbfdc1c52c3de007c4546d2f2626ba8c31e( -+ option: typing.Union[IOptionA, IOptionB], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__d461fff988e22833dcf37c5193332d48b9e455d605f2a1e708ab0d111a1659c7( -+ which: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__f841b966136dfd090628b12290eedd178724cc8f332e05aba2b3a035f07dae50( -+ which: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/cdk16625/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/cdk16625/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/cdk16625/__init__.py --runtime-type-checking -@@ -42,10 +42,13 @@ - def _unwrap(self, gen: _IRandomNumberGenerator_9643a8b9) -> jsii.Number: - '''Implement this functin to return \`\`gen.next()\`\`. It is extremely important that the \`\`donotimport\`\` submodule is NEVER explicitly loaded in the testing application (otherwise this test is void). - - :param gen: a VERY pseudo random number generator. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__92f621cedc18f68d281c38191023e89bba6348836db623bc5d780630324b992b) -+ check_type(argname="argument gen", value=gen, expected_type=type_hints["gen"]) - return typing.cast(jsii.Number, jsii.invoke(self, "unwrap", [gen])) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class - typing.cast(typing.Any, Cdk16625).__jsii_proxy_class__ = lambda : _Cdk16625Proxy - -@@ -57,5 +60,11 @@ - - publication.publish() - - # Loading modules to ensure their types are registered with the jsii runtime library - from . import donotimport -+ -+def _typecheckingstub__92f621cedc18f68d281c38191023e89bba6348836db623bc5d780630324b992b( -+ gen: _IRandomNumberGenerator_9643a8b9, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/cdk16625/donotimport/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/cdk16625/donotimport/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/cdk16625/donotimport/__init__.py --runtime-type-checking -@@ -31,10 +31,13 @@ - - def __init__(self, value: jsii.Number) -> None: - ''' - :param value: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__e2659669d69691129e05836f0722a48449fe2efe197706d9d59c10c141470a4b) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.create(self.__class__, self, [value]) - - @jsii.member(jsii_name="next") - def next(self) -> jsii.Number: - '''Not quite random, but it'll do. -@@ -47,5 +50,11 @@ - __all__ = [ - "UnimportedSubmoduleType", - ] - - publication.publish() -+ -+def _typecheckingstub__e2659669d69691129e05836f0722a48449fe2efe197706d9d59c10c141470a4b( -+ value: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/cdk22369/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/cdk22369/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/cdk22369/__init__.py --runtime-type-checking -@@ -31,10 +31,13 @@ - class AcceptsPathProps: - def __init__(self, *, source_path: builtins.str) -> None: - ''' - :param source_path: A path that doesn't exist. - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5a067c851774273f33badeac9c167720ebde25d4301ab096dec54b2e615dc8a4) -+ check_type(argname="argument source_path", value=source_path, expected_type=type_hints["source_path"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "source_path": source_path, - } - - @builtins.property -@@ -60,5 +63,12 @@ - "AcceptsPath", - "AcceptsPathProps", - ] - - publication.publish() -+ -+def _typecheckingstub__5a067c851774273f33badeac9c167720ebde25d4301ab096dec54b2e615dc8a4( -+ *, -+ source_path: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/composition/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/composition/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/composition/__init__.py --runtime-type-checking -@@ -52,30 +52,39 @@ - '''A set of postfixes to include in a decorated .toString().''' - return typing.cast(typing.List[builtins.str], jsii.get(self, "decorationPostfixes")) - - @decoration_postfixes.setter - def decoration_postfixes(self, value: typing.List[builtins.str]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__f546e09b5b6c86dfee3f946eff8913ea8feb763a4156fb8aad45ecc179c63e62) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "decorationPostfixes", value) - - @builtins.property - @jsii.member(jsii_name="decorationPrefixes") - def decoration_prefixes(self) -> typing.List[builtins.str]: - '''A set of prefixes to include in a decorated .toString().''' - return typing.cast(typing.List[builtins.str], jsii.get(self, "decorationPrefixes")) - - @decoration_prefixes.setter - def decoration_prefixes(self, value: typing.List[builtins.str]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__abce94053402e9d1fcf1605226fa2c285e1340ec8219cfd1061f917e876a9051) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "decorationPrefixes", value) - - @builtins.property - @jsii.member(jsii_name="stringStyle") - def string_style(self) -> "CompositeOperation.CompositionStringStyle": - '''The .toString() style.''' - return typing.cast("CompositeOperation.CompositionStringStyle", jsii.get(self, "stringStyle")) - - @string_style.setter - def string_style(self, value: "CompositeOperation.CompositionStringStyle") -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__9dbbc353e0ea03d68edfa3977eadeb5446b56a89ffb921cb8406ba9fca0805b0) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "stringStyle", value) - - @jsii.enum( - jsii_type="jsii-calc.composition.CompositeOperation.CompositionStringStyle" - ) -@@ -108,5 +117,23 @@ - __all__ = [ - "CompositeOperation", - ] - - publication.publish() -+ -+def _typecheckingstub__f546e09b5b6c86dfee3f946eff8913ea8feb763a4156fb8aad45ecc179c63e62( -+ value: typing.List[builtins.str], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__abce94053402e9d1fcf1605226fa2c285e1340ec8219cfd1061f917e876a9051( -+ value: typing.List[builtins.str], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__9dbbc353e0ea03d68edfa3977eadeb5446b56a89ffb921cb8406ba9fca0805b0( -+ value: CompositeOperation.CompositionStringStyle, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/derived_class_has_no_properties/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/derived_class_has_no_properties/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/derived_class_has_no_properties/__init__.py --runtime-type-checking -@@ -25,10 +25,13 @@ - def prop(self) -> builtins.str: - return typing.cast(builtins.str, jsii.get(self, "prop")) - - @prop.setter - def prop(self, value: builtins.str) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__4b95d284137921c7cbf29a9e3a15da0a5cf9dda87efad87aa9ed601662f00b2c) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "prop", value) - - - class Derived( - Base, -@@ -43,5 +46,11 @@ - "Base", - "Derived", - ] - - publication.publish() -+ -+def _typecheckingstub__4b95d284137921c7cbf29a9e3a15da0a5cf9dda87efad87aa9ed601662f00b2c( -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/homonymous_forward_references/bar/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/homonymous_forward_references/bar/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/homonymous_forward_references/bar/__init__.py --runtime-type-checking -@@ -46,10 +46,13 @@ - ''' - :param homonymous: - ''' - if isinstance(homonymous, dict): - homonymous = Homonymous(**homonymous) -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__a201923592702b83e439b8af921b7eae6f1b86b0eeeffb6c2b506d66a57d4c3a) -+ check_type(argname="argument homonymous", value=homonymous, expected_type=type_hints["homonymous"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "homonymous": homonymous, - } - - @builtins.property -@@ -78,10 +81,13 @@ - class Homonymous: - def __init__(self, *, numeric_property: jsii.Number) -> None: - ''' - :param numeric_property: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__b7814834f12f5cbacf39dd7bdb11da208ae4c429011eff511d21e10d621cf9d5) -+ check_type(argname="argument numeric_property", value=numeric_property, expected_type=type_hints["numeric_property"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "numeric_property": numeric_property, - } - - @builtins.property -@@ -107,5 +113,19 @@ - "ConsumerProps", - "Homonymous", - ] - - publication.publish() -+ -+def _typecheckingstub__a201923592702b83e439b8af921b7eae6f1b86b0eeeffb6c2b506d66a57d4c3a( -+ *, -+ homonymous: typing.Union[Homonymous, typing.Dict[builtins.str, typing.Any]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__b7814834f12f5cbacf39dd7bdb11da208ae4c429011eff511d21e10d621cf9d5( -+ *, -+ numeric_property: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/homonymous_forward_references/foo/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/homonymous_forward_references/foo/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/homonymous_forward_references/foo/__init__.py --runtime-type-checking -@@ -46,10 +46,13 @@ - ''' - :param homonymous: - ''' - if isinstance(homonymous, dict): - homonymous = Homonymous(**homonymous) -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__56bad81fb024ccb6a97af9b4edcb748a4d5e34e81491c4222bb761bc0e5890b6) -+ check_type(argname="argument homonymous", value=homonymous, expected_type=type_hints["homonymous"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "homonymous": homonymous, - } - - @builtins.property -@@ -78,10 +81,13 @@ - class Homonymous: - def __init__(self, *, string_property: builtins.str) -> None: - ''' - :param string_property: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__57e873ae26cc34d45d619900518aa9fbc9f512fa9ca964387f9bcd933e461123) -+ check_type(argname="argument string_property", value=string_property, expected_type=type_hints["string_property"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "string_property": string_property, - } - - @builtins.property -@@ -107,5 +113,19 @@ - "ConsumerProps", - "Homonymous", - ] - - publication.publish() -+ -+def _typecheckingstub__56bad81fb024ccb6a97af9b4edcb748a4d5e34e81491c4222bb761bc0e5890b6( -+ *, -+ homonymous: typing.Union[Homonymous, typing.Dict[builtins.str, typing.Any]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__57e873ae26cc34d45d619900518aa9fbc9f512fa9ca964387f9bcd933e461123( -+ *, -+ string_property: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/interface_in_namespace_includes_classes/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/interface_in_namespace_includes_classes/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/interface_in_namespace_includes_classes/__init__.py --runtime-type-checking -@@ -25,10 +25,13 @@ - def bar(self) -> typing.Optional[builtins.str]: - return typing.cast(typing.Optional[builtins.str], jsii.get(self, "bar")) - - @bar.setter - def bar(self, value: typing.Optional[builtins.str]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__3319085b675e83451882dd81f7704e88da2e392266f9d5188ecb22725f3f71bb) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "bar", value) - - - @jsii.data_type( - jsii_type="jsii-calc.InterfaceInNamespaceIncludesClasses.Hello", -@@ -38,10 +41,13 @@ - class Hello: - def __init__(self, *, foo: jsii.Number) -> None: - ''' - :param foo: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5c05b45db7e873d4164cc7295b5d2800ba4bed1813d4a2d57aad8cedb292186d) -+ check_type(argname="argument foo", value=foo, expected_type=type_hints["foo"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "foo": foo, - } - - @builtins.property -@@ -66,5 +72,18 @@ - "Foo", - "Hello", - ] - - publication.publish() -+ -+def _typecheckingstub__3319085b675e83451882dd81f7704e88da2e392266f9d5188ecb22725f3f71bb( -+ value: typing.Optional[builtins.str], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__5c05b45db7e873d4164cc7295b5d2800ba4bed1813d4a2d57aad8cedb292186d( -+ *, -+ foo: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/interface_in_namespace_only_interface/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/interface_in_namespace_only_interface/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/interface_in_namespace_only_interface/__init__.py --runtime-type-checking -@@ -21,10 +21,13 @@ - class Hello: - def __init__(self, *, foo: jsii.Number) -> None: - ''' - :param foo: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__cc86cfd2ea53d0ae81d6d80ed07db33f3ca7b140e37166ba1d572a8ed2a78d2c) -+ check_type(argname="argument foo", value=foo, expected_type=type_hints["foo"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "foo": foo, - } - - @builtins.property -@@ -48,5 +51,12 @@ - __all__ = [ - "Hello", - ] - - publication.publish() -+ -+def _typecheckingstub__cc86cfd2ea53d0ae81d6d80ed07db33f3ca7b140e37166ba1d572a8ed2a78d2c( -+ *, -+ foo: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/jsii3656/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/jsii3656/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/jsii3656/__init__.py --runtime-type-checking -@@ -27,10 +27,14 @@ - ) -> None: - ''' - :param name: - :param count: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__9754f0ac616c8a4339db020e52a796e65577c9909ed5e25d0c696417da04377c) -+ check_type(argname="argument name", value=name, expected_type=type_hints["name"]) -+ check_type(argname="argument count", value=count, expected_type=type_hints["count"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "name": name, - } - if count is not None: - self._values["count"] = count -@@ -69,10 +73,13 @@ - @builtins.classmethod - def call_abstract(cls, receiver: "OverrideMe") -> builtins.bool: - ''' - :param receiver: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__37c9a298f20a606212f074bd150ba5bc37e38a4cc1f9b2672facafd80734afc1) -+ check_type(argname="argument receiver", value=receiver, expected_type=type_hints["receiver"]) - return typing.cast(builtins.bool, jsii.sinvoke(cls, "callAbstract", [receiver])) - - @jsii.member(jsii_name="implementMe") - @abc.abstractmethod - def implement_me( -@@ -112,5 +119,19 @@ - "ImplementMeOpts", - "OverrideMe", - ] - - publication.publish() -+ -+def _typecheckingstub__9754f0ac616c8a4339db020e52a796e65577c9909ed5e25d0c696417da04377c( -+ *, -+ name: builtins.str, -+ count: typing.Optional[jsii.Number] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__37c9a298f20a606212f074bd150ba5bc37e38a4cc1f9b2672facafd80734afc1( -+ receiver: OverrideMe, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/module2530/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/module2530/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/module2530/__init__.py --runtime-type-checking -@@ -21,28 +21,55 @@ - - def __init__(self, _: jsii.Number) -> None: - ''' - :param _: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__d62f783e4108a6327009d506f8ae7f5aca2734de07314ffd120f24d3e918f697) -+ check_type(argname="argument _", value=_, expected_type=type_hints["_"]) - jsii.create(self.__class__, self, [_]) - - @jsii.member(jsii_name="bar") - @builtins.classmethod - def bar(cls, _: builtins.bool) -> None: - ''' - :param _: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__f35c91dda02ec538c4e5ee9182aaa01ba14f837c78951f48bb0abd1a866a4d5c) -+ check_type(argname="argument _", value=_, expected_type=type_hints["_"]) - return typing.cast(None, jsii.sinvoke(cls, "bar", [_])) - - @jsii.member(jsii_name="foo") - def foo(self, _: builtins.str) -> None: - ''' - :param _: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__dd74e61269fd21c6a0b0983199f27c5d4df8a4447ff77e770890f58f6c9b6969) -+ check_type(argname="argument _", value=_, expected_type=type_hints["_"]) - return typing.cast(None, jsii.invoke(self, "foo", [_])) - - - __all__ = [ - "MyClass", - ] - - publication.publish() -+ -+def _typecheckingstub__d62f783e4108a6327009d506f8ae7f5aca2734de07314ffd120f24d3e918f697( -+ _: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__f35c91dda02ec538c4e5ee9182aaa01ba14f837c78951f48bb0abd1a866a4d5c( -+ _: builtins.bool, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__dd74e61269fd21c6a0b0983199f27c5d4df8a4447ff77e770890f58f6c9b6969( -+ _: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/module2647/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/module2647/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/module2647/__init__.py --runtime-type-checking -@@ -31,10 +31,13 @@ - ''' - :param very: - - - :stability: deprecated - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__3b33906576528227344dbb0f079876c5dccd08a32f3dbaa0acdc3f444c5fe448) -+ check_type(argname="argument very", value=very, expected_type=type_hints["very"]) - jsii.create(self.__class__, self, [very]) - - @jsii.member(jsii_name="hello") - def hello(self) -> builtins.str: - '''Say hello!''' -@@ -48,5 +51,11 @@ - __all__ = [ - "ExtendAndImplement", - ] - - publication.publish() -+ -+def _typecheckingstub__3b33906576528227344dbb0f079876c5dccd08a32f3dbaa0acdc3f444c5fe448( -+ very: _scope_jsii_calc_base_of_base_49fa37fe.Very, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/module2689/methods/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/module2689/methods/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/module2689/methods/__init__.py --runtime-type-checking -@@ -29,23 +29,41 @@ - _bar: typing.Mapping[builtins.str, typing.Union[_scope_jsii_calc_base_734f0262.BaseProps, typing.Dict[builtins.str, typing.Any]]], - ) -> None: - ''' - :param _bar: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__cfbe1bc46497cbad551fc80c4d304742daa30493dee8c65b7119cafdeb06e9af) -+ check_type(argname="argument _bar", value=_bar, expected_type=type_hints["_bar"]) - return typing.cast(None, jsii.invoke(self, "bar", [_bar])) - - @jsii.member(jsii_name="foo") - def foo( - self, - _values: typing.Sequence[_scope_jsii_calc_lib_c61f082f.Number], - ) -> None: - ''' - :param _values: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__40045f17e26efacbabd3e103d903497e18761a611301d901fcdebc3cf8baaced) -+ check_type(argname="argument _values", value=_values, expected_type=type_hints["_values"]) - return typing.cast(None, jsii.invoke(self, "foo", [_values])) - - - __all__ = [ - "MyClass", - ] - - publication.publish() -+ -+def _typecheckingstub__cfbe1bc46497cbad551fc80c4d304742daa30493dee8c65b7119cafdeb06e9af( -+ _bar: typing.Mapping[builtins.str, typing.Union[_scope_jsii_calc_base_734f0262.BaseProps, typing.Dict[builtins.str, typing.Any]]], -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__40045f17e26efacbabd3e103d903497e18761a611301d901fcdebc3cf8baaced( -+ _values: typing.Sequence[_scope_jsii_calc_lib_c61f082f.Number], -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/module2689/structs/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/module2689/structs/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/module2689/structs/__init__.py --runtime-type-checking -@@ -30,10 +30,14 @@ - ) -> None: - ''' - :param base_map: - :param numbers: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__71fe496245d27f33a2ded522fdf47757e7fb41b578fd3ec479cd5b45534588fc) -+ check_type(argname="argument base_map", value=base_map, expected_type=type_hints["base_map"]) -+ check_type(argname="argument numbers", value=numbers, expected_type=type_hints["numbers"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "base_map": base_map, - "numbers": numbers, - } - -@@ -66,5 +70,13 @@ - __all__ = [ - "MyStruct", - ] - - publication.publish() -+ -+def _typecheckingstub__71fe496245d27f33a2ded522fdf47757e7fb41b578fd3ec479cd5b45534588fc( -+ *, -+ base_map: typing.Mapping[builtins.str, typing.Union[_scope_jsii_calc_base_734f0262.BaseProps, typing.Dict[builtins.str, typing.Any]]], -+ numbers: typing.Sequence[_scope_jsii_calc_lib_c61f082f.Number], -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/module2692/submodule1/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/module2692/submodule1/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/module2692/submodule1/__init__.py --runtime-type-checking -@@ -21,10 +21,13 @@ - class Bar: - def __init__(self, *, bar1: builtins.str) -> None: - ''' - :param bar1: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__6602c05b71ef2e77c650dd283c33ba4543f756dbbca5d1c31752ee29f836b1f5) -+ check_type(argname="argument bar1", value=bar1, expected_type=type_hints["bar1"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "bar1": bar1, - } - - @builtins.property -@@ -48,5 +51,12 @@ - __all__ = [ - "Bar", - ] - - publication.publish() -+ -+def _typecheckingstub__6602c05b71ef2e77c650dd283c33ba4543f756dbbca5d1c31752ee29f836b1f5( -+ *, -+ bar1: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/module2692/submodule2/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/module2692/submodule2/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/module2692/submodule2/__init__.py --runtime-type-checking -@@ -23,10 +23,13 @@ - class Bar: - def __init__(self, *, bar2: builtins.str) -> None: - ''' - :param bar2: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__d9a43a9ecad39319deef77fa38822e65c584450447849fb04c34b767a8c0881d) -+ check_type(argname="argument bar2", value=bar2, expected_type=type_hints["bar2"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "bar2": bar2, - } - - @builtins.property -@@ -63,10 +66,15 @@ - ''' - :param bar2: - :param bar1: - :param foo2: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__717272f96a16c5ea04b9406364f96f18d1c2b16b183b81ef7bae856ebd371a43) -+ check_type(argname="argument bar2", value=bar2, expected_type=type_hints["bar2"]) -+ check_type(argname="argument bar1", value=bar1, expected_type=type_hints["bar1"]) -+ check_type(argname="argument foo2", value=foo2, expected_type=type_hints["foo2"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "bar2": bar2, - "bar1": bar1, - "foo2": foo2, - } -@@ -105,5 +113,21 @@ - "Bar", - "Foo", - ] - - publication.publish() -+ -+def _typecheckingstub__d9a43a9ecad39319deef77fa38822e65c584450447849fb04c34b767a8c0881d( -+ *, -+ bar2: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__717272f96a16c5ea04b9406364f96f18d1c2b16b183b81ef7bae856ebd371a43( -+ *, -+ bar2: builtins.str, -+ bar1: builtins.str, -+ foo2: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/python_self/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/python_self/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/python_self/__init__.py --runtime-type-checking -@@ -19,17 +19,23 @@ - ): - def __init__(self_, self: builtins.str) -> None: - ''' - :param self: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__5cc662603963e69f50f446fe7bf40b3f3ccf17842ed59562f45f4eb63848155b) -+ check_type(argname="argument self", value=self, expected_type=type_hints["self"]) - jsii.create(self_.__class__, self_, [self]) - - @jsii.member(jsii_name="method") - def method(self_, self: jsii.Number) -> builtins.str: - ''' - :param self: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__7085240966e9682f4d0598c65f482b932ae1281420f2cead92f0036488d061d4) -+ check_type(argname="argument self", value=self, expected_type=type_hints["self"]) - return typing.cast(builtins.str, jsii.invoke(self_, "method", [self])) - - @builtins.property - @jsii.member(jsii_name="self") - def self(self) -> builtins.str: -@@ -70,10 +76,13 @@ - @jsii.member(jsii_name="method") - def method(self_, self: jsii.Number) -> builtins.str: - ''' - :param self: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__8e4a50df1f139ac6d917c0954b0b6346aeeb47f16abae33b345a5aa2aa02fc99) -+ check_type(argname="argument self", value=self, expected_type=type_hints["self"]) - return typing.cast(builtins.str, jsii.invoke(self_, "method", [self])) - - # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface - typing.cast(typing.Any, IInterfaceWithSelf).__jsii_proxy_class__ = lambda : _IInterfaceWithSelfProxy - -@@ -86,10 +95,13 @@ - class StructWithSelf: - def __init__(self_, *, self: builtins.str) -> None: - ''' - :param self: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__796022ef7b07de2b3997ff905b7451854b30a5e8e06145e4cc31e88f0ea8b0d0) -+ check_type(argname="argument self", value=self, expected_type=type_hints["self"]) - self_._values: typing.Dict[builtins.str, typing.Any] = { - "self": self, - } - - @builtins.property -@@ -116,5 +128,30 @@ - "IInterfaceWithSelf", - "StructWithSelf", - ] - - publication.publish() -+ -+def _typecheckingstub__5cc662603963e69f50f446fe7bf40b3f3ccf17842ed59562f45f4eb63848155b( -+ self: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__7085240966e9682f4d0598c65f482b932ae1281420f2cead92f0036488d061d4( -+ self: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__8e4a50df1f139ac6d917c0954b0b6346aeeb47f16abae33b345a5aa2aa02fc99( -+ self: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__796022ef7b07de2b3997ff905b7451854b30a5e8e06145e4cc31e88f0ea8b0d0( -+ *, -+ self: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/submodule/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/submodule/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/submodule/__init__.py --runtime-type-checking -@@ -39,10 +39,13 @@ - - :param foo: - - :see: https://github.com/aws/jsii/issues/2637 - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__a44c39bd2002b354344d30dcb1ae0e2dc7ef8f604c2d31c61616cbbfc6a6fc40) -+ check_type(argname="argument foo", value=foo, expected_type=type_hints["foo"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "foo": foo, - } - - @builtins.property -@@ -107,10 +110,13 @@ - def all_types(self) -> typing.Optional[_AllTypes_b08307c5]: - return typing.cast(typing.Optional[_AllTypes_b08307c5], jsii.get(self, "allTypes")) - - @all_types.setter - def all_types(self, value: typing.Optional[_AllTypes_b08307c5]) -> None: -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__bfa98c91ee81ff3f0ca8bdba51d8e53f57e5260e9d6071534e9caa5ba2ffaed1) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - jsii.set(self, "allTypes", value) - - - __all__ = [ - "Default", -@@ -130,5 +136,18 @@ - from . import child - from . import isolated - from . import nested_submodule - from . import param - from . import returnsparam -+ -+def _typecheckingstub__a44c39bd2002b354344d30dcb1ae0e2dc7ef8f604c2d31c61616cbbfc6a6fc40( -+ *, -+ foo: jsii.Number, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__bfa98c91ee81ff3f0ca8bdba51d8e53f57e5260e9d6071534e9caa5ba2ffaed1( -+ value: typing.Optional[_AllTypes_b08307c5], -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/submodule/back_references/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/submodule/back_references/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/submodule/back_references/__init__.py --runtime-type-checking -@@ -23,10 +23,13 @@ - class MyClassReference: - def __init__(self, *, reference: _MyClass_a2fdc0b6) -> None: - ''' - :param reference: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__e7f53d1efa418d6ee29ababd1c2660c1d3d9a5d3de3ad874b2d0cd7c6481139b) -+ check_type(argname="argument reference", value=reference, expected_type=type_hints["reference"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "reference": reference, - } - - @builtins.property -@@ -50,5 +53,12 @@ - __all__ = [ - "MyClassReference", - ] - - publication.publish() -+ -+def _typecheckingstub__e7f53d1efa418d6ee29ababd1c2660c1d3d9a5d3de3ad874b2d0cd7c6481139b( -+ *, -+ reference: _MyClass_a2fdc0b6, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/submodule/child/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/submodule/child/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/submodule/child/__init__.py --runtime-type-checking -@@ -73,10 +73,13 @@ - class SomeStruct: - def __init__(self, *, prop: SomeEnum) -> None: - ''' - :param prop: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__ce6e4bc4b6c503e757ba9e0640368ea37840d2ca58311e6ec8b98cdcda077f48) -+ check_type(argname="argument prop", value=prop, expected_type=type_hints["prop"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "prop": prop, - } - - @builtins.property -@@ -105,10 +108,13 @@ - class Structure: - def __init__(self, *, bool: builtins.bool) -> None: - ''' - :param bool: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__f4dc81f7243c5c317d71ab682231a51bf3c3a189d9be68c17b8d41246c0abef5) -+ check_type(argname="argument bool", value=bool, expected_type=type_hints["bool"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "bool": bool, - } - - @builtins.property -@@ -143,10 +149,14 @@ - ) -> None: - ''' - :param prop: - :param extra: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__b3b6b38208a14cadd94ba787e4091f753debb361ad5dd2ee9d037908f5677d8b) -+ check_type(argname="argument prop", value=prop, expected_type=type_hints["prop"]) -+ check_type(argname="argument extra", value=extra, expected_type=type_hints["extra"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "prop": prop, - } - if extra is not None: - self._values["extra"] = extra -@@ -184,5 +194,27 @@ - "SomeStruct", - "Structure", - ] - - publication.publish() -+ -+def _typecheckingstub__ce6e4bc4b6c503e757ba9e0640368ea37840d2ca58311e6ec8b98cdcda077f48( -+ *, -+ prop: SomeEnum, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__f4dc81f7243c5c317d71ab682231a51bf3c3a189d9be68c17b8d41246c0abef5( -+ *, -+ bool: builtins.bool, -+) -> None: -+ """Type checking stubs""" -+ pass -+ -+def _typecheckingstub__b3b6b38208a14cadd94ba787e4091f753debb361ad5dd2ee9d037908f5677d8b( -+ *, -+ prop: SomeEnum, -+ extra: typing.Optional[builtins.str] = None, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/submodule/param/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/submodule/param/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/submodule/param/__init__.py --runtime-type-checking -@@ -21,10 +21,13 @@ - class SpecialParameter: - def __init__(self, *, value: builtins.str) -> None: - ''' - :param value: - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__25c6f5775c01f503690c503a264eb256af186a94c0c65bd43d6a11942ff54b1c) -+ check_type(argname="argument value", value=value, expected_type=type_hints["value"]) - self._values: typing.Dict[builtins.str, typing.Any] = { - "value": value, - } - - @builtins.property -@@ -48,5 +51,12 @@ - __all__ = [ - "SpecialParameter", - ] - - publication.publish() -+ -+def _typecheckingstub__25c6f5775c01f503690c503a264eb256af186a94c0c65bd43d6a11942ff54b1c( -+ *, -+ value: builtins.str, -+) -> None: -+ """Type checking stubs""" -+ pass -`; - -exports[`Generated code for "jsii-calc": /python/src/jsii_calc/union/__init__.py.diff 1`] = ` ---- python/src/jsii_calc/union/__init__.py --no-runtime-type-checking -+++ python/src/jsii_calc/union/__init__.py --runtime-type-checking -@@ -23,10 +23,13 @@ - param: typing.Union["IResolvable", "Resolvable", _scope_jsii_calc_lib_c61f082f.IFriendly], - ) -> None: - ''' - :param param: - - ''' -+ if __debug__: -+ type_hints = typing.get_type_hints(_typecheckingstub__62dfa3c0a0a719fea295807df31fd40fd66b0e76cf44d9f742ffb421f8e4ca77) -+ check_type(argname="argument param", value=param, expected_type=type_hints["param"]) - return typing.cast(None, jsii.sinvoke(cls, "unionType", [param])) - - - @jsii.interface(jsii_type="jsii-calc.union.IResolvable") - class IResolvable(typing_extensions.Protocol): -@@ -58,5 +61,11 @@ - "IResolvable", - "Resolvable", - ] - - publication.publish() -+ -+def _typecheckingstub__62dfa3c0a0a719fea295807df31fd40fd66b0e76cf44d9f742ffb421f8e4ca77( -+ param: typing.Union[IResolvable, Resolvable, _scope_jsii_calc_lib_c61f082f.IFriendly], -+) -> None: -+ """Type checking stubs""" -+ pass -`;