From 1ff230d9f7bc969e888e418375e7858df2a14424 Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Mon, 30 Jan 2023 17:55:38 +0100 Subject: [PATCH 01/14] fix(rosetta): submodule-qualified names produce invalid Go, Java (#3928) Java and Go do not support transitive access to a submodule's items via a qualified reference and instead require a dedicated import to be emitted. This adds code to analyze use of imported symbols to detect when a namespace traversal occurs, to inject new imports & replace property access expressions as necessary. In order to facilitate this work, these extra elements were done: - Replaced if-tree in the dispatcher with a switch statement, making the dispatch a lot faster, and also a lot nice to run through in a debugger - Emit `var` instead of a type name for variable declarations with an initializer in C#, to reduce "invalid" code generated in cases where the type name needs some qualification that we are missing - A couple of bug fixes here and there as the tests discovered them Fixes #3551 --- > **Note**: > There are still some awkward issues with the rendered code, but those are significantly more difficult to tackle without profoundly refactoring `jsii-rosetta`... The current work is already chunky enough and I didn't want to make it worse. > - Some synthetic type references lack qualification (e.g: struct type names in Go & C#) > - There might still be edge cases where duplicated or unused imports are emitted > - Import paths (in Go) may not be computed correctly (this might not be too hard to address, though) --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 --- .../__snapshots__/target-dotnet.test.js.snap | 16 +- .../__snapshots__/target-go.test.js.snap | 14 +- packages/jsii-rosetta/jest.config.mjs | 1 + packages/jsii-rosetta/lib/languages/csharp.ts | 26 +- .../jsii-rosetta/lib/languages/default.ts | 10 +- packages/jsii-rosetta/lib/languages/go.ts | 102 +++++-- packages/jsii-rosetta/lib/languages/java.ts | 29 +- packages/jsii-rosetta/lib/languages/python.ts | 18 +- .../lib/languages/record-references.ts | 11 +- .../lib/languages/target-language.ts | 40 ++- .../jsii-rosetta/lib/languages/visualize.ts | 2 + packages/jsii-rosetta/lib/renderer.ts | 269 ++++++++---------- .../jsii-rosetta/lib/submodule-reference.ts | 187 ++++++++++++ packages/jsii-rosetta/lib/translate.ts | 20 +- .../jsii-rosetta/lib/typescript/imports.ts | 164 +++++++++-- packages/jsii-rosetta/package.json | 1 + .../test/commands/transliterate.test.ts | 2 +- .../jsii-rosetta/test/jsii-imports.test.ts | 6 +- .../translations/calls/shorthand_property.cs | 4 +- ...ucts_directly_if_type_info_is_available.go | 8 +- .../test/translations/expressions/await.cs | 2 +- .../backtick_string_w_o_substitutions.cs | 2 +- .../translations/expressions/computed_key.cs | 2 +- .../expressions/string_interpolation.cs | 4 +- .../expressions/string_literal.cs | 4 +- .../expressions/string_literal.go | 10 +- .../expressions/string_literal.java | 2 +- .../expressions/string_literal.py | 2 +- .../expressions/string_literal.ts | 2 +- .../expressions/struct_assignment.cs | 2 +- .../imports/selective_import.java | 6 +- .../translations/imports/submodule-import.cs | 15 + .../translations/imports/submodule-import.go | 23 ++ .../imports/submodule-import.java | 17 ++ .../translations/imports/submodule-import.py | 15 + .../translations/imports/submodule-import.ts | 15 + .../statements/statements_and_newlines.cs | 8 +- .../structs/infer_struct_from_union.go | 6 +- .../structs/optional_known_struct.go | 2 +- .../structs/struct_starting_with_i.go | 2 +- .../structs/var_new_class_known_struct.cs | 2 +- .../structs/var_new_class_known_struct.go | 2 +- 42 files changed, 796 insertions(+), 279 deletions(-) create mode 100644 packages/jsii-rosetta/lib/submodule-reference.ts create mode 100644 packages/jsii-rosetta/test/translations/imports/submodule-import.cs create mode 100644 packages/jsii-rosetta/test/translations/imports/submodule-import.go create mode 100644 packages/jsii-rosetta/test/translations/imports/submodule-import.java create mode 100644 packages/jsii-rosetta/test/translations/imports/submodule-import.py create mode 100644 packages/jsii-rosetta/test/translations/imports/submodule-import.ts 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 f161783572..38673b87a0 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: /// /// /// - /// Calculator calculator = new Calculator(); + /// var 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. /// /// - /// int x = 12 + 44; - /// string s1 = "string"; - /// string s2 = @"string + /// var x = 12 + 44; + /// var s1 = "string"; + /// var s2 = @"string /// with new newlines"; // see https://github.com/aws/jsii/issues/2569 - /// string s3 = @"string + /// var 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 023b06a4a9..83d963d183 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 @@ -3158,7 +3158,7 @@ calculator := calc.NewCalculator() Then call some operations: \`\`\`go -calculator.add(jsii.Number(10)) +calculator.Add(jsii.Number(10)) \`\`\` ## Code Samples @@ -8546,9 +8546,9 @@ import ( // // Example: // calculator := calc.NewCalculator() -// calculator.add(jsii.Number(5)) -// calculator.mul(jsii.Number(3)) -// fmt.Println(calculator.expression.value) +// calculator.Add(jsii.Number(5)) +// calculator.Mul(jsii.Number(3)) +// fmt.Println(calculator.expression.Value) // type Calculator interface { composition.CompositeOperation @@ -11110,7 +11110,9 @@ import ( // 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" +// s3 := \`string +// with +// new lines\` // type DocumentedClass interface { // Greet the indicated person. @@ -29665,7 +29667,7 @@ 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 -@@ -60,10 +60,13 @@ +@@ -62,10 +62,13 @@ d, ) } diff --git a/packages/jsii-rosetta/jest.config.mjs b/packages/jsii-rosetta/jest.config.mjs index 9637f6c9ad..2aebf0431f 100644 --- a/packages/jsii-rosetta/jest.config.mjs +++ b/packages/jsii-rosetta/jest.config.mjs @@ -4,4 +4,5 @@ import { default as defaultConfig, overriddenConfig } from '../../jest.config.mj export default overriddenConfig({ setupFiles: [createRequire(import.meta.url).resolve('./jestsetup.js')], testTimeout: process.env.CI === 'true' ? 30_000 : defaultConfig.testTimeout, + watchPathIgnorePatterns: ['(\\.d)?\\.tsx?$'], }); diff --git a/packages/jsii-rosetta/lib/languages/csharp.ts b/packages/jsii-rosetta/lib/languages/csharp.ts index acca98b23b..010903164e 100644 --- a/packages/jsii-rosetta/lib/languages/csharp.ts +++ b/packages/jsii-rosetta/lib/languages/csharp.ts @@ -140,7 +140,7 @@ export class CSharpVisitor extends DefaultVisitor { const namespace = fmap(importStatement.moduleSymbol, findDotnetName) ?? guessedNamespace; if (importStatement.imports.import === 'full') { - this.dropPropertyAccesses.add(importStatement.imports.alias); + this.dropPropertyAccesses.add(importStatement.imports.sourceName); this.alreadyImportedNamespaces.add(namespace); return new OTree([`using ${namespace};`], [], { canBreakLine: true }); } @@ -563,34 +563,34 @@ export class CSharpVisitor extends DefaultVisitor { } public variableDeclaration(node: ts.VariableDeclaration, renderer: CSharpRenderer): OTree { - let fallback = 'var'; - if (node.type) { - fallback = node.type.getText(); - } + let typeOrVar = 'var'; + const fallback = node.type?.getText() ?? 'var'; const type = - (node.type && renderer.typeOfType(node.type)) || + (node.type && renderer.typeOfType(node.type)) ?? (node.initializer && renderer.typeOfExpression(node.initializer)); - let renderedType = this.renderType(node, type, false, fallback, renderer); - if (renderedType === 'object') { - renderedType = 'var'; + const varType = this.renderType(node, type, false, fallback, renderer); + // If there is an initializer, and the value isn't "IDictionary<...", we always use var, as this is the + // recommendation from Roslyn. + if (varType !== 'object' && (varType.startsWith('IDictionary<') || node.initializer == null)) { + typeOrVar = varType; } if (!node.initializer) { - return new OTree([renderedType, ' ', renderer.convert(node.name), ';'], []); + return new OTree([typeOrVar, ' ', renderer.convert(node.name), ';']); } return new OTree( [ - renderedType, + typeOrVar, ' ', renderer.convert(node.name), ' = ', renderer.updateContext({ preferObjectLiteralAsStruct: false }).convert(node.initializer), ';', ], - [], + undefined, { canBreakLine: true }, ); } @@ -715,7 +715,7 @@ function findDotnetName(jsiiSymbol: JsiiSymbol): string | undefined { } } - return `${recurse(namespaceName(fqn))}.${simpleName(jsiiSymbol.fqn)}`; + return `${recurse(namespaceName(fqn))}.${ucFirst(simpleName(jsiiSymbol.fqn))}`; } } diff --git a/packages/jsii-rosetta/lib/languages/default.ts b/packages/jsii-rosetta/lib/languages/default.ts index 022475f563..15c989006f 100644 --- a/packages/jsii-rosetta/lib/languages/default.ts +++ b/packages/jsii-rosetta/lib/languages/default.ts @@ -4,8 +4,10 @@ import { analyzeObjectLiteral, ObjectLiteralStruct } from '../jsii/jsii-types'; import { isNamedLikeStruct, isJsiiProtocolType } from '../jsii/jsii-utils'; import { OTree, NO_SYNTAX } from '../o-tree'; import { AstRenderer, AstHandler, nimpl, CommentSyntax } from '../renderer'; +import { SubmoduleReference } from '../submodule-reference'; import { voidExpressionString } from '../typescript/ast-utils'; import { ImportStatement } from '../typescript/imports'; +import { inferredTypeOfExpression } from '../typescript/types'; import { TargetLanguage } from '.'; @@ -98,7 +100,11 @@ export abstract class DefaultVisitor implements AstHandler { return this.notImplemented(node, context); } - public propertyAccessExpression(node: ts.PropertyAccessExpression, context: AstRenderer): OTree { + public propertyAccessExpression( + node: ts.PropertyAccessExpression, + context: AstRenderer, + _submoduleReference: SubmoduleReference | undefined, + ): OTree { return new OTree([context.convert(node.expression), '.', context.convert(node.name)]); } @@ -169,7 +175,7 @@ export abstract class DefaultVisitor implements AstHandler { : false, ); - const inferredType = context.inferredTypeOfExpression(node); + const inferredType = inferredTypeOfExpression(context.typeChecker, node); if ((inferredType && isJsiiProtocolType(context.typeChecker, inferredType)) || anyMembersFunctions) { context.report( node, diff --git a/packages/jsii-rosetta/lib/languages/go.ts b/packages/jsii-rosetta/lib/languages/go.ts index 9fcb50632d..a012bd85a6 100644 --- a/packages/jsii-rosetta/lib/languages/go.ts +++ b/packages/jsii-rosetta/lib/languages/go.ts @@ -4,8 +4,10 @@ import { AssertionError } from 'assert'; import * as ts from 'typescript'; import { analyzeObjectLiteral, determineJsiiType, JsiiType, ObjectLiteralStruct } from '../jsii/jsii-types'; +import { lookupJsiiSymbolFromNode } from '../jsii/jsii-utils'; import { OTree } from '../o-tree'; import { AstRenderer } from '../renderer'; +import { SubmoduleReference } from '../submodule-reference'; import { isExported, isPublic, isPrivate, isReadOnly, isStatic } from '../typescript/ast-utils'; import { analyzeImportDeclaration, ImportStatement } from '../typescript/imports'; import { @@ -228,6 +230,15 @@ export class GoVisitor extends DefaultVisitor { className: ucFirst(expr.name.text), classNamespace: renderer.updateContext({ isExported: false }).convert(expr.expression), }; + } else if ( + ts.isPropertyAccessExpression(expr.expression) && + renderer.submoduleReferences.has(expr.expression) + ) { + const submodule = renderer.submoduleReferences.get(expr.expression)!; + return { + className: ucFirst(expr.name.text), + classNamespace: renderer.updateContext({ isExported: false }).convert(submodule.lastNode), + }; } renderer.reportUnsupported(expr.expression, TargetLanguage.GO); return { @@ -277,15 +288,17 @@ export class GoVisitor extends DefaultVisitor { ? JSON.stringify(node.name.text) : this.goName(node.name.text, renderer, renderer.typeChecker.getSymbolAtLocation(node.name)) : renderer.convert(node.name); - // Struct member values are always pointers... return new OTree( [ key, ': ', renderer .updateContext({ - wrapPtr: renderer.currentContext.isStruct || renderer.currentContext.inMapLiteral, + // Reset isExported, as this was intended for the key name translation... + isExported: undefined, + // Struct member values are always pointers... isPtr: renderer.currentContext.isStruct, + wrapPtr: renderer.currentContext.isStruct || renderer.currentContext.inMapLiteral, }) .convert(node.initializer), ], @@ -389,13 +402,18 @@ export class GoVisitor extends DefaultVisitor { structType: ObjectLiteralStruct, renderer: GoRenderer, ): OTree { + const isExported = structType.kind === 'struct'; return new OTree( [ '&', - this.goName(structType.type.symbol.name, renderer.updateContext({ isPtr: false }), structType.type.symbol), + this.goName( + structType.type.symbol.name, + renderer.updateContext({ isExported, isPtr: false }), + structType.type.symbol, + ), '{', ], - renderer.updateContext({ isStruct: true }).convertAll(node.properties), + renderer.updateContext({ isExported, isStruct: true }).convertAll(node.properties), { suffix: '}', separator: ',', @@ -444,16 +462,30 @@ export class GoVisitor extends DefaultVisitor { return new OTree(['fmt.Println(', renderedArgs, ')']); } - public propertyAccessExpression(node: ts.PropertyAccessExpression, renderer: GoRenderer): OTree { + public propertyAccessExpression( + node: ts.PropertyAccessExpression, + renderer: GoRenderer, + submoduleReference?: SubmoduleReference, + ): OTree { + if (submoduleReference != null) { + return new OTree([ + renderer + .updateContext({ isExported: false, isPtr: false, wrapPtr: false }) + .convert(submoduleReference.lastNode), + ]); + } + const expressionType = typeOfExpression(renderer.typeChecker, node.expression); const valueSymbol = renderer.typeChecker.getSymbolAtLocation(node.name); - const isClassStaticMember = + const isStaticMember = valueSymbol?.valueDeclaration != null && isStatic(valueSymbol.valueDeclaration); + const isClassStaticPropertyAccess = + isStaticMember && expressionType?.symbol?.valueDeclaration != null && ts.isClassDeclaration(expressionType.symbol.valueDeclaration) && - valueSymbol?.valueDeclaration != null && - ts.isPropertyDeclaration(valueSymbol.valueDeclaration) && - isStatic(valueSymbol.valueDeclaration); + (ts.isPropertyDeclaration(valueSymbol.valueDeclaration) || ts.isAccessor(valueSymbol.valueDeclaration)); + const isClassStaticMethodAccess = + isStaticMember && !isClassStaticPropertyAccess && ts.isMethodDeclaration(valueSymbol.valueDeclaration); // When the expression has an unknown type (unresolved symbol), and has an upper-case first // letter, we assume it's a type name... In such cases, what comes after can be considered a @@ -463,18 +495,32 @@ export class GoVisitor extends DefaultVisitor { expressionType.symbol == null && /(?:\.|^)[A-Z][^.]*$/.exec(node.expression.getText(node.expression.getSourceFile())) != null; - const isEnum = + // Whether the node is an enum member reference. + const isEnumMember = expressionType?.symbol?.valueDeclaration != null && ts.isEnumDeclaration(expressionType.symbol.valueDeclaration); - const delimiter = isEnum || isClassStaticMember || expressionLooksLikeTypeReference ? '_' : '.'; + const jsiiSymbol = lookupJsiiSymbolFromNode(renderer.typeChecker, node.name); + const isExportedTypeName = jsiiSymbol != null && jsiiSymbol.symbolType !== 'module'; + + const delimiter = + isEnumMember || isClassStaticPropertyAccess || isClassStaticMethodAccess || expressionLooksLikeTypeReference + ? '_' + : '.'; return new OTree([ renderer.convert(node.expression), delimiter, renderer - .updateContext({ isExported: isClassStaticMember || expressionLooksLikeTypeReference || isEnum }) + .updateContext({ + isExported: + isClassStaticPropertyAccess || + isClassStaticMethodAccess || + expressionLooksLikeTypeReference || + isEnumMember || + isExportedTypeName, + }) .convert(node.name), - ...(isClassStaticMember + ...(isClassStaticPropertyAccess ? ['()'] : // If the parent's not a call-like expression, and it's an inferred static property access, we need to put call // parentheses at the end, as static properties are accessed via synthetic readers. @@ -578,8 +624,13 @@ export class GoVisitor extends DefaultVisitor { return wrapPtrExpression(renderer.typeChecker, node, output); } - public stringLiteral(node: ts.StringLiteral, renderer: GoRenderer): OTree { - const text = JSON.stringify(node.text); + public stringLiteral(node: ts.StringLiteral | ts.NoSubstitutionTemplateLiteral, renderer: GoRenderer): OTree { + // Go supports backtick-delimited multi-line string literals, similar/same as JavaScript no-substitution templates. + // We only use this trick if the literal includes actual new line characters (otherwise it just looks weird in go). + const text = + ts.isNoSubstitutionTemplateLiteral(node) && /[\n\r]/m.test(node.text) + ? node.getText(node.getSourceFile()) + : JSON.stringify(node.text); return new OTree([`${renderer.currentContext.wrapPtr ? jsiiStr(text) : text}`]); } @@ -801,25 +852,30 @@ export class GoVisitor extends DefaultVisitor { public importStatement(node: ImportStatement, renderer: AstRenderer): OTree { const packageName = node.moduleSymbol?.sourceAssembly?.packageJson.jsii?.targets?.go?.packageName ?? - this.goName(node.packageName, renderer, undefined); + node.packageName + // Special case namespaced npm package names, so they are mangled the same way pacmak does. + .replace(/@([a-z0-9_-]+)\/([a-z0-9_-])/, '$1$2') + .split('/') + .map((txt) => this.goName(txt, renderer, undefined)) + .filter((txt) => txt !== '') + .join('/'); const moduleName = node.moduleSymbol?.sourceAssembly?.packageJson.jsii?.targets?.go?.moduleName ? `${node.moduleSymbol.sourceAssembly.packageJson.jsii.targets.go.moduleName}/${packageName}` : `github.com/aws-samples/dummy/${packageName}`; if (node.imports.import === 'full') { - return new OTree( - ['import ', this.goName(node.imports.alias, renderer, undefined), ' "', moduleName, '"'], - undefined, - { canBreakLine: true }, - ); + // We don't emit the alias if it matches the last path segment (conventionally this is the package name) + const maybeAlias = node.imports.alias ? `${this.goName(node.imports.alias, renderer, undefined)} ` : ''; + + return new OTree([`import ${maybeAlias}${JSON.stringify(moduleName)}`], undefined, { canBreakLine: true }); } if (node.imports.elements.length === 0) { // This is a blank import (for side-effects only) - return new OTree(['import _ "', moduleName, '"'], undefined, { canBreakLine: true }); + return new OTree([`import _ ${JSON.stringify(moduleName)}`], undefined, { canBreakLine: true }); } - return new OTree(['import "', moduleName, '"'], undefined, { canBreakLine: true }); + return new OTree([`import ${JSON.stringify(moduleName)}`], undefined, { canBreakLine: true }); } public variableDeclaration(node: ts.VariableDeclaration, renderer: AstRenderer): OTree { diff --git a/packages/jsii-rosetta/lib/languages/java.ts b/packages/jsii-rosetta/lib/languages/java.ts index 778735731c..bfd14bb0fb 100644 --- a/packages/jsii-rosetta/lib/languages/java.ts +++ b/packages/jsii-rosetta/lib/languages/java.ts @@ -6,6 +6,7 @@ import { jsiiTargetParameter } from '../jsii/packages'; import { TargetLanguage } from '../languages/target-language'; import { OTree, NO_SYNTAX } from '../o-tree'; import { AstRenderer } from '../renderer'; +import { SubmoduleReference } from '../submodule-reference'; import { isReadOnly, matchAst, nodeOfType, quoteStringLiteral, visibility } from '../typescript/ast-utils'; import { ImportStatement } from '../typescript/imports'; import { isEnumAccess, isStaticReadonlyAccess, determineReturnType } from '../typescript/types'; @@ -121,9 +122,8 @@ export class JavaVisitor extends DefaultVisitor { public importStatement(importStatement: ImportStatement): OTree { const guessedNamespace = guessJavaNamespaceName(importStatement.packageName); - if (importStatement.imports.import === 'full') { - this.dropPropertyAccesses.add(importStatement.imports.alias); + this.dropPropertyAccesses.add(importStatement.imports.sourceName); const namespace = fmap(importStatement.moduleSymbol, findJavaName) ?? guessedNamespace; return new OTree([`import ${namespace}.*;`], [], { canBreakLine: true }); @@ -132,7 +132,14 @@ export class JavaVisitor extends DefaultVisitor { const imports = importStatement.imports.elements.map((e) => { const fqn = fmap(e.importedSymbol, findJavaName) ?? `${guessedNamespace}.${e.sourceName}`; - return e.importedSymbol?.symbolType === 'module' ? `import ${fqn}.*;` : `import ${fqn};`; + // If there is no imported symbol, we check if there is anything looking like a type name in + // the source name (that is, any segment that starts with an upper case letter), and if none + // is found, assume this refers to a namespace/module. + return (e.importedSymbol?.symbolType == null && + !e.sourceName.split('.').some((segment) => /^[A-Z]/.test(segment))) || + e.importedSymbol?.symbolType === 'module' + ? `import ${fqn}.*;` + : `import ${fqn};`; }); const localNames = importStatement.imports.elements @@ -548,8 +555,17 @@ export class JavaVisitor extends DefaultVisitor { : this.singlePropertyInJavaScriptObjectLiteralToFluentSetters(node.name, node.name, renderer); } - public propertyAccessExpression(node: ts.PropertyAccessExpression, renderer: JavaRenderer): OTree { + public propertyAccessExpression( + node: ts.PropertyAccessExpression, + renderer: JavaRenderer, + submoduleRef: SubmoduleReference | undefined, + ): OTree { const rightHandSide = renderer.convert(node.name); + // If a submodule access, then just render the name, we emitted a * import of the expression segment already. + if (submoduleRef != null) { + return rightHandSide; + } + let parts: Array; const leftHandSide = renderer.textOf(node.expression); @@ -860,7 +876,10 @@ function findJavaName(jsiiSymbol: JsiiSymbol): string | undefined { } } - return `${recurse(namespaceName(fqn))}.${simpleName(jsiiSymbol.fqn)}`; + const ns = namespaceName(fqn); + const nsJavaName = recurse(ns); + const leaf = simpleName(fqn); + return `${nsJavaName}.${leaf}`; } } diff --git a/packages/jsii-rosetta/lib/languages/python.ts b/packages/jsii-rosetta/lib/languages/python.ts index c4e1c02579..a9b16a2269 100644 --- a/packages/jsii-rosetta/lib/languages/python.ts +++ b/packages/jsii-rosetta/lib/languages/python.ts @@ -15,6 +15,7 @@ import { jsiiTargetParameter } from '../jsii/packages'; import { TargetLanguage } from '../languages/target-language'; import { NO_SYNTAX, OTree, renderTree } from '../o-tree'; import { AstRenderer, nimpl, CommentSyntax } from '../renderer'; +import { SubmoduleReference } from '../submodule-reference'; import { matchAst, nodeOfType, @@ -168,12 +169,13 @@ export class PythonVisitor extends DefaultVisitor { if (node.imports.import === 'full') { const moduleName = fmap(node.moduleSymbol, findPythonName) ?? guessPythonPackageName(node.packageName); + const importName = node.imports.alias ?? node.imports.sourceName; this.addImport({ importedFqn: node.moduleSymbol?.fqn ?? node.packageName, - importName: node.imports.alias, + importName, }); - return new OTree([`import ${moduleName} as ${mangleIdentifier(node.imports.alias)}`], [], { + return new OTree([`import ${moduleName} as ${mangleIdentifier(importName)}`], [], { canBreakLine: true, }); } @@ -325,7 +327,11 @@ export class PythonVisitor extends DefaultVisitor { ); } - public propertyAccessExpression(node: ts.PropertyAccessExpression, context: PythonVisitorContext) { + public propertyAccessExpression( + node: ts.PropertyAccessExpression, + context: PythonVisitorContext, + submoduleReference: SubmoduleReference | undefined, + ) { const fullText = context.textOf(node); if (fullText in BUILTIN_FUNCTIONS) { return new OTree([BUILTIN_FUNCTIONS[fullText]]); @@ -339,7 +345,11 @@ export class PythonVisitor extends DefaultVisitor { return context.convert(node.name); } - return super.propertyAccessExpression(node, context); + if (submoduleReference != null) { + return context.convert(submoduleReference.lastNode); + } + + return super.propertyAccessExpression(node, context, submoduleReference); } public parameterDeclaration(node: ts.ParameterDeclaration, context: PythonVisitorContext): OTree { diff --git a/packages/jsii-rosetta/lib/languages/record-references.ts b/packages/jsii-rosetta/lib/languages/record-references.ts index d53750845c..801c470393 100644 --- a/packages/jsii-rosetta/lib/languages/record-references.ts +++ b/packages/jsii-rosetta/lib/languages/record-references.ts @@ -4,6 +4,7 @@ import { lookupJsiiSymbol } from '../jsii/jsii-utils'; import { TargetLanguage } from '../languages/target-language'; import { OTree, NO_SYNTAX } from '../o-tree'; import { AstRenderer } from '../renderer'; +import { SubmoduleReference } from '../submodule-reference'; import { Spans } from '../typescript/visible-spans'; import { DefaultVisitor } from './default'; @@ -18,7 +19,7 @@ type RecordReferencesRenderer = AstRenderer; export class RecordReferencesVisitor extends DefaultVisitor { public static readonly VERSION = '2'; - public readonly language = TargetLanguage.PYTHON; // Doesn't matter, but we need it to use the visitor infra :( + public readonly language = TargetLanguage.VISUALIZE; public readonly defaultContext = {}; private readonly references = new Set(); @@ -63,7 +64,11 @@ export class RecordReferencesVisitor extends DefaultVisitor { + public readonly language = TargetLanguage.VISUALIZE; public readonly defaultContext: void = undefined; public constructor(private readonly includeHandlerNames?: boolean) {} diff --git a/packages/jsii-rosetta/lib/renderer.ts b/packages/jsii-rosetta/lib/renderer.ts index 42e6075dc6..137cd4fefb 100644 --- a/packages/jsii-rosetta/lib/renderer.ts +++ b/packages/jsii-rosetta/lib/renderer.ts @@ -2,6 +2,7 @@ import * as ts from 'typescript'; import { TargetLanguage } from './languages'; import { NO_SYNTAX, OTree, UnknownSyntax, Span } from './o-tree'; +import { SubmoduleReference, SubmoduleReferenceMap } from './submodule-reference'; import { commentRangeFromTextRange, extractMaskingVoidExpression, @@ -30,6 +31,7 @@ export class AstRenderer { public readonly typeChecker: ts.TypeChecker, private readonly handler: AstHandler, private readonly options: AstRendererOptions = {}, + public readonly submoduleReferences: SubmoduleReferenceMap = new Map(), ) { this.currentContext = handler.defaultContext; } @@ -236,155 +238,122 @@ export class AstRenderer { * Dispatch node to handler */ private dispatch(tree: ts.Node): OTree { - // Special nodes - if (ts.isEmptyStatement(tree)) { - // Additional semicolon where it doesn't belong. - return NO_SYNTAX; - } - const visitor = this.handler; - // Nodes with meaning - if (ts.isSourceFile(tree)) { - return visitor.sourceFile(tree, this); - } - if (ts.isImportEqualsDeclaration(tree)) { - return visitor.importStatement(analyzeImportEquals(tree, this), this); - } - if (ts.isImportDeclaration(tree)) { - return visitor.importStatement(analyzeImportDeclaration(tree, this), this); - } - if (ts.isStringLiteral(tree) || ts.isNoSubstitutionTemplateLiteral(tree)) { - return visitor.stringLiteral(tree, this); - } - if (ts.isNumericLiteral(tree)) { - return visitor.numericLiteral(tree, this); - } - if (ts.isFunctionDeclaration(tree)) { - return visitor.functionDeclaration(tree, this); - } - if (ts.isIdentifier(tree)) { - return visitor.identifier(tree, this); - } - if (ts.isBlock(tree)) { - return visitor.block(tree, this); - } - if (ts.isParameter(tree)) { - return visitor.parameterDeclaration(tree, this); - } - if (ts.isReturnStatement(tree)) { - return visitor.returnStatement(tree, this); - } - if (ts.isBinaryExpression(tree)) { - return visitor.binaryExpression(tree, this); - } - if (ts.isIfStatement(tree)) { - return visitor.ifStatement(tree, this); - } - if (ts.isPropertyAccessExpression(tree)) { - return visitor.propertyAccessExpression(tree, this); - } - if (ts.isAwaitExpression(tree)) { - return visitor.awaitExpression(tree, this); - } - if (ts.isCallExpression(tree)) { - return visitor.callExpression(tree, this); - } - if (ts.isExpressionStatement(tree)) { - return visitor.expressionStatement(tree, this); - } - if (ts.isToken(tree)) { - return visitor.token(tree, this); - } - if (ts.isObjectLiteralExpression(tree)) { - return visitor.objectLiteralExpression(tree, this); - } - if (ts.isNewExpression(tree)) { - return visitor.newExpression(tree, this); - } - if (ts.isPropertyAssignment(tree)) { - return visitor.propertyAssignment(tree, this); - } - if (ts.isVariableStatement(tree)) { - return visitor.variableStatement(tree, this); - } - if (ts.isVariableDeclarationList(tree)) { - return visitor.variableDeclarationList(tree, this); - } - if (ts.isVariableDeclaration(tree)) { - return visitor.variableDeclaration(tree, this); + // Using a switch on tree.kind + forced down-casting, because this is significantly faster than + // doing a cascade of `if` statements with the `ts.is` functions, since `tree.kind` is + // effectively integers, and this switch statement is hence optimizable to a jump table. This is + // a VERY significant enhancement to the debugging experience, too. + switch (tree.kind) { + case ts.SyntaxKind.EmptyStatement: + // Additional semicolon where it doesn't belong. + return NO_SYNTAX; + case ts.SyntaxKind.SourceFile: + return visitor.sourceFile(tree as ts.SourceFile, this); + case ts.SyntaxKind.ImportEqualsDeclaration: + return visitor.importStatement(analyzeImportEquals(tree as ts.ImportEqualsDeclaration, this), this); + case ts.SyntaxKind.ImportDeclaration: + return new OTree( + [], + analyzeImportDeclaration(tree as ts.ImportDeclaration, this, this.submoduleReferences).map((import_) => + visitor.importStatement(import_, this), + ), + { canBreakLine: true, separator: '\n' }, + ); + case ts.SyntaxKind.StringLiteral: + case ts.SyntaxKind.NoSubstitutionTemplateLiteral: + return visitor.stringLiteral(tree as ts.StringLiteral | ts.NoSubstitutionTemplateLiteral, this); + case ts.SyntaxKind.NumericLiteral: + return visitor.numericLiteral(tree as ts.NumericLiteral, this); + case ts.SyntaxKind.FunctionDeclaration: + return visitor.functionDeclaration(tree as ts.FunctionDeclaration, this); + case ts.SyntaxKind.Identifier: + return visitor.identifier(tree as ts.Identifier, this); + case ts.SyntaxKind.Block: + return visitor.block(tree as ts.Block, this); + case ts.SyntaxKind.Parameter: + return visitor.parameterDeclaration(tree as ts.ParameterDeclaration, this); + case ts.SyntaxKind.ReturnStatement: + return visitor.returnStatement(tree as ts.ReturnStatement, this); + case ts.SyntaxKind.BinaryExpression: + return visitor.binaryExpression(tree as ts.BinaryExpression, this); + case ts.SyntaxKind.IfStatement: + return visitor.ifStatement(tree as ts.IfStatement, this); + case ts.SyntaxKind.PropertyAccessExpression: + const submoduleReference = this.submoduleReferences?.get(tree as ts.PropertyAccessExpression); + return visitor.propertyAccessExpression(tree as ts.PropertyAccessExpression, this, submoduleReference); + case ts.SyntaxKind.AwaitExpression: + return visitor.awaitExpression(tree as ts.AwaitExpression, this); + case ts.SyntaxKind.CallExpression: + return visitor.callExpression(tree as ts.CallExpression, this); + case ts.SyntaxKind.ExpressionStatement: + return visitor.expressionStatement(tree as ts.ExpressionStatement, this); + case ts.SyntaxKind.ObjectLiteralExpression: + return visitor.objectLiteralExpression(tree as ts.ObjectLiteralExpression, this); + case ts.SyntaxKind.NewExpression: + return visitor.newExpression(tree as ts.NewExpression, this); + case ts.SyntaxKind.PropertyAssignment: + return visitor.propertyAssignment(tree as ts.PropertyAssignment, this); + case ts.SyntaxKind.VariableStatement: + return visitor.variableStatement(tree as ts.VariableStatement, this); + case ts.SyntaxKind.VariableDeclarationList: + return visitor.variableDeclarationList(tree as ts.VariableDeclarationList, this); + case ts.SyntaxKind.VariableDeclaration: + return visitor.variableDeclaration(tree as ts.VariableDeclaration, this); + case ts.SyntaxKind.ArrayLiteralExpression: + return visitor.arrayLiteralExpression(tree as ts.ArrayLiteralExpression, this); + case ts.SyntaxKind.ShorthandPropertyAssignment: + return visitor.shorthandPropertyAssignment(tree as ts.ShorthandPropertyAssignment, this); + case ts.SyntaxKind.ForOfStatement: + return visitor.forOfStatement(tree as ts.ForOfStatement, this); + case ts.SyntaxKind.ClassDeclaration: + return visitor.classDeclaration(tree as ts.ClassDeclaration, this); + case ts.SyntaxKind.Constructor: + return visitor.constructorDeclaration(tree as ts.ConstructorDeclaration, this); + case ts.SyntaxKind.PropertyDeclaration: + return visitor.propertyDeclaration(tree as ts.PropertyDeclaration, this); + case ts.SyntaxKind.ComputedPropertyName: + return visitor.computedPropertyName((tree as ts.ComputedPropertyName).expression, this); + case ts.SyntaxKind.MethodDeclaration: + return visitor.methodDeclaration(tree as ts.MethodDeclaration, this); + case ts.SyntaxKind.InterfaceDeclaration: + return visitor.interfaceDeclaration(tree as ts.InterfaceDeclaration, this); + case ts.SyntaxKind.PropertySignature: + return visitor.propertySignature(tree as ts.PropertySignature, this); + case ts.SyntaxKind.MethodSignature: + return visitor.methodSignature(tree as ts.MethodSignature, this); + case ts.SyntaxKind.AsExpression: + return visitor.asExpression(tree as ts.AsExpression, this); + case ts.SyntaxKind.PrefixUnaryExpression: + return visitor.prefixUnaryExpression(tree as ts.PrefixUnaryExpression, this); + case ts.SyntaxKind.SpreadAssignment: + if (this.textOf(tree) === '...') { + return visitor.ellipsis(tree as ts.SpreadAssignment, this); + } + return visitor.spreadAssignment(tree as ts.SpreadAssignment, this); + case ts.SyntaxKind.SpreadElement: + if (this.textOf(tree) === '...') { + return visitor.ellipsis(tree as ts.SpreadElement, this); + } + return visitor.spreadElement(tree as ts.SpreadElement, this); + case ts.SyntaxKind.ElementAccessExpression: + return visitor.elementAccessExpression(tree as ts.ElementAccessExpression, this); + case ts.SyntaxKind.TemplateExpression: + return visitor.templateExpression(tree as ts.TemplateExpression, this); + case ts.SyntaxKind.NonNullExpression: + return visitor.nonNullExpression(tree as ts.NonNullExpression, this); + case ts.SyntaxKind.ParenthesizedExpression: + return visitor.parenthesizedExpression(tree as ts.ParenthesizedExpression, this); + case ts.SyntaxKind.VoidExpression: + return visitor.maskingVoidExpression(tree as ts.VoidExpression, this); + case ts.SyntaxKind.JSDocComment: + return visitor.jsDoc(tree as ts.JSDoc, this); + default: + if (ts.isToken(tree)) { + return visitor.token(tree, this); + } + this.reportUnsupported(tree, undefined); } - if (ts.isJSDoc(tree)) { - return visitor.jsDoc(tree, this); - } - if (ts.isArrayLiteralExpression(tree)) { - return visitor.arrayLiteralExpression(tree, this); - } - if (ts.isShorthandPropertyAssignment(tree)) { - return visitor.shorthandPropertyAssignment(tree, this); - } - if (ts.isForOfStatement(tree)) { - return visitor.forOfStatement(tree, this); - } - if (ts.isClassDeclaration(tree)) { - return visitor.classDeclaration(tree, this); - } - if (ts.isConstructorDeclaration(tree)) { - return visitor.constructorDeclaration(tree, this); - } - if (ts.isPropertyDeclaration(tree)) { - return visitor.propertyDeclaration(tree, this); - } - if (ts.isComputedPropertyName(tree)) { - return visitor.computedPropertyName(tree.expression, this); - } - if (ts.isMethodDeclaration(tree)) { - return visitor.methodDeclaration(tree, this); - } - if (ts.isInterfaceDeclaration(tree)) { - return visitor.interfaceDeclaration(tree, this); - } - if (ts.isPropertySignature(tree)) { - return visitor.propertySignature(tree, this); - } - if (ts.isMethodSignature(tree)) { - return visitor.methodSignature(tree, this); - } - if (ts.isAsExpression(tree)) { - return visitor.asExpression(tree, this); - } - if (ts.isPrefixUnaryExpression(tree)) { - return visitor.prefixUnaryExpression(tree, this); - } - if (ts.isSpreadAssignment(tree)) { - if (this.textOf(tree) === '...') { - return visitor.ellipsis(tree, this); - } - return visitor.spreadAssignment(tree, this); - } - if (ts.isSpreadElement(tree)) { - if (this.textOf(tree) === '...') { - return visitor.ellipsis(tree, this); - } - return visitor.spreadElement(tree, this); - } - if (ts.isElementAccessExpression(tree)) { - return visitor.elementAccessExpression(tree, this); - } - if (ts.isTemplateExpression(tree)) { - return visitor.templateExpression(tree, this); - } - if (ts.isNonNullExpression(tree)) { - return visitor.nonNullExpression(tree, this); - } - if (ts.isParenthesizedExpression(tree)) { - return visitor.parenthesizedExpression(tree, this); - } - if (ts.isVoidExpression(tree)) { - return visitor.maskingVoidExpression(tree, this); - } - - this.reportUnsupported(tree, undefined); if (this.options.bestEffort !== false) { // When doing best-effort conversion and we don't understand the node type, just return the complete text of it as-is @@ -457,6 +426,8 @@ export class AstRenderer { * of AST node. */ export interface AstHandler { + readonly language: TargetLanguage; + readonly defaultContext: C; readonly indentChar?: ' ' | '\t'; mergeContext(old: C, update: Partial): C; @@ -473,7 +444,11 @@ export interface AstHandler { returnStatement(node: ts.ReturnStatement, context: AstRenderer): OTree; binaryExpression(node: ts.BinaryExpression, context: AstRenderer): OTree; ifStatement(node: ts.IfStatement, context: AstRenderer): OTree; - propertyAccessExpression(node: ts.PropertyAccessExpression, context: AstRenderer): OTree; + propertyAccessExpression( + node: ts.PropertyAccessExpression, + context: AstRenderer, + submoduleReference: SubmoduleReference | undefined, + ): OTree; awaitExpression(node: ts.AwaitExpression, context: AstRenderer): OTree; callExpression(node: ts.CallExpression, context: AstRenderer): OTree; expressionStatement(node: ts.ExpressionStatement, context: AstRenderer): OTree; diff --git a/packages/jsii-rosetta/lib/submodule-reference.ts b/packages/jsii-rosetta/lib/submodule-reference.ts new file mode 100644 index 0000000000..9ce5203a4d --- /dev/null +++ b/packages/jsii-rosetta/lib/submodule-reference.ts @@ -0,0 +1,187 @@ +import * as ts from 'typescript'; + +export type SubmoduleReferenceMap = ReadonlyMap< + ts.PropertyAccessExpression | ts.LeftHandSideExpression | ts.Identifier | ts.PrivateIdentifier, + SubmoduleReference +>; + +export class SubmoduleReference { + public static inSourceFile(sourceFile: ts.SourceFile, typeChecker: ts.TypeChecker): SubmoduleReferenceMap { + const importDeclarations = sourceFile.statements + .filter((stmt) => ts.isImportDeclaration(stmt)) + .flatMap((stmt) => importedSymbolsFrom(stmt as ts.ImportDeclaration, sourceFile, typeChecker)); + + return SubmoduleReference.inNode(sourceFile, typeChecker, new Set(importDeclarations)); + } + + private static inNode( + node: ts.Node, + typeChecker: ts.TypeChecker, + importDeclarations: ReadonlySet, + map = new Map< + ts.PropertyAccessExpression | ts.LeftHandSideExpression | ts.Identifier | ts.PrivateIdentifier, + SubmoduleReference + >(), + ): Map< + ts.PropertyAccessExpression | ts.LeftHandSideExpression | ts.Identifier | ts.PrivateIdentifier, + SubmoduleReference + > { + if (ts.isPropertyAccessExpression(node)) { + const [head, ...tail] = propertyPath(node); + const symbol = typeChecker.getSymbolAtLocation(head.name); + if (symbol && importDeclarations.has(symbol)) { + // This is a reference within an imported namespace, so we need to record that... + const firstNonNamespace = tail.findIndex((item) => !isLikelyNamespace(item.name, typeChecker)); + if (firstNonNamespace < 0) { + map.set(node.expression, new SubmoduleReference(symbol, node.expression, [])); + } else { + const tailEnd = tail[firstNonNamespace].expression; + const path = tail.slice(0, firstNonNamespace).map((item) => item.name); + map.set(tailEnd, new SubmoduleReference(symbol, tailEnd, path)); + } + } + + return map; + } + + // Faster than ||-ing a bung of if statements to avoid traversing uninteresting nodes... + switch (node.kind) { + case ts.SyntaxKind.ImportDeclaration: + case ts.SyntaxKind.ExportDeclaration: + break; + default: + for (const child of node.getChildren()) { + map = SubmoduleReference.inNode(child, typeChecker, importDeclarations, map); + } + } + + return map; + } + + private constructor( + public readonly root: ts.Symbol, + public readonly submoduleChain: ts.LeftHandSideExpression | ts.Identifier | ts.PrivateIdentifier, + public readonly path: readonly ts.Node[], + ) {} + + public get lastNode(): ts.Node { + if (this.path.length === 0) { + const node = this.root.valueDeclaration ?? this.root.declarations[0]; + return ts.isNamespaceImport(node) || ts.isImportSpecifier(node) ? node.name : node; + } + return this.path[this.path.length - 1]; + } + + public toString(): string { + return `${this.constructor.name} item.getText(item.getSourceFile())), + )}>`; + } +} + +/** + * Determines what symbols are imported by the given TypeScript import + * delcaration, in the context of the specified file, using the provided type + * checker. + * + * @param decl an import declaration. + * @param sourceFile the source file that contains the import declaration. + * @param typeChecker a TypeChecker instance valid for the provided source file. + * + * @returns the (possibly empty) list of symbols imported by this declaration. + */ +function importedSymbolsFrom( + decl: ts.ImportDeclaration, + sourceFile: ts.SourceFile, + typeChecker: ts.TypeChecker, +): ts.Symbol[] { + const { importClause } = decl; + + if (importClause == null) { + // This is a "for side effects" import, which isn't relevant for our business here... + return []; + } + + const { name, namedBindings } = importClause; + const imports = new Array(); + + if (name != null) { + const symbol = typeChecker.getSymbolAtLocation(name); + if (symbol == null) { + throw new Error(`No symbol was defined for node ${name.getText(sourceFile)}`); + } + imports.push(symbol); + } + if (namedBindings != null) { + if (ts.isNamespaceImport(namedBindings)) { + const { name } = namedBindings; + const symbol = typeChecker.getSymbolAtLocation(name); + if (symbol == null) { + throw new Error(`No symbol was defined for node ${name.getText(sourceFile)}`); + } + imports.push(symbol); + } else { + for (const specifier of namedBindings.elements) { + const { name } = specifier; + const symbol = typeChecker.getSymbolAtLocation(name); + if (symbol == null) { + throw new Error(`No symbol was defined for node ${name.getText(sourceFile)}`); + } + imports.push(symbol); + } + } + } + + return imports; +} + +interface PathEntry { + readonly name: ts.Identifier | ts.PrivateIdentifier | ts.LeftHandSideExpression; + readonly expression: ts.LeftHandSideExpression; +} + +function propertyPath(node: ts.PropertyAccessExpression): readonly PathEntry[] { + const { expression, name } = node; + if (!ts.isPropertyAccessExpression(expression)) { + return [ + { name: expression, expression }, + { name, expression }, + ]; + } + return [...propertyPath(expression), { name, expression }]; +} + +/** + * A heuristic to determine whether the provided node likely refers to some + * namespace. + * + * @param node the node to be checked. + * @param typeChecker a type checker that can obtain symbols for this node. + * + * @returns true if the node likely refers to a namespace name. + */ +function isLikelyNamespace(node: ts.Node, typeChecker: ts.TypeChecker): boolean { + if (!ts.isIdentifier(node)) { + return false; + } + + // If the identifier was bound to a symbol, we can inspect the declarations of + // it to validate they are all module or namespace declarations. + const symbol = typeChecker.getSymbolAtLocation(node); + if (symbol != null) { + return ( + symbol.declarations.length > 0 && + symbol.declarations.every( + (decl) => ts.isModuleDeclaration(decl) || ts.isNamespaceExport(decl) || ts.isNamespaceImport(decl), + ) + ); + } + + // We understand this is likely a namespace if the name does not start with + // upper-case letter. + return !startsWithUpperCase(node.text); +} + +function startsWithUpperCase(text: string): boolean { + return text.length > 0 && text[0] === text[0].toUpperCase(); +} diff --git a/packages/jsii-rosetta/lib/translate.ts b/packages/jsii-rosetta/lib/translate.ts index 74dfe27b16..8ce88f226b 100644 --- a/packages/jsii-rosetta/lib/translate.ts +++ b/packages/jsii-rosetta/lib/translate.ts @@ -3,10 +3,12 @@ import { inspect } from 'util'; import { TARGET_LANGUAGES, TargetLanguage } from './languages'; import { RecordReferencesVisitor } from './languages/record-references'; +import { supportsTransitiveSubmoduleAccess } from './languages/target-language'; import * as logging from './logging'; import { renderTree } from './o-tree'; import { AstRenderer, AstHandler, AstRendererOptions } from './renderer'; import { TypeScriptSnippet, completeSource, SnippetParameters, formatLocation } from './snippet'; +import { SubmoduleReference, SubmoduleReferenceMap } from './submodule-reference'; import { snippetKey } from './tablets/key'; import { ORIGINAL_SNIPPET_KEY } from './tablets/schema'; import { TranslatedSnippet } from './tablets/tablets'; @@ -50,10 +52,14 @@ export class Translator { const translator = this.translatorFor(snip); const translations = mkDict( - languages.map((lang) => { + languages.flatMap((lang, idx, languages) => { + if (languages.slice(0, idx).includes(lang)) { + // This language was duplicated in the request... we'll skip that here... + return []; + } const languageConverterFactory = TARGET_LANGUAGES[lang]; const translated = translator.renderUsing(languageConverterFactory.createVisitor()); - return [lang, { source: translated, version: languageConverterFactory.version }] as const; + return [[lang, { source: translated, version: languageConverterFactory.version }] as const]; }), ); @@ -155,6 +161,7 @@ export class SnippetTranslator { private readonly visibleSpans: Spans; private readonly compilation!: CompilationResult; private readonly tryCompile: boolean; + private readonly submoduleReferences: SubmoduleReferenceMap; public constructor(snippet: TypeScriptSnippet, private readonly options: SnippetTranslatorOptions = {}) { const compiler = options.compiler ?? new TypeScriptCompiler(); @@ -171,6 +178,12 @@ export class SnippetTranslator { // Respect '/// !hide' and '/// !show' directives this.visibleSpans = Spans.visibleSpansFromSource(source); + // Find submodule references on explicit imports + this.submoduleReferences = SubmoduleReference.inSourceFile( + this.compilation.rootFile, + this.compilation.program.getTypeChecker(), + ); + // This makes it about 5x slower, so only do it on demand // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing this.tryCompile = (options.includeCompilerDiagnostics || snippet.strict) ?? false; @@ -225,6 +238,8 @@ export class SnippetTranslator { this.compilation.program.getTypeChecker(), visitor, this.options, + // If we support transitive submodule access, don't provide a submodule reference map. + supportsTransitiveSubmoduleAccess(visitor.language) ? undefined : this.submoduleReferences, ); const converted = converter.convert(this.compilation.rootFile); this.translateDiagnostics.push(...filterVisibleDiagnostics(converter.diagnostics, this.visibleSpans)); @@ -243,6 +258,7 @@ export class SnippetTranslator { this.compilation.program.getTypeChecker(), visitor, this.options, + this.submoduleReferences, ); converter.convert(this.compilation.rootFile); return visitor.fqnsReferenced(); diff --git a/packages/jsii-rosetta/lib/typescript/imports.ts b/packages/jsii-rosetta/lib/typescript/imports.ts index 830bf29388..0210a62fc4 100644 --- a/packages/jsii-rosetta/lib/typescript/imports.ts +++ b/packages/jsii-rosetta/lib/typescript/imports.ts @@ -2,6 +2,7 @@ import * as ts from 'typescript'; import { JsiiSymbol, parentSymbol, lookupJsiiSymbolFromNode } from '../jsii/jsii-utils'; import { AstRenderer } from '../renderer'; +import { SubmoduleReferenceMap } from '../submodule-reference'; import { fmap } from '../util'; import { allOfType, matchAst, nodeOfType, stringFromLiteral } from './ast-utils'; @@ -17,7 +18,16 @@ export interface ImportStatement { export type FullImport = { readonly import: 'full'; - readonly alias: string; + /** + * The name of the namespace prefix in the source code. Used to strip the + * prefix in certain languages (e.g: Java). + */ + readonly sourceName: string; + /** + * The name under which this module is imported. Undefined if the module is + * not aliased (could be the case for namepsace/submodule imports). + */ + readonly alias?: string; }; export type SelectiveImport = { @@ -42,15 +52,27 @@ export function analyzeImportEquals(node: ts.ImportEqualsDeclaration, context: A moduleName = stringFromLiteral(bindings.ref.expression); }); + const sourceName = context.textOf(node.name); + return { node, packageName: moduleName, moduleSymbol: lookupJsiiSymbolFromNode(context.typeChecker, node.name), - imports: { import: 'full', alias: context.textOf(node.name) }, + imports: { import: 'full', alias: sourceName, sourceName }, }; } -export function analyzeImportDeclaration(node: ts.ImportDeclaration, context: AstRenderer): ImportStatement { +export function analyzeImportDeclaration(node: ts.ImportDeclaration, context: AstRenderer): ImportStatement; +export function analyzeImportDeclaration( + node: ts.ImportDeclaration, + context: AstRenderer, + submoduleReferences: SubmoduleReferenceMap, +): ImportStatement[]; +export function analyzeImportDeclaration( + node: ts.ImportDeclaration, + context: AstRenderer, + submoduleReferences?: SubmoduleReferenceMap, +): ImportStatement | ImportStatement[] { const packageName = stringFromLiteral(node.moduleSpecifier); const starBindings = matchAst( @@ -62,15 +84,54 @@ export function analyzeImportDeclaration(node: ts.ImportDeclaration, context: As ); if (starBindings) { - return { + const sourceName = context.textOf(starBindings.namespace.name); + const bareImport: ImportStatement = { node, packageName, moduleSymbol: lookupJsiiSymbolFromNode(context.typeChecker, starBindings.namespace.name), imports: { import: 'full', - alias: context.textOf(starBindings.namespace.name), + alias: sourceName, + sourceName, }, }; + if (submoduleReferences == null) { + return bareImport; + } + + const rootSymbol = context.typeChecker.getSymbolAtLocation(starBindings.namespace.name); + const refs = rootSymbol && Array.from(submoduleReferences.values()).filter((ref) => ref.root === rootSymbol); + // No submodule reference, or only 1 where the path is empty (this is used to signal the use of the bare import so it's not erased) + if (refs == null || refs.length === 0 || (refs.length === 1 && refs[0].path.length === 0)) { + return [bareImport]; + } + + return refs.flatMap(({ lastNode, path, root, submoduleChain }, idx, array): ImportStatement[] => { + if ( + array + .slice(0, idx) + .some( + (other) => other.root === root && context.textOf(other.submoduleChain) === context.textOf(submoduleChain), + ) + ) { + // This would be a duplicate, so we're skipping it + return []; + } + + const moduleSymbol = lookupJsiiSymbolFromNode(context.typeChecker, lastNode); + return [ + { + node, + packageName: [packageName, ...path.map((node) => context.textOf(node))].join('/'), + moduleSymbol, + imports: { + import: 'full', + alias: undefined, // No alias exists in the source text for this... + sourceName: context.textOf(submoduleChain), + }, + }, + ]; + }); } const namedBindings = matchAst( @@ -84,32 +145,77 @@ export function analyzeImportDeclaration(node: ts.ImportDeclaration, context: As ), ); - const elements: ImportBinding[] = []; - if (namedBindings) { - elements.push( - ...namedBindings.specifiers.map((spec) => { - // regular import { name }, renamed import { propertyName, name } - if (spec.propertyName) { - // Renamed import - return { - sourceName: context.textOf(spec.propertyName), - alias: context.textOf(spec.name), - importedSymbol: lookupJsiiSymbolFromNode(context.typeChecker, spec.propertyName), - } as ImportBinding; + const extraImports = new Array(); + const elements: ImportBinding[] = (namedBindings?.specifiers ?? []).flatMap( + ({ name, propertyName }): ImportBinding[] => { + // regular import { name } + // renamed import { propertyName as name } + const directBinding = { + sourceName: context.textOf(propertyName ?? name), + alias: propertyName && context.textOf(name), + importedSymbol: lookupJsiiSymbolFromNode(context.typeChecker, propertyName ?? name), + } as const; + + if (submoduleReferences != null) { + const symbol = context.typeChecker.getSymbolAtLocation(name); + let omitDirectBinding = false; + for (const match of Array.from(submoduleReferences.values()).filter((ref) => ref.root === symbol)) { + if (match.path.length === 0) { + // This is a namespace binding that is used as-is (not via a transitive path). It needs to be preserved. + omitDirectBinding = false; + continue; + } + const subPackageName = [packageName, ...match.path.map((node) => node.getText(node.getSourceFile()))].join( + '/', + ); + const importedSymbol = lookupJsiiSymbolFromNode(context.typeChecker, match.lastNode); + const moduleSymbol = fmap(importedSymbol, parentSymbol); + const importStatement = + extraImports.find((stmt) => { + if (moduleSymbol != null) { + return stmt.moduleSymbol === moduleSymbol; + } + return stmt.packageName === subPackageName; + }) ?? + extraImports[ + extraImports.push({ + moduleSymbol, + node: match.lastNode, + packageName: subPackageName, + imports: { import: 'selective', elements: [] }, + }) - 1 + ]; + + (importStatement.imports as SelectiveImport).elements.push({ + sourceName: context.textOf(match.submoduleChain), + importedSymbol, + }); } + if (omitDirectBinding) { + return []; + } + } + + return [directBinding]; + }, + ); - return { - sourceName: context.textOf(spec.name), - importedSymbol: lookupJsiiSymbolFromNode(context.typeChecker, spec.name), - }; - }), - ); + if (submoduleReferences == null) { + return { + node, + packageName, + imports: { import: 'selective', elements }, + moduleSymbol: fmap(elements?.[0]?.importedSymbol, parentSymbol), + }; } - return { - node, - packageName, - imports: { import: 'selective', elements }, - moduleSymbol: fmap(elements?.[0]?.importedSymbol, parentSymbol), - }; + return [ + { + node, + packageName, + imports: { import: 'selective', elements }, + moduleSymbol: fmap(elements?.[0]?.importedSymbol, parentSymbol), + }, + ...extraImports, + ]; } diff --git a/packages/jsii-rosetta/package.json b/packages/jsii-rosetta/package.json index ae13b80527..8379504608 100644 --- a/packages/jsii-rosetta/package.json +++ b/packages/jsii-rosetta/package.json @@ -21,6 +21,7 @@ "@types/workerpool": "^6.1.1", "@types/semver": "^7.3.13", "jsii-build-tools": "0.0.0", + "jsii-calc": "3.20.120", "memory-streams": "^0.1.3", "mock-fs": "^5.2.0" }, diff --git a/packages/jsii-rosetta/test/commands/transliterate.test.ts b/packages/jsii-rosetta/test/commands/transliterate.test.ts index a59d11bafa..def2c33d9d 100644 --- a/packages/jsii-rosetta/test/commands/transliterate.test.ts +++ b/packages/jsii-rosetta/test/commands/transliterate.test.ts @@ -149,7 +149,7 @@ export class ClassName implements IInterface { "markdown": "# README \`\`\`csharp - IInterface object = new ClassName("this", 1337, new ClassNameProps { Foo = "bar" }); + var object = new ClassName("this", 1337, new ClassNameProps { Foo = "bar" }); object.Property = EnumType.OPTION_A; object.MethodCall(); diff --git a/packages/jsii-rosetta/test/jsii-imports.test.ts b/packages/jsii-rosetta/test/jsii-imports.test.ts index d388b79e70..7f70f34390 100644 --- a/packages/jsii-rosetta/test/jsii-imports.test.ts +++ b/packages/jsii-rosetta/test/jsii-imports.test.ts @@ -242,7 +242,7 @@ describe('no submodule', () => { // eslint-disable-next-line prettier/prettier expectTranslation(trans, TargetLanguage.CSHARP, [ 'using Example.Test.Demo;', - 'MyEnum x = MyEnum.OPTION_A;', + 'var x = MyEnum.OPTION_A;', ]); }); }); @@ -276,7 +276,7 @@ describe('no submodule', () => { // eslint-disable-next-line prettier/prettier expectTranslation(trans, TargetLanguage.CSHARP, [ 'using Example.Test.Demo;', - 'MyEnum x = MyEnum.OPTION_A;', + 'var x = MyEnum.OPTION_A;', ]); }); }); @@ -482,7 +482,7 @@ const DEFAULT_JAVA_CODE = [ // The implementation part of the CSharp code is always the same const DEFAULT_CSHARP_CODE = [ - 'MyClass obj = new MyClass("value", new MyClassProps {', + 'var obj = new MyClass("value", new MyClassProps {', ' MyStruct = new MyStruct {', ' Value = "v"', ' }', diff --git a/packages/jsii-rosetta/test/translations/calls/shorthand_property.cs b/packages/jsii-rosetta/test/translations/calls/shorthand_property.cs index 595427e1b6..7fdbfa6ba0 100644 --- a/packages/jsii-rosetta/test/translations/calls/shorthand_property.cs +++ b/packages/jsii-rosetta/test/translations/calls/shorthand_property.cs @@ -1,2 +1,2 @@ -string foo = "hello"; -CallFunction(new Struct { Foo = foo }); \ No newline at end of file +var foo = "hello"; +CallFunction(new Struct { Foo = foo }); diff --git a/packages/jsii-rosetta/test/translations/calls/will_type_deep_structs_directly_if_type_info_is_available.go b/packages/jsii-rosetta/test/translations/calls/will_type_deep_structs_directly_if_type_info_is_available.go index db753ca420..9a870cd954 100644 --- a/packages/jsii-rosetta/test/translations/calls/will_type_deep_structs_directly_if_type_info_is_available.go +++ b/packages/jsii-rosetta/test/translations/calls/will_type_deep_structs_directly_if_type_info_is_available.go @@ -16,9 +16,9 @@ func foo(x *f64, outer *outerStruct) { } foo(jsii.Number(25), &outerStruct{ - foo: jsii.Number(3), - deeper: &deeperStruct{ - a: jsii.Number(1), - b: jsii.Number(2), + Foo: jsii.Number(3), + Deeper: &deeperStruct{ + A: jsii.Number(1), + B: jsii.Number(2), }, }) diff --git a/packages/jsii-rosetta/test/translations/expressions/await.cs b/packages/jsii-rosetta/test/translations/expressions/await.cs index 24cfb3b9c0..8f613704ed 100644 --- a/packages/jsii-rosetta/test/translations/expressions/await.cs +++ b/packages/jsii-rosetta/test/translations/expressions/await.cs @@ -1 +1 @@ -int x = Future(); \ No newline at end of file +var x = Future(); diff --git a/packages/jsii-rosetta/test/translations/expressions/backtick_string_w_o_substitutions.cs b/packages/jsii-rosetta/test/translations/expressions/backtick_string_w_o_substitutions.cs index 9c2fb840a5..496ef56f7b 100644 --- a/packages/jsii-rosetta/test/translations/expressions/backtick_string_w_o_substitutions.cs +++ b/packages/jsii-rosetta/test/translations/expressions/backtick_string_w_o_substitutions.cs @@ -1 +1 @@ -string x = "some string"; \ No newline at end of file +var x = "some string"; diff --git a/packages/jsii-rosetta/test/translations/expressions/computed_key.cs b/packages/jsii-rosetta/test/translations/expressions/computed_key.cs index c967d3aa6b..60e9dac39d 100644 --- a/packages/jsii-rosetta/test/translations/expressions/computed_key.cs +++ b/packages/jsii-rosetta/test/translations/expressions/computed_key.cs @@ -1,4 +1,4 @@ -string y = "WHY?"; +var y = "WHY?"; IDictionary x = new Dictionary { { $"key-{y}", "value" } }; IDictionary z = new Dictionary { { y, true } }; diff --git a/packages/jsii-rosetta/test/translations/expressions/string_interpolation.cs b/packages/jsii-rosetta/test/translations/expressions/string_interpolation.cs index 0a9840046f..08e4c2a4e7 100644 --- a/packages/jsii-rosetta/test/translations/expressions/string_interpolation.cs +++ b/packages/jsii-rosetta/test/translations/expressions/string_interpolation.cs @@ -1,5 +1,5 @@ -string x = "world"; -string y = "well"; +var x = "world"; +var y = "well"; Console.WriteLine($"Hello, {x}, it works {y}!"); // And now a multi-line expression diff --git a/packages/jsii-rosetta/test/translations/expressions/string_literal.cs b/packages/jsii-rosetta/test/translations/expressions/string_literal.cs index 64c5ebc69d..187b415102 100644 --- a/packages/jsii-rosetta/test/translations/expressions/string_literal.cs +++ b/packages/jsii-rosetta/test/translations/expressions/string_literal.cs @@ -1,5 +1,5 @@ -string literal = @" -This si a multiline string literal. +var literal = @" +This is a multiline string literal. ""It's cool!"". diff --git a/packages/jsii-rosetta/test/translations/expressions/string_literal.go b/packages/jsii-rosetta/test/translations/expressions/string_literal.go index 4ff71f0a21..07b11a356d 100644 --- a/packages/jsii-rosetta/test/translations/expressions/string_literal.go +++ b/packages/jsii-rosetta/test/translations/expressions/string_literal.go @@ -1 +1,9 @@ -literal := "\nThis si a multiline string literal.\n\n\"It's cool!\".\n\nYEAH BABY!!\n\nLitteral \\n right here (not a newline!)\n" +literal := ` +This is a multiline string literal. + +"It's cool!". + +YEAH BABY!! + +Litteral \\n right here (not a newline!) +` diff --git a/packages/jsii-rosetta/test/translations/expressions/string_literal.java b/packages/jsii-rosetta/test/translations/expressions/string_literal.java index d81e09e1e9..a9a03175b7 100644 --- a/packages/jsii-rosetta/test/translations/expressions/string_literal.java +++ b/packages/jsii-rosetta/test/translations/expressions/string_literal.java @@ -1 +1 @@ -String literal = "\nThis si a multiline string literal.\n\n\"It's cool!\".\n\nYEAH BABY!!\n\nLitteral \\n right here (not a newline!)\n"; +String literal = "\nThis is a multiline string literal.\n\n\"It's cool!\".\n\nYEAH BABY!!\n\nLitteral \\n right here (not a newline!)\n"; diff --git a/packages/jsii-rosetta/test/translations/expressions/string_literal.py b/packages/jsii-rosetta/test/translations/expressions/string_literal.py index b9f43b8966..49745aeaf0 100644 --- a/packages/jsii-rosetta/test/translations/expressions/string_literal.py +++ b/packages/jsii-rosetta/test/translations/expressions/string_literal.py @@ -1,5 +1,5 @@ literal = """ -This si a multiline string literal. +This is a multiline string literal. "It's cool!". diff --git a/packages/jsii-rosetta/test/translations/expressions/string_literal.ts b/packages/jsii-rosetta/test/translations/expressions/string_literal.ts index ebff58a601..20f2c0894c 100644 --- a/packages/jsii-rosetta/test/translations/expressions/string_literal.ts +++ b/packages/jsii-rosetta/test/translations/expressions/string_literal.ts @@ -1,5 +1,5 @@ const literal = ` -This si a multiline string literal. +This is a multiline string literal. "It's cool!". diff --git a/packages/jsii-rosetta/test/translations/expressions/struct_assignment.cs b/packages/jsii-rosetta/test/translations/expressions/struct_assignment.cs index 975d97e10f..ad3ae95492 100644 --- a/packages/jsii-rosetta/test/translations/expressions/struct_assignment.cs +++ b/packages/jsii-rosetta/test/translations/expressions/struct_assignment.cs @@ -3,4 +3,4 @@ class Test public string Key { get; set; } } -Test x = new Test { Key = "value" }; +var x = new Test { Key = "value" }; diff --git a/packages/jsii-rosetta/test/translations/imports/selective_import.java b/packages/jsii-rosetta/test/translations/imports/selective_import.java index 3412911fec..333742a4f7 100644 --- a/packages/jsii-rosetta/test/translations/imports/selective_import.java +++ b/packages/jsii-rosetta/test/translations/imports/selective_import.java @@ -1,6 +1,6 @@ -import scope.some.module.one; +import scope.some.module.one.*; import scope.some.module.Two; -import scope.some.module.someThree; -import scope.some.module.four; +import scope.some.module.someThree.*; +import scope.some.module.four.*; new Two(); renamed(); diff --git a/packages/jsii-rosetta/test/translations/imports/submodule-import.cs b/packages/jsii-rosetta/test/translations/imports/submodule-import.cs new file mode 100644 index 0000000000..b83d38c184 --- /dev/null +++ b/packages/jsii-rosetta/test/translations/imports/submodule-import.cs @@ -0,0 +1,15 @@ +using Amazon.JSII.Tests.CalculatorNamespace; +using Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences; +using Gen.Providers.Aws; + +// Access without existing type information +var awsKmsKeyExamplekms = new Kms.KmsKey(this, "examplekms", new Struct { + DeletionWindowInDays = 7, + Description = "KMS key 1" +}); + +// Accesses two distinct points of the submodule hierarchy +var myClass = new Submodule.MyClass(new SomeStruct { Prop = Submodule.Child.SomeEnum.SOME }); + +// Access via a renamed import +Foo.Consumer.Consume(new ConsumerProps { Homonymous = new Homonymous { StringProperty = "yes" } }); diff --git a/packages/jsii-rosetta/test/translations/imports/submodule-import.go b/packages/jsii-rosetta/test/translations/imports/submodule-import.go new file mode 100644 index 0000000000..4d09940446 --- /dev/null +++ b/packages/jsii-rosetta/test/translations/imports/submodule-import.go @@ -0,0 +1,23 @@ +import "github.com/aws/jsii/jsii-calc/go/jsiicalc/submodule" +import "github.com/aws/jsii/jsii-calc/go/jsiicalc/submodule/child" +import "github.com/aws/jsii/jsii-calc/go/jsiicalc" +import "github.com/aws/jsii/jsii-calc/go/jsiicalc/foo" +import "github.com/aws-samples/dummy/gen/providers/aws/kms" + +// Access without existing type information +awsKmsKeyExamplekms := kms.NewKmsKey(this, jsii.String("examplekms"), map[string]interface{}{ + "deletionWindowInDays": jsii.Number(7), + "description": jsii.String("KMS key 1"), +}) + +// Accesses two distinct points of the submodule hierarchy +myClass := submodule.NewMyClass(&SomeStruct{ + Prop: child.SomeEnum_SOME, +}) + +// Access via a renamed import +foo.Consumer_Consume(&ConsumerProps{ + Homonymous: &Homonymous{ + StringProperty: jsii.String("yes"), + }, +}) diff --git a/packages/jsii-rosetta/test/translations/imports/submodule-import.java b/packages/jsii-rosetta/test/translations/imports/submodule-import.java new file mode 100644 index 0000000000..e0c1acae67 --- /dev/null +++ b/packages/jsii-rosetta/test/translations/imports/submodule-import.java @@ -0,0 +1,17 @@ +import software.amazon.jsii.tests.calculator.submodule.*; +import software.amazon.jsii.tests.calculator.submodule.child.*; +import software.amazon.jsii.tests.calculator.homonymousForwardReferences.*; +import software.amazon.jsii.tests.calculator.homonymousForwardReferences.foo.*; +import gen.providers.aws.kms.*; + +// Access without existing type information +Object awsKmsKeyExamplekms = KmsKey.Builder.create(this, "examplekms") + .deletionWindowInDays(7) + .description("KMS key 1") + .build(); + +// Accesses two distinct points of the submodule hierarchy +MyClass myClass = MyClass.Builder.create().prop(SomeEnum.SOME).build(); + +// Access via a renamed import +Consumer.consume(ConsumerProps.builder().homonymous(Homonymous.builder().stringProperty("yes").build()).build()); diff --git a/packages/jsii-rosetta/test/translations/imports/submodule-import.py b/packages/jsii-rosetta/test/translations/imports/submodule-import.py new file mode 100644 index 0000000000..2ff0a54a0e --- /dev/null +++ b/packages/jsii-rosetta/test/translations/imports/submodule-import.py @@ -0,0 +1,15 @@ +import jsii_calc as calc +from jsii_calc import homonymous_forward_references as ns +import ...gen.providers.aws as aws + +# Access without existing type information +aws_kms_key_examplekms = aws.kms.KmsKey(self, "examplekms", + deletion_window_in_days=7, + description="KMS key 1" +) + +# Accesses two distinct points of the submodule hierarchy +my_class = calc.submodule.MyClass(prop=calc.submodule.child.SomeEnum.SOME) + +# Access via a renamed import +ns.foo.Consumer.consume(homonymous=ns.foo.Homonymous(string_property="yes")) diff --git a/packages/jsii-rosetta/test/translations/imports/submodule-import.ts b/packages/jsii-rosetta/test/translations/imports/submodule-import.ts new file mode 100644 index 0000000000..b552e577af --- /dev/null +++ b/packages/jsii-rosetta/test/translations/imports/submodule-import.ts @@ -0,0 +1,15 @@ +import * as calc from 'jsii-calc'; +import { homonymousForwardReferences as ns } from 'jsii-calc'; +import * as aws from './.gen/providers/aws'; + +// Access without existing type information +const awsKmsKeyExamplekms = new aws.kms.KmsKey(this, 'examplekms', { + deletionWindowInDays: 7, + description: 'KMS key 1', +}); + +// Accesses two distinct points of the submodule hierarchy +const myClass = new calc.submodule.MyClass({ prop: calc.submodule.child.SomeEnum.SOME }); + +// Access via a renamed import +ns.foo.Consumer.consume({ homonymous: { stringProperty: 'yes' } }); diff --git a/packages/jsii-rosetta/test/translations/statements/statements_and_newlines.cs b/packages/jsii-rosetta/test/translations/statements/statements_and_newlines.cs index 9f6d62ccdf..a2040eded2 100644 --- a/packages/jsii-rosetta/test/translations/statements/statements_and_newlines.cs +++ b/packages/jsii-rosetta/test/translations/statements/statements_and_newlines.cs @@ -1,6 +1,6 @@ public int DoThing() { - int x = 1; // x seems to be equal to 1 + var x = 1; // x seems to be equal to 1 return x + 1; } @@ -15,12 +15,12 @@ public boolean DoThing2(int x) public int DoThing3() { - int x = 1; + var x = 1; return x + 1; } public void DoThing4() { - int x = 1; + var x = 1; x = 85; -} \ No newline at end of file +} diff --git a/packages/jsii-rosetta/test/translations/structs/infer_struct_from_union.go b/packages/jsii-rosetta/test/translations/structs/infer_struct_from_union.go index 890a35ba1c..8c07048685 100644 --- a/packages/jsii-rosetta/test/translations/structs/infer_struct_from_union.go +++ b/packages/jsii-rosetta/test/translations/structs/infer_struct_from_union.go @@ -1,7 +1,7 @@ takes(&myProps{ - struct_: &someStruct{ - enabled: jsii.Boolean(false), - option: jsii.String("option"), + Struct: &someStruct{ + Enabled: jsii.Boolean(false), + Option: jsii.String("option"), }, }) diff --git a/packages/jsii-rosetta/test/translations/structs/optional_known_struct.go b/packages/jsii-rosetta/test/translations/structs/optional_known_struct.go index d2260cdfa3..5ba6138412 100644 --- a/packages/jsii-rosetta/test/translations/structs/optional_known_struct.go +++ b/packages/jsii-rosetta/test/translations/structs/optional_known_struct.go @@ -1,3 +1,3 @@ NewVpc(this, jsii.String("Something"), &vpcProps{ - argument: jsii.Number(5), + Argument: jsii.Number(5), }) diff --git a/packages/jsii-rosetta/test/translations/structs/struct_starting_with_i.go b/packages/jsii-rosetta/test/translations/structs/struct_starting_with_i.go index 9a74d11250..e3a653acb2 100644 --- a/packages/jsii-rosetta/test/translations/structs/struct_starting_with_i.go +++ b/packages/jsii-rosetta/test/translations/structs/struct_starting_with_i.go @@ -1,3 +1,3 @@ NewIntegration(this, jsii.String("Something"), &integrationOptions{ - argument: jsii.Number(5), + Argument: jsii.Number(5), }) diff --git a/packages/jsii-rosetta/test/translations/structs/var_new_class_known_struct.cs b/packages/jsii-rosetta/test/translations/structs/var_new_class_known_struct.cs index c449a530d6..dac70b4fcc 100644 --- a/packages/jsii-rosetta/test/translations/structs/var_new_class_known_struct.cs +++ b/packages/jsii-rosetta/test/translations/structs/var_new_class_known_struct.cs @@ -1,3 +1,3 @@ -Vpc vpc = new Vpc(this, "Something", new VpcProps { +var vpc = new Vpc(this, "Something", new VpcProps { Argument = 5 }); diff --git a/packages/jsii-rosetta/test/translations/structs/var_new_class_known_struct.go b/packages/jsii-rosetta/test/translations/structs/var_new_class_known_struct.go index b1fa2fbdf2..61ccdb2311 100644 --- a/packages/jsii-rosetta/test/translations/structs/var_new_class_known_struct.go +++ b/packages/jsii-rosetta/test/translations/structs/var_new_class_known_struct.go @@ -1,3 +1,3 @@ vpc := NewVpc(this, jsii.String("Something"), &vpcProps{ - argument: jsii.Number(5), + Argument: jsii.Number(5), }) From ceca6815f5b6401e1a99f57292d452c8cff972ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Jan 2023 18:17:24 +0000 Subject: [PATCH 02/14] chore(deps-dev): Update mkdocs-material requirement from ~=9.0.6 to ~=9.0.8 in /gh-pages (#3943) Updates the requirements on [mkdocs-material](https://github.com/squidfunk/mkdocs-material) to permit the latest version.
Release notes

Sourced from mkdocs-material's releases.

mkdocs-material-9.0.8

  • Updated Croatian translations
  • Updated French translations
  • Updated Hungarian translations
  • Updated Portuguese (Brasilian) translations
  • Updated Spanish translations
  • Updated Ukrainian translations
  • Updated Urdu translations
  • Updated Vietnamese translations
Changelog

Sourced from mkdocs-material's changelog.

mkdocs-material-9.0.8 (2023-01-29)

  • Updated Croatian translations
  • Updated French translations
  • Updated Hungarian translations
  • Updated Portuguese (Brasilian) translations
  • Updated Spanish translations
  • Updated Ukrainian translations
  • Updated Urdu translations
  • Updated Vietnamese translations

mkdocs-material-9.0.7 (2023-01-28)

  • Improved accessibility of sidebar navigation
  • Moved all translations into community edition
  • Updated Polish and Portuguese (Brasilian) translations
  • Fixed info plugin terminating on subsequent reload when serving
  • Fixed #4910: Sidebar navigation labels have invalid ARIA roles
  • Fixed #4884: Search query terms can't be separated by colons

mkdocs-material-9.0.6+insiders-4.29.0 (2023-01-21)

  • Added built-in optimize plugin for automatically compressing images
  • Switched reporting in built-in privacy plugin to info level

mkdocs-material-9.0.6 (2023-01-19)

  • Fixed #4883: Automatically disable info plugin when serving
  • Fixed #4885: Search plugin crashes in some exotic cases (9.0.3 regression)

mkdocs-material-9.0.5+insiders-4.28.1 (2023-01-17)

  • Fixed built-in info plugin erroring for Insiders on version check
  • Fixed #4865: Navigation paths render bug when there's no top-level section
  • Fixed #4875: Added support for hiding navigation paths
  • Improved navigation path to not render for a single item

mkdocs-material-9.0.5+insiders-4.28.0 (2023-01-14)

  • Added support for navigation path (breadcrumbs)

mkdocs-material-9.0.5 (2023-01-14)

  • Fixed #4842: Improved accessibility of search result list

mkdocs-material-9.0.4 (2023-01-12)

  • Fixed #4823: Improved contrast ratio in footer (9.0.2 regression)
  • Fixed #4832: Set navigation items back to black (9.0.3 regression)
  • Fixed #4843: Emojis broken due to maxcdn.com shutting down

... (truncated)

Commits
  • f0b4179 Prepare 9.0.8 release
  • b2cfad5 Updated distribution files
  • ae6a422 Updated Portuguese (Brasilian) translations
  • e9eee36 Merge branch 'master' of github.com:squidfunk/mkdocs-material
  • 664af42 Updated Spanish, French, Croatian, Hungarian, Ukranian, Urdu and Vietnamese t...
  • 7921736 Documentation (#4937)
  • d32ca84 Added hook to automatically compute and update translations
  • 663b39f Updated translation template
  • 7bc42b9 Prepare 9.0.7 release
  • c75fc14 Moved all translations into community edition
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- gh-pages/requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gh-pages/requirements-dev.txt b/gh-pages/requirements-dev.txt index ada8c6bfc9..8e1941a409 100644 --- a/gh-pages/requirements-dev.txt +++ b/gh-pages/requirements-dev.txt @@ -1,4 +1,4 @@ mkdocs~=1.4.2 mkdocs-awesome-pages-plugin~=2.8.0 -mkdocs-material~=9.0.6 +mkdocs-material~=9.0.8 mkdocs-git-revision-date-plugin~=0.3.2 From 72c1cf5b8b1929ee8946777cf0705b5a965e1c1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Jan 2023 22:44:48 +0000 Subject: [PATCH 03/14] chore(deps): Bump github.com/mattn/go-isatty from 0.0.16 to 0.0.17 in /packages/@jsii/go-runtime/jsii-runtime-go (#3892) Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.16 to 0.0.17.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/mattn/go-isatty&package-manager=go_modules&previous-version=0.0.16&new-version=0.0.17)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- packages/@jsii/go-runtime-test/project/go.mod | 2 +- packages/@jsii/go-runtime-test/project/go.sum | 12 ++---------- packages/@jsii/go-runtime/jsii-runtime-go/go.mod | 2 +- packages/@jsii/go-runtime/jsii-runtime-go/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/packages/@jsii/go-runtime-test/project/go.mod b/packages/@jsii/go-runtime-test/project/go.mod index 714240936b..a1b086769f 100644 --- a/packages/@jsii/go-runtime-test/project/go.mod +++ b/packages/@jsii/go-runtime-test/project/go.mod @@ -16,7 +16,7 @@ require ( github.com/Masterminds/semver/v3 v3.2.0 // indirect github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 v2.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/yuin/goldmark v1.4.13 // indirect golang.org/x/mod v0.7.0 // indirect diff --git a/packages/@jsii/go-runtime-test/project/go.sum b/packages/@jsii/go-runtime-test/project/go.sum index db5f0a201a..dc15b3ba5a 100644 --- a/packages/@jsii/go-runtime-test/project/go.sum +++ b/packages/@jsii/go-runtime-test/project/go.sum @@ -3,8 +3,8 @@ github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYr github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -30,18 +30,10 @@ golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.3.0 h1:SrNbZl6ECOS1qFzgTdQfWXZM9XBkiA6tkFrH9YSTPHM= -golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= -golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= -golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/go.mod b/packages/@jsii/go-runtime/jsii-runtime-go/go.mod index ceb8a6db59..3c3375c924 100644 --- a/packages/@jsii/go-runtime/jsii-runtime-go/go.mod +++ b/packages/@jsii/go-runtime/jsii-runtime-go/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/Masterminds/semver/v3 v3.2.0 - github.com/mattn/go-isatty v0.0.16 + github.com/mattn/go-isatty v0.0.17 github.com/stretchr/testify v1.8.1 golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 golang.org/x/tools v0.5.0 diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/go.sum b/packages/@jsii/go-runtime/jsii-runtime-go/go.sum index f4be42182b..dc15b3ba5a 100644 --- a/packages/@jsii/go-runtime/jsii-runtime-go/go.sum +++ b/packages/@jsii/go-runtime/jsii-runtime-go/go.sum @@ -3,8 +3,8 @@ github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYr github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= From 10d74350ae78154cf8713f16d0df5e0a5be6f536 Mon Sep 17 00:00:00 2001 From: Cory Hall <43035978+corymhall@users.noreply.github.com> Date: Tue, 31 Jan 2023 17:20:50 -0500 Subject: [PATCH 04/14] chore: update dependencies (#3944) Updating setuptools to address a [CVE](https://cwe.mitre.org/data/definitions/1333.html). setuptools version >=64 had some breaking changes that require editable_mode to be set to `strict`. See [this issue](https://github.com/pypa/setuptools/issues/3518) for more details. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 --- packages/@jsii/python-runtime/requirements.txt | 2 +- .../lib/targets/python/requirements-dev.txt | 2 +- .../__snapshots__/examples.test.js.snap | 4 ++-- .../prerelease-identifiers.test.js.snap | 8 ++++---- .../__snapshots__/target-python.test.js.snap | 8 ++++---- .../jsii-pacmak/test/generated-code/harness.ts | 15 ++++++++++++++- .../test/generated-code/python-pyright.test.ts | 4 ++++ .../test/generated-code/requirements-dev.txt | 1 + 8 files changed, 31 insertions(+), 13 deletions(-) diff --git a/packages/@jsii/python-runtime/requirements.txt b/packages/@jsii/python-runtime/requirements.txt index 9cdb084a11..020947ef2a 100644 --- a/packages/@jsii/python-runtime/requirements.txt +++ b/packages/@jsii/python-runtime/requirements.txt @@ -3,7 +3,7 @@ mypy==0.812 pip~=22.3 pytest~=7.2 pytest-mypy~=0.10 -setuptools~=62.2 +setuptools~=65.5.1 wheel~=0.38 -e . diff --git a/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt b/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt index 5d3793c01b..bf9747abe2 100644 --- a/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt +++ b/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt @@ -3,7 +3,7 @@ # be installed in the virtual environment used for building the distribution # package (wheel, sdist), but not declared as build-system dependencies. -setuptools~=62.1.0 # build-system +setuptools~=65.5.1 # build-system wheel~=0.38.4 # build-system twine~=4.0.2 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 ad8999b3eb..ac1bf7249b 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 @@ -1220,7 +1220,7 @@ testpkg.FooBar=example.test.demo.FooBar exports[`diamond-struct-parameter.ts: /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=62.1.0", "wheel~=0.38.4"] +requires = ["setuptools~=65.5.1", "wheel~=0.38.4"] build-backend = "setuptools.build_meta" [tool.pyright] @@ -2641,7 +2641,7 @@ testpkg.Namespace2.Foo.Final=example.test.demo.Namespace2$Foo.Final exports[`nested-types.ts: /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=62.1.0", "wheel~=0.38.4"] +requires = ["setuptools~=65.5.1", "wheel~=0.38.4"] build-backend = "setuptools.build_meta" [tool.pyright] diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.js.snap index 8585cd4498..dfb457b49c 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.js.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.js.snap @@ -407,7 +407,7 @@ foo exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=62.1.0", "wheel~=0.38.4"] +requires = ["setuptools~=65.5.1", "wheel~=0.38.4"] build-backend = "setuptools.build_meta" [tool.pyright] @@ -916,7 +916,7 @@ foo exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=62.1.0", "wheel~=0.38.4"] +requires = ["setuptools~=65.5.1", "wheel~=0.38.4"] build-backend = "setuptools.build_meta" [tool.pyright] @@ -1405,7 +1405,7 @@ foo exports[`foo@2.0.0-rc.42: /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=62.1.0", "wheel~=0.38.4"] +requires = ["setuptools~=65.5.1", "wheel~=0.38.4"] build-backend = "setuptools.build_meta" [tool.pyright] @@ -1891,7 +1891,7 @@ foo exports[`foo@4.5.6-pre.1337: /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=62.1.0", "wheel~=0.38.4"] +requires = ["setuptools~=65.5.1", "wheel~=0.38.4"] build-backend = "setuptools.build_meta" [tool.pyright] 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 dc431dd154..d01c555b50 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 @@ -243,7 +243,7 @@ scope.jsii-calc-base exports[`Generated code for "@scope/jsii-calc-base": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=62.1.0", "wheel~=0.38.4"] +requires = ["setuptools~=65.5.1", "wheel~=0.38.4"] build-backend = "setuptools.build_meta" [tool.pyright] @@ -797,7 +797,7 @@ scope.jsii-calc-base-of-base exports[`Generated code for "@scope/jsii-calc-base-of-base": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=62.1.0", "wheel~=0.38.4"] +requires = ["setuptools~=65.5.1", "wheel~=0.38.4"] build-backend = "setuptools.build_meta" [tool.pyright] @@ -1324,7 +1324,7 @@ scope.jsii-calc-lib exports[`Generated code for "@scope/jsii-calc-lib": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=62.1.0", "wheel~=0.38.4"] +requires = ["setuptools~=65.5.1", "wheel~=0.38.4"] build-backend = "setuptools.build_meta" [tool.pyright] @@ -2914,7 +2914,7 @@ foo = "bar" exports[`Generated code for "jsii-calc": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=62.1.0", "wheel~=0.38.4"] +requires = ["setuptools~=65.5.1", "wheel~=0.38.4"] build-backend = "setuptools.build_meta" [tool.pyright] diff --git a/packages/jsii-pacmak/test/generated-code/harness.ts b/packages/jsii-pacmak/test/generated-code/harness.ts index 0861cd73ee..4ca7fb43da 100644 --- a/packages/jsii-pacmak/test/generated-code/harness.ts +++ b/packages/jsii-pacmak/test/generated-code/harness.ts @@ -321,7 +321,7 @@ export async function preparePythonVirtualEnv({ ]), ).resolves.not.toThrowError(); - // Install development dependencies as needed... + // First install dev dependencies await expect( shell( venvPython, @@ -332,6 +332,19 @@ export async function preparePythonVirtualEnv({ '--no-input', '-r', path.resolve(__dirname, 'requirements-dev.txt'), + ], + { env, retry: { maxAttempts: 5 } }, + ), + ).resolves.not.toThrowError(); + + await expect( + shell( + venvPython, + [ + '-m', + 'pip', + 'install', + '--no-input', // Additional install parameters ...install, // Note: this resolution is a little ugly, but it's there to avoid creating a dependency cycle diff --git a/packages/jsii-pacmak/test/generated-code/python-pyright.test.ts b/packages/jsii-pacmak/test/generated-code/python-pyright.test.ts index 9ce3e744bc..40d29f1e60 100644 --- a/packages/jsii-pacmak/test/generated-code/python-pyright.test.ts +++ b/packages/jsii-pacmak/test/generated-code/python-pyright.test.ts @@ -48,6 +48,10 @@ beforeAll(async () => { install: TEST_PACKAGES.flatMap(({ moduleName }) => [ '-e', JSON.stringify(path.join(pythonSource, moduleName, TargetName.PYTHON)), + // setuptools >=64 requires this + // https://github.com/pypa/setuptools/issues/3518 + '--config-settings', + 'editable_mode=strict', ]), venvDir: pythonSource, systemSitePackages: false, // Interferes with pyright resolutions... diff --git a/packages/jsii-pacmak/test/generated-code/requirements-dev.txt b/packages/jsii-pacmak/test/generated-code/requirements-dev.txt index 2daf539505..a364e78e23 100644 --- a/packages/jsii-pacmak/test/generated-code/requirements-dev.txt +++ b/packages/jsii-pacmak/test/generated-code/requirements-dev.txt @@ -1 +1,2 @@ mypy==0.982 +pip==23.0 # required to use --config-settings From bbe45f138cd2caece2ea76a2a5b5b038f8857831 Mon Sep 17 00:00:00 2001 From: Cory Hall <43035978+corymhall@users.noreply.github.com> Date: Wed, 1 Feb 2023 13:22:01 -0500 Subject: [PATCH 05/14] chore: fix version updates (#3946) There are a couple of issues with some version updates - Only do minor version updates for `@types/fs-extra` This is the last major version that is compatible with typescript@3.9 - `@types/yargs` is on longer compatible with typescript@3.9 so we need to pin it - Other deps have a transient dependency on `@types/yargs` so add a resolution to keep the version - `eslint-plugin-import@27` breaks something. For some reason when this is upgraded the build for `@scope/jsii-calc-base-of-base` fails with this error and I have no idea why ``` packages/jsii-rosetta/lib/languages/record-references.js:11 class RecordReferencesVisitor extends default_1.DefaultVisitor { ^ TypeError: Class extends value undefined is not a constructor or null at Object. (packages/jsii-rosetta/lib/languages/record-references.js:11:49) at Module._compile (node:internal/modules/cjs/loader:1103:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (packages/jsii-rosetta/lib/tablets/key.js:5:29) ``` Also updated the `yarn-upgrade` workflow to have these exceptions This is to fix issues in https://github.com/aws/jsii/pull/3945. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 --- .github/workflows/yarn-upgrade.yml | 9 ++++++--- package.json | 5 ++++- packages/jsii-config/package.json | 2 +- yarn.lock | 4 ++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/yarn-upgrade.yml b/.github/workflows/yarn-upgrade.yml index 600047729b..1cf31c422e 100644 --- a/.github/workflows/yarn-upgrade.yml +++ b/.github/workflows/yarn-upgrade.yml @@ -68,15 +68,18 @@ jobs: - name: Run "ncu -u" # We special-case typescript because it's not semantically versionned, and major.minor is the API contract + # We special-case @types/fs-extra because 9.0.13 is the last version that supports typescript@3.9 + # We special-case @types/yargs because 17.0.13 is the last version that doesn't break + # We special-case eslint-plugin-import because 26 is the last version that works for us. run: |- # Upgrade devDependencies at repository root ncu --upgrade --target=minor --filter=@types/inquirer,@types/node,@jest/types,jest-config,jest-circus ncu --upgrade --target=patch --filter=typescript - ncu --upgrade --target=latest --reject=@types/inquirer,@types/node,typescript,@jest/types,jest-config,jest-circus + ncu --upgrade --target=latest --reject=@types/inquirer,@types/node,typescript,@jest/types,jest-config,jest-circus,eslint-plugin-import # Upgrade all production dependencies (and other always major-pinned dependencies) lerna exec --parallel ncu -- --upgrade --target=minor \ - --filter='${{ steps.production-dependencies.outputs.list }}' \ + --filter='@types/fs-extra,${{ steps.production-dependencies.outputs.list }}' \ --reject='typescript,${{ steps.monorepo-packages.outputs.list }}' # Upgrade all minor-pinned dependencies @@ -85,7 +88,7 @@ jobs: # Upgrade all other dependencies (devDependencies) to the latest lerna exec --parallel ncu -- --upgrade --target=latest \ - --reject='@types/inquirer,@types/node,typescript,${{ steps.production-dependencies.outputs.list }},${{ steps.monorepo-packages.outputs.list }}' + --reject='@types/inquirer,@types/node,typescript,@types/fs-extra,@types/yargs,${{ steps.production-dependencies.outputs.list }},${{ steps.monorepo-packages.outputs.list }}' # This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn update" to run) - name: Run "yarn install" diff --git a/package.json b/package.json index 772050b612..2d256fc293 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "eslint-config-prettier": "^8.6.0", "eslint-import-resolver-node": "^0.3.6", "eslint-import-resolver-typescript": "^3.5.2", - "eslint-plugin-import": "^2.26.0", + "eslint-plugin-import": "2.26.0", "eslint-plugin-prettier": "^4.2.1", "jest": "^29.3.1", "jest-circus": "^28.1.3", @@ -53,5 +53,8 @@ "**/@fixtures/jsii-calc-bundled/**", "**/typescript" ] + }, + "resolutions": { + "@types/yargs": "17.0.19" } } diff --git a/packages/jsii-config/package.json b/packages/jsii-config/package.json index 980121c7fb..554b714471 100644 --- a/packages/jsii-config/package.json +++ b/packages/jsii-config/package.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@types/inquirer": "^8.2.3", - "@types/yargs": "^17.0.19", + "@types/yargs": "17.0.19", "jest-expect-message": "^1.1.3" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index 2d45f58f92..87ace2e149 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2234,7 +2234,7 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== -"@types/yargs@^17.0.19", "@types/yargs@^17.0.8": +"@types/yargs@17.0.19", "@types/yargs@^17.0.8": version "17.0.19" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.19.tgz#8dbecdc9ab48bee0cb74f6e3327de3fa0d0c98ae" integrity sha512-cAx3qamwaYX9R0fzOIZAlFpo4A+1uBVCxqpKz9D26uTF4srRXaGTTsikQmaotCtNdbhzyUH7ft6p9ktz9s6UNQ== @@ -3944,7 +3944,7 @@ eslint-module-utils@^2.7.3: dependencies: debug "^3.2.7" -eslint-plugin-import@^2.26.0: +eslint-plugin-import@2.26.0: version "2.26.0" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== From d0e4267e7629a0061f04786e260c520cc5079fac Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Wed, 1 Feb 2023 12:08:02 -0800 Subject: [PATCH 06/14] chore: npm-check-updates && yarn upgrade (#3947) Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date. --- package.json | 18 +- packages/@jsii/benchmarks/package.json | 4 +- packages/@jsii/python-runtime/package.json | 2 +- packages/jsii-pacmak/package.json | 2 +- yarn.lock | 2233 ++++++++++---------- 5 files changed, 1177 insertions(+), 1082 deletions(-) diff --git a/package.json b/package.json index 2d256fc293..62beb4182e 100644 --- a/package.json +++ b/package.json @@ -16,23 +16,23 @@ }, "devDependencies": { "@jest/types": "^28.1.3", - "@types/jest": "^29.2.5", + "@types/jest": "^29.4.0", "@types/node": "^14.18.36", - "@typescript-eslint/eslint-plugin": "^5.48.0", - "@typescript-eslint/parser": "^5.48.0", + "@typescript-eslint/eslint-plugin": "^5.50.0", + "@typescript-eslint/parser": "^5.50.0", "all-contributors-cli": "^6.24.0", - "eslint": "^8.31.0", + "eslint": "^8.33.0", "eslint-config-prettier": "^8.6.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-import-resolver-typescript": "^3.5.2", + "eslint-import-resolver-node": "^0.3.7", + "eslint-import-resolver-typescript": "^3.5.3", "eslint-plugin-import": "2.26.0", "eslint-plugin-prettier": "^4.2.1", - "jest": "^29.3.1", + "jest": "^29.4.1", "jest-circus": "^28.1.3", "jest-config": "^28.1.3", "jest-expect-message": "^1.1.3", - "lerna": "^6.3.0", - "prettier": "^2.8.1", + "lerna": "^6.4.1", + "prettier": "^2.8.3", "standard-version": "^9.5.0", "ts-node": "^10.9.1", "typescript": "~4.7.4" diff --git a/packages/@jsii/benchmarks/package.json b/packages/@jsii/benchmarks/package.json index 8a8215d7c3..d1f072cbe4 100644 --- a/packages/@jsii/benchmarks/package.json +++ b/packages/@jsii/benchmarks/package.json @@ -13,8 +13,8 @@ "yargs": "^16.2.0" }, "devDependencies": { - "@types/glob": "^8.0.0", - "glob": "^8.0.3" + "@types/glob": "^8.0.1", + "glob": "^8.1.0" }, "scripts": { "build": "yarn --silent tsc --build && npm run lint", diff --git a/packages/@jsii/python-runtime/package.json b/packages/@jsii/python-runtime/package.json index 147a42bac9..3d5575e56f 100644 --- a/packages/@jsii/python-runtime/package.json +++ b/packages/@jsii/python-runtime/package.json @@ -42,6 +42,6 @@ "jsii-build-tools": "^0.0.0", "jsii-calc": "^3.20.120", "jsii-pacmak": "^0.0.0", - "pyright": "^1.1.287" + "pyright": "^1.1.292" } } diff --git a/packages/jsii-pacmak/package.json b/packages/jsii-pacmak/package.json index 29616d02e6..772c34384c 100644 --- a/packages/jsii-pacmak/package.json +++ b/packages/jsii-pacmak/package.json @@ -65,7 +65,7 @@ "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-calc": "^3.20.120", - "pyright": "^1.1.287" + "pyright": "^1.1.292" }, "keywords": [ "jsii", diff --git a/yarn.lock b/yarn.lock index 87ace2e149..9047ed750d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,35 +18,35 @@ "@babel/highlight" "^7.18.6" "@babel/compat-data@^7.20.5": - version "7.20.10" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.10.tgz#9d92fa81b87542fff50e848ed585b4212c1d34ec" - integrity sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg== + version "7.20.14" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.14.tgz#4106fc8b755f3e3ee0a0a7c27dde5de1d2b2baf8" + integrity sha512-0YpKHD6ImkWMEINCyDAD0HLLUH/lPCefG8ld9it8DJB2wnApraKuhgYTvTY1z7UFIfBTGy5LwncZ+5HWWGbhFw== "@babel/core@^7.11.6", "@babel/core@^7.12.3": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.7.tgz#37072f951bd4d28315445f66e0ec9f6ae0c8c35f" - integrity sha512-t1ZjCluspe5DW24bn2Rr1CDb2v9rn/hROtg9a2tmd0+QYf4bsloYfLQzjG4qHPNMhWtKdGC33R5AxGR2Af2cBw== + version "7.20.12" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.12.tgz#7930db57443c6714ad216953d1356dac0eb8496d" + integrity sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg== dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.18.6" "@babel/generator" "^7.20.7" "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-module-transforms" "^7.20.7" + "@babel/helper-module-transforms" "^7.20.11" "@babel/helpers" "^7.20.7" "@babel/parser" "^7.20.7" "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" + "@babel/traverse" "^7.20.12" "@babel/types" "^7.20.7" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.2.1" + json5 "^2.2.2" semver "^6.3.0" "@babel/generator@^7.20.7", "@babel/generator@^7.7.2": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.7.tgz#f8ef57c8242665c5929fe2e8d82ba75460187b4a" - integrity sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw== + version "7.20.14" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.14.tgz#9fa772c9f86a46c6ac9b321039400712b96f64ce" + integrity sha512-AEmuXHdcD3A52HHXxaTmYlb8q/xMEhoRP67B3T4Oq7lbmSoqroMZzjnGj3+i1io3pdnF8iBYVu4Ilj+c4hBxYg== dependencies: "@babel/types" "^7.20.7" "@jridgewell/gen-mapping" "^0.3.2" @@ -90,7 +90,7 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-module-transforms@^7.20.7": +"@babel/helper-module-transforms@^7.20.11": version "7.20.11" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz#df4c7af713c557938c50ea3ad0117a7944b2f1b0" integrity sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg== @@ -139,12 +139,12 @@ integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== "@babel/helpers@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.7.tgz#04502ff0feecc9f20ecfaad120a18f011a8e6dce" - integrity sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA== + version "7.20.13" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.13.tgz#e3cb731fb70dc5337134cadc24cbbad31cc87ad2" + integrity sha512-nzJ0DWCL3gB5RCXbUO3KIMMsBY2Eqbx8mBpKGE/02PgyRQFcPQLbkQ1vyy596mZLaP+dAfD+R4ckASzNVmW3jg== dependencies: "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" + "@babel/traverse" "^7.20.13" "@babel/types" "^7.20.7" "@babel/highlight@^7.18.6": @@ -156,10 +156,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.7.tgz#66fe23b3c8569220817d5feb8b9dcdc95bb4f71b" - integrity sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.13", "@babel/parser@^7.20.7": + version "7.20.13" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.13.tgz#ddf1eb5a813588d2fb1692b70c6fce75b945c088" + integrity sha512-gFDLKMfpiXCsjt4za2JA9oTMn70CeseCehb11kRZgvd7+F67Hih3OHOK24cRrWECJ/ljfPGac6ygXAs/C8kIvw== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -260,9 +260,9 @@ "@babel/helper-plugin-utils" "^7.19.0" "@babel/runtime@^7.18.9", "@babel/runtime@^7.7.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.7.tgz#fcb41a5a70550e04a7b708037c7c32f7f356d8fd" - integrity sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ== + version "7.20.13" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.13.tgz#7055ab8a7cff2b8f6058bf6ae45ff84ad2aded4b" + integrity sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA== dependencies: regenerator-runtime "^0.13.11" @@ -275,10 +275,10 @@ "@babel/parser" "^7.20.7" "@babel/types" "^7.20.7" -"@babel/traverse@^7.20.10", "@babel/traverse@^7.20.7", "@babel/traverse@^7.7.2": - version "7.20.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.10.tgz#2bf98239597fcec12f842756f186a9dde6d09230" - integrity sha512-oSf1juCgymrSez8NI4A2sr4+uB/mFd9MXplYGPEBnfAuWmmyeVcHa6xLPiaRBcXkcb/28bgxmQLTVwFKE1yfsg== +"@babel/traverse@^7.20.10", "@babel/traverse@^7.20.12", "@babel/traverse@^7.20.13", "@babel/traverse@^7.7.2": + version "7.20.13" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.13.tgz#817c1ba13d11accca89478bd5481b2d168d07473" + integrity sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ== dependencies: "@babel/code-frame" "^7.18.6" "@babel/generator" "^7.20.7" @@ -286,7 +286,7 @@ "@babel/helper-function-name" "^7.19.0" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.20.7" + "@babel/parser" "^7.20.13" "@babel/types" "^7.20.7" debug "^4.1.0" globals "^11.1.0" @@ -402,49 +402,49 @@ jest-util "^28.1.3" slash "^3.0.0" -"@jest/console@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.3.1.tgz#3e3f876e4e47616ea3b1464b9fbda981872e9583" - integrity sha512-IRE6GD47KwcqA09RIWrabKdHPiKDGgtAL31xDxbi/RjQMsr+lY+ppxmHwY0dUEV3qvvxZzoe5Hl0RXZJOjQNUg== +"@jest/console@^29.4.1": + version "29.4.1" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.4.1.tgz#cbc31d73f6329f693b3d34b365124de797704fff" + integrity sha512-m+XpwKSi3PPM9znm5NGS8bBReeAJJpSkL1OuFCqaMaJL2YX9YXLkkI+MBchMPwu+ZuM2rynL51sgfkQteQ1CKQ== dependencies: - "@jest/types" "^29.3.1" + "@jest/types" "^29.4.1" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^29.3.1" - jest-util "^29.3.1" + jest-message-util "^29.4.1" + jest-util "^29.4.1" slash "^3.0.0" -"@jest/core@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.3.1.tgz#bff00f413ff0128f4debec1099ba7dcd649774a1" - integrity sha512-0ohVjjRex985w5MmO5L3u5GR1O30DexhBSpuwx2P+9ftyqHdJXnk7IUWiP80oHMvt7ubHCJHxV0a0vlKVuZirw== - dependencies: - "@jest/console" "^29.3.1" - "@jest/reporters" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" +"@jest/core@^29.4.1": + version "29.4.1" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.4.1.tgz#91371179b5959951e211dfaeea4277a01dcca14f" + integrity sha512-RXFTohpBqpaTebNdg5l3I5yadnKo9zLBajMT0I38D0tDhreVBYv3fA8kywthI00sWxPztWLD3yjiUkewwu/wKA== + dependencies: + "@jest/console" "^29.4.1" + "@jest/reporters" "^29.4.1" + "@jest/test-result" "^29.4.1" + "@jest/transform" "^29.4.1" + "@jest/types" "^29.4.1" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" ci-info "^3.2.0" exit "^0.1.2" graceful-fs "^4.2.9" - jest-changed-files "^29.2.0" - jest-config "^29.3.1" - jest-haste-map "^29.3.1" - jest-message-util "^29.3.1" + jest-changed-files "^29.4.0" + jest-config "^29.4.1" + jest-haste-map "^29.4.1" + jest-message-util "^29.4.1" jest-regex-util "^29.2.0" - jest-resolve "^29.3.1" - jest-resolve-dependencies "^29.3.1" - jest-runner "^29.3.1" - jest-runtime "^29.3.1" - jest-snapshot "^29.3.1" - jest-util "^29.3.1" - jest-validate "^29.3.1" - jest-watcher "^29.3.1" + jest-resolve "^29.4.1" + jest-resolve-dependencies "^29.4.1" + jest-runner "^29.4.1" + jest-runtime "^29.4.1" + jest-snapshot "^29.4.1" + jest-util "^29.4.1" + jest-validate "^29.4.1" + jest-watcher "^29.4.1" micromatch "^4.0.4" - pretty-format "^29.3.1" + pretty-format "^29.4.1" slash "^3.0.0" strip-ansi "^6.0.0" @@ -458,15 +458,15 @@ "@types/node" "*" jest-mock "^28.1.3" -"@jest/environment@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.3.1.tgz#eb039f726d5fcd14698acd072ac6576d41cfcaa6" - integrity sha512-pMmvfOPmoa1c1QpfFW0nXYtNLpofqo4BrCIk6f2kW4JFeNlHV2t3vd+3iDLf31e2ot2Mec0uqZfmI+U0K2CFag== +"@jest/environment@^29.4.1": + version "29.4.1" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.4.1.tgz#52d232a85cdc995b407a940c89c86568f5a88ffe" + integrity sha512-pJ14dHGSQke7Q3mkL/UZR9ZtTOxqskZaC91NzamEH4dlKRt42W+maRBXiw/LWkdJe+P0f/zDR37+SPMplMRlPg== dependencies: - "@jest/fake-timers" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/fake-timers" "^29.4.1" + "@jest/types" "^29.4.1" "@types/node" "*" - jest-mock "^29.3.1" + jest-mock "^29.4.1" "@jest/expect-utils@^28.1.3": version "28.1.3" @@ -475,10 +475,10 @@ dependencies: jest-get-type "^28.0.2" -"@jest/expect-utils@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.3.1.tgz#531f737039e9b9e27c42449798acb5bba01935b6" - integrity sha512-wlrznINZI5sMjwvUoLVk617ll/UYfGIZNxmbU+Pa7wmkL4vYzhV9R2pwVqUh4NWWuLQWkI8+8mOkxs//prKQ3g== +"@jest/expect-utils@^29.4.1": + version "29.4.1" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.4.1.tgz#105b9f3e2c48101f09cae2f0a4d79a1b3a419cbb" + integrity sha512-w6YJMn5DlzmxjO00i9wu2YSozUYRBhIoJ6nQwpMYcBMtiqMGJm1QBzOf6DDgRao8dbtpDoaqLg6iiQTvv0UHhQ== dependencies: jest-get-type "^29.2.0" @@ -490,13 +490,13 @@ expect "^28.1.3" jest-snapshot "^28.1.3" -"@jest/expect@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.3.1.tgz#456385b62894349c1d196f2d183e3716d4c6a6cd" - integrity sha512-QivM7GlSHSsIAWzgfyP8dgeExPRZ9BIe2LsdPyEhCGkZkoyA+kGsoIzbKAfZCvvRzfZioKwPtCZIt5SaoxYCvg== +"@jest/expect@^29.4.1": + version "29.4.1" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.4.1.tgz#3338fa20f547bb6e550c4be37d6f82711cc13c38" + integrity sha512-ZxKJP5DTUNF2XkpJeZIzvnzF1KkfrhEF6Rz0HGG69fHl6Bgx5/GoU3XyaeFYEjuuKSOOsbqD/k72wFvFxc3iTw== dependencies: - expect "^29.3.1" - jest-snapshot "^29.3.1" + expect "^29.4.1" + jest-snapshot "^29.4.1" "@jest/fake-timers@^28.1.3": version "28.1.3" @@ -510,17 +510,17 @@ jest-mock "^28.1.3" jest-util "^28.1.3" -"@jest/fake-timers@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.3.1.tgz#b140625095b60a44de820876d4c14da1aa963f67" - integrity sha512-iHTL/XpnDlFki9Tq0Q1GGuVeQ8BHZGIYsvCO5eN/O/oJaRzofG9Xndd9HuSDBI/0ZS79pg0iwn07OMTQ7ngF2A== +"@jest/fake-timers@^29.4.1": + version "29.4.1" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.4.1.tgz#7b673131e8ea2a2045858f08241cace5d518b42b" + integrity sha512-/1joI6rfHFmmm39JxNfmNAO3Nwm6Y0VoL5fJDy7H1AtWrD1CgRtqJbN9Ld6rhAkGO76qqp4cwhhxJ9o9kYjQMw== dependencies: - "@jest/types" "^29.3.1" - "@sinonjs/fake-timers" "^9.1.2" + "@jest/types" "^29.4.1" + "@sinonjs/fake-timers" "^10.0.2" "@types/node" "*" - jest-message-util "^29.3.1" - jest-mock "^29.3.1" - jest-util "^29.3.1" + jest-message-util "^29.4.1" + jest-mock "^29.4.1" + jest-util "^29.4.1" "@jest/globals@^28.1.3": version "28.1.3" @@ -531,26 +531,26 @@ "@jest/expect" "^28.1.3" "@jest/types" "^28.1.3" -"@jest/globals@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.3.1.tgz#92be078228e82d629df40c3656d45328f134a0c6" - integrity sha512-cTicd134vOcwO59OPaB6AmdHQMCtWOe+/DitpTZVxWgMJ+YvXL1HNAmPyiGbSHmF/mXVBkvlm8YYtQhyHPnV6Q== +"@jest/globals@^29.4.1": + version "29.4.1" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.4.1.tgz#3cd78c5567ab0249f09fbd81bf9f37a7328f4713" + integrity sha512-znoK2EuFytbHH0ZSf2mQK2K1xtIgmaw4Da21R2C/NE/+NnItm5mPEFQmn8gmF3f0rfOlmZ3Y3bIf7bFj7DHxAA== dependencies: - "@jest/environment" "^29.3.1" - "@jest/expect" "^29.3.1" - "@jest/types" "^29.3.1" - jest-mock "^29.3.1" + "@jest/environment" "^29.4.1" + "@jest/expect" "^29.4.1" + "@jest/types" "^29.4.1" + jest-mock "^29.4.1" -"@jest/reporters@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.3.1.tgz#9a6d78c109608e677c25ddb34f907b90e07b4310" - integrity sha512-GhBu3YFuDrcAYW/UESz1JphEAbvUjaY2vShRZRoRY1mxpCMB3yGSJ4j9n0GxVlEOdCf7qjvUfBCrTUUqhVfbRA== +"@jest/reporters@^29.4.1": + version "29.4.1" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.4.1.tgz#50d509c08575c75e3cd2176d72ec3786419d5e04" + integrity sha512-AISY5xpt2Xpxj9R6y0RF1+O6GRy9JsGa8+vK23Lmzdy1AYcpQn5ItX79wJSsTmfzPKSAcsY1LNt/8Y5Xe5LOSg== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/console" "^29.4.1" + "@jest/test-result" "^29.4.1" + "@jest/transform" "^29.4.1" + "@jest/types" "^29.4.1" "@jridgewell/trace-mapping" "^0.3.15" "@types/node" "*" chalk "^4.0.0" @@ -563,9 +563,9 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.1.3" - jest-message-util "^29.3.1" - jest-util "^29.3.1" - jest-worker "^29.3.1" + jest-message-util "^29.4.1" + jest-util "^29.4.1" + jest-worker "^29.4.1" slash "^3.0.0" string-length "^4.0.1" strip-ansi "^6.0.0" @@ -578,12 +578,12 @@ dependencies: "@sinclair/typebox" "^0.24.1" -"@jest/schemas@^29.0.0": - version "29.0.0" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.0.0.tgz#5f47f5994dd4ef067fb7b4188ceac45f77fe952a" - integrity sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA== +"@jest/schemas@^29.4.0": + version "29.4.0" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.4.0.tgz#0d6ad358f295cc1deca0b643e6b4c86ebd539f17" + integrity sha512-0E01f/gOZeNTG76i5eWWSupvSHaIINrTie7vCyjiYFKgzNdyEGd12BUv4oNBFHOqlHDbtoJi3HrQ38KCC90NsQ== dependencies: - "@sinclair/typebox" "^0.24.1" + "@sinclair/typebox" "^0.25.16" "@jest/source-map@^28.1.2": version "28.1.2" @@ -613,13 +613,13 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-result@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.3.1.tgz#92cd5099aa94be947560a24610aa76606de78f50" - integrity sha512-qeLa6qc0ddB0kuOZyZIhfN5q0e2htngokyTWsGriedsDhItisW7SDYZ7ceOe57Ii03sL988/03wAcBh3TChMGw== +"@jest/test-result@^29.4.1": + version "29.4.1" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.4.1.tgz#997f19695e13b34779ceb3c288a416bd26c3238d" + integrity sha512-WRt29Lwt+hEgfN8QDrXqXGgCTidq1rLyFqmZ4lmJOpVArC8daXrZWkWjiaijQvgd3aOUj2fM8INclKHsQW9YyQ== dependencies: - "@jest/console" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/console" "^29.4.1" + "@jest/types" "^29.4.1" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" @@ -633,14 +633,14 @@ jest-haste-map "^28.1.3" slash "^3.0.0" -"@jest/test-sequencer@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.3.1.tgz#fa24b3b050f7a59d48f7ef9e0b782ab65123090d" - integrity sha512-IqYvLbieTv20ArgKoAMyhLHNrVHJfzO6ARZAbQRlY4UGWfdDnLlZEF0BvKOMd77uIiIjSZRwq3Jb3Fa3I8+2UA== +"@jest/test-sequencer@^29.4.1": + version "29.4.1" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.4.1.tgz#f7a006ec7058b194a10cf833c88282ef86d578fd" + integrity sha512-v5qLBNSsM0eHzWLXsQ5fiB65xi49A3ILPSFQKPXzGL4Vyux0DPZAIN7NAFJa9b4BiTDP9MBF/Zqc/QA1vuiJ0w== dependencies: - "@jest/test-result" "^29.3.1" + "@jest/test-result" "^29.4.1" graceful-fs "^4.2.9" - jest-haste-map "^29.3.1" + jest-haste-map "^29.4.1" slash "^3.0.0" "@jest/transform@^28.1.3": @@ -664,26 +664,26 @@ slash "^3.0.0" write-file-atomic "^4.0.1" -"@jest/transform@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.3.1.tgz#1e6bd3da4af50b5c82a539b7b1f3770568d6e36d" - integrity sha512-8wmCFBTVGYqFNLWfcOWoVuMuKYPUBTnTMDkdvFtAYELwDOl9RGwOsvQWGPFxDJ8AWY9xM/8xCXdqmPK3+Q5Lug== +"@jest/transform@^29.4.1": + version "29.4.1" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.4.1.tgz#e4f517841bb795c7dcdee1ba896275e2c2d26d4a" + integrity sha512-5w6YJrVAtiAgr0phzKjYd83UPbCXsBRTeYI4BXokv9Er9CcrH9hfXL/crCvP2d2nGOcovPUnlYiLPFLZrkG5Hg== dependencies: "@babel/core" "^7.11.6" - "@jest/types" "^29.3.1" + "@jest/types" "^29.4.1" "@jridgewell/trace-mapping" "^0.3.15" babel-plugin-istanbul "^6.1.1" chalk "^4.0.0" convert-source-map "^2.0.0" fast-json-stable-stringify "^2.1.0" graceful-fs "^4.2.9" - jest-haste-map "^29.3.1" + jest-haste-map "^29.4.1" jest-regex-util "^29.2.0" - jest-util "^29.3.1" + jest-util "^29.4.1" micromatch "^4.0.4" pirates "^4.0.4" slash "^3.0.0" - write-file-atomic "^4.0.1" + write-file-atomic "^5.0.0" "@jest/types@^28.1.3": version "28.1.3" @@ -697,12 +697,12 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jest/types@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.3.1.tgz#7c5a80777cb13e703aeec6788d044150341147e3" - integrity sha512-d0S0jmmTpjnhCmNpApgX3jrUZgZ22ivKJRvL2lli5hpCRoNnp1f85r2/wpKfXuYu8E7Jjh1hGfhPyup1NM5AmA== +"@jest/types@^29.4.1": + version "29.4.1" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.4.1.tgz#f9f83d0916f50696661da72766132729dcb82ecb" + integrity sha512-zbrAXDUOnpJ+FMST2rV7QZOgec8rskg2zv8g2ajeqitp4tvZiyqTCYXANrKsM+ryj5o+LI+ZN2EgU9drrkiwSA== dependencies: - "@jest/schemas" "^29.0.0" + "@jest/schemas" "^29.4.0" "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" @@ -765,39 +765,39 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@lerna/add@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/add/-/add-6.3.0.tgz#4ff2b34298ff97f4d015b091441874efc1e95964" - integrity sha512-TlekKVN/qyEhQfSuo38jcC0h86wxfTDJh7/7FU1H/ja9zJEWmph5uN2DmYjifSmGBH2zGYr6ZjKtfgpQMM22nw== - dependencies: - "@lerna/bootstrap" "6.3.0" - "@lerna/command" "6.3.0" - "@lerna/filter-options" "6.3.0" - "@lerna/npm-conf" "6.3.0" - "@lerna/validation-error" "6.3.0" +"@lerna/add@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/add/-/add-6.4.1.tgz#fa20fe9ff875dc5758141262c8cde0d9a6481ec4" + integrity sha512-YSRnMcsdYnQtQQK0NSyrS9YGXvB3jzvx183o+JTH892MKzSlBqwpBHekCknSibyxga1HeZ0SNKQXgsHAwWkrRw== + dependencies: + "@lerna/bootstrap" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/filter-options" "6.4.1" + "@lerna/npm-conf" "6.4.1" + "@lerna/validation-error" "6.4.1" dedent "^0.7.0" npm-package-arg "8.1.1" p-map "^4.0.0" pacote "^13.6.1" semver "^7.3.4" -"@lerna/bootstrap@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-6.3.0.tgz#ddb434d1f36a32927706820f5c30e6ba689fb7f0" - integrity sha512-H3V07F+d6VGhp+8HuPD3tKJiSVq8FB5G+9OpX7KVHHVkoyEHiwRtSbBF2l3YA5HzFIGxFcZSz3C2LA8IR6U//Q== - dependencies: - "@lerna/command" "6.3.0" - "@lerna/filter-options" "6.3.0" - "@lerna/has-npm-version" "6.3.0" - "@lerna/npm-install" "6.3.0" - "@lerna/package-graph" "6.3.0" - "@lerna/pulse-till-done" "6.3.0" - "@lerna/rimraf-dir" "6.3.0" - "@lerna/run-lifecycle" "6.3.0" - "@lerna/run-topologically" "6.3.0" - "@lerna/symlink-binary" "6.3.0" - "@lerna/symlink-dependencies" "6.3.0" - "@lerna/validation-error" "6.3.0" +"@lerna/bootstrap@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-6.4.1.tgz#a76ff22c3160d134fb60bcfddb3f8b0759b4f1ff" + integrity sha512-64cm0mnxzxhUUjH3T19ZSjPdn28vczRhhTXhNAvOhhU0sQgHrroam1xQC1395qbkV3iosSertlu8e7xbXW033w== + dependencies: + "@lerna/command" "6.4.1" + "@lerna/filter-options" "6.4.1" + "@lerna/has-npm-version" "6.4.1" + "@lerna/npm-install" "6.4.1" + "@lerna/package-graph" "6.4.1" + "@lerna/pulse-till-done" "6.4.1" + "@lerna/rimraf-dir" "6.4.1" + "@lerna/run-lifecycle" "6.4.1" + "@lerna/run-topologically" "6.4.1" + "@lerna/symlink-binary" "6.4.1" + "@lerna/symlink-dependencies" "6.4.1" + "@lerna/validation-error" "6.4.1" "@npmcli/arborist" "5.3.0" dedent "^0.7.0" get-port "^5.1.1" @@ -809,100 +809,100 @@ p-waterfall "^2.1.1" semver "^7.3.4" -"@lerna/changed@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-6.3.0.tgz#3d3618a09f9be722c732a206eb030b4c16dfaea4" - integrity sha512-cPCiSbjuyluG4K6SAHogIwyrKtX6OvNlgnxx4g5kiB/k/TGB/6cvwJnivv9FaXGliQoSruaL73euDSUKIkEyBA== +"@lerna/changed@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-6.4.1.tgz#4da6d08df7c53bc90c0c0d9d04839f91dd6d70a9" + integrity sha512-Z/z0sTm3l/iZW0eTSsnQpcY5d6eOpNO0g4wMOK+hIboWG0QOTc8b28XCnfCUO+33UisKl8PffultgoaHMKkGgw== dependencies: - "@lerna/collect-updates" "6.3.0" - "@lerna/command" "6.3.0" - "@lerna/listable" "6.3.0" - "@lerna/output" "6.3.0" + "@lerna/collect-updates" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/listable" "6.4.1" + "@lerna/output" "6.4.1" -"@lerna/check-working-tree@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-6.3.0.tgz#c752d5eb068791f8fb35e85e937307a88212dacb" - integrity sha512-d29R6feG01aVqEdNi41eAhK94WqZa3B9tCfY4c2Ic98pGmqAayxqLDxx+oObQrbJ4e4f7706JMKjJD6uLkFTIA== +"@lerna/check-working-tree@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-6.4.1.tgz#c0dcb5c474faf214865058e2fedda44962367a4e" + integrity sha512-EnlkA1wxaRLqhJdn9HX7h+JYxqiTK9aWEFOPqAE8lqjxHn3RpM9qBp1bAdL7CeUk3kN1lvxKwDEm0mfcIyMbPA== dependencies: - "@lerna/collect-uncommitted" "6.3.0" - "@lerna/describe-ref" "6.3.0" - "@lerna/validation-error" "6.3.0" + "@lerna/collect-uncommitted" "6.4.1" + "@lerna/describe-ref" "6.4.1" + "@lerna/validation-error" "6.4.1" -"@lerna/child-process@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-6.3.0.tgz#9cc8a092ff6e765bafdf135ab7fe0cec3d0af9cc" - integrity sha512-Q7G3OFGK4tgxYVDzSrBlkU45WjTNz7T0W+H/40Y74XxWLYoLAGOXQMPp9h1BiLoTxKFRUgRZJZ5bbSN8TKg4AQ== +"@lerna/child-process@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-6.4.1.tgz#d697fb769f4c5b57c59f87471eb9b3d65be904a3" + integrity sha512-dvEKK0yKmxOv8pccf3I5D/k+OGiLxQp5KYjsrDtkes2pjpCFfQAMbmpol/Tqx6w/2o2rSaRrLsnX8TENo66FsA== dependencies: chalk "^4.1.0" execa "^5.0.0" strong-log-transformer "^2.1.0" -"@lerna/clean@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-6.3.0.tgz#af37e431988ed82c1a0723e02967ffbd4d3832c2" - integrity sha512-uN4hdvrnujVNxnw4Xuo0kpG18x9V4blBBusmqiIcdXkDXiGUmZT8Sk4TbOP/+gXauuGcVkJnmJH62xCTeRHWvw== - dependencies: - "@lerna/command" "6.3.0" - "@lerna/filter-options" "6.3.0" - "@lerna/prompt" "6.3.0" - "@lerna/pulse-till-done" "6.3.0" - "@lerna/rimraf-dir" "6.3.0" +"@lerna/clean@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-6.4.1.tgz#e9ee365ee6879ee998b78b3269fad02b5f385771" + integrity sha512-FuVyW3mpos5ESCWSkQ1/ViXyEtsZ9k45U66cdM/HnteHQk/XskSQw0sz9R+whrZRUDu6YgYLSoj1j0YAHVK/3A== + dependencies: + "@lerna/command" "6.4.1" + "@lerna/filter-options" "6.4.1" + "@lerna/prompt" "6.4.1" + "@lerna/pulse-till-done" "6.4.1" + "@lerna/rimraf-dir" "6.4.1" p-map "^4.0.0" p-map-series "^2.1.0" p-waterfall "^2.1.1" -"@lerna/cli@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-6.3.0.tgz#eb77c1d8dc1cc19e2a0439e9c190efa210112b14" - integrity sha512-/lnsb4jOCNFGfmG26JojB4QV29EjWew+yuy9hdxPYeTYxAcN8IGwro9/o/tFBLmVjQwp1XHPBV4jZxRWHK63xQ== +"@lerna/cli@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-6.4.1.tgz#2b2d093baace40e822caee8c90f698e98a437a2f" + integrity sha512-2pNa48i2wzFEd9LMPKWI3lkW/3widDqiB7oZUM1Xvm4eAOuDWc9I3RWmAUIVlPQNf3n4McxJCvsZZ9BpQN50Fg== dependencies: - "@lerna/global-options" "6.3.0" + "@lerna/global-options" "6.4.1" dedent "^0.7.0" npmlog "^6.0.2" yargs "^16.2.0" -"@lerna/collect-uncommitted@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-6.3.0.tgz#e00a90dc19e2d69476cb00e1837682416e30e2c7" - integrity sha512-2FgLkPBswLmx6X1opUlqXuKHsb28etdNvqsydKw72wyIIjQs17Kl9gMjHzNvVZhLgsHEgOFKBJ8dIp1C9YwxPQ== +"@lerna/collect-uncommitted@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-6.4.1.tgz#ae62bcaa5ecaa5b7fbc41eb9ae90b6711be156ec" + integrity sha512-5IVQGhlLrt7Ujc5ooYA1Xlicdba/wMcDSnbQwr8ufeqnzV2z4729pLCVk55gmi6ZienH/YeBPHxhB5u34ofE0Q== dependencies: - "@lerna/child-process" "6.3.0" + "@lerna/child-process" "6.4.1" chalk "^4.1.0" npmlog "^6.0.2" -"@lerna/collect-updates@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-6.3.0.tgz#6343fa840e04a4370f81c9131a81223698c4bcd6" - integrity sha512-sGsKBnInLgIO3ZStHuKtUr+uGTRlY+PTxoceTe7K0DEnoPuQP5YvA1fkhXUoT56StM0AjQyxnYuE46M8r+IoyA== +"@lerna/collect-updates@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-6.4.1.tgz#4f7cf1c411f3253d0104e7b64cb0aa315a5dfc81" + integrity sha512-pzw2/FC+nIqYkknUHK9SMmvP3MsLEjxI597p3WV86cEDN3eb1dyGIGuHiKShtjvT08SKSwpTX+3bCYvLVxtC5Q== dependencies: - "@lerna/child-process" "6.3.0" - "@lerna/describe-ref" "6.3.0" + "@lerna/child-process" "6.4.1" + "@lerna/describe-ref" "6.4.1" minimatch "^3.0.4" npmlog "^6.0.2" slash "^3.0.0" -"@lerna/command@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/command/-/command-6.3.0.tgz#395a6eefc280a06f0ee967a70353c76f5a914f06" - integrity sha512-EtPBiiovh7o0WlvkgXXLR+gDoV2usDCVHUrmykH+D6zKaQ4Dz+QQofDBnepxVBaESwWm8SgAXOL8t4aqnUQifg== - dependencies: - "@lerna/child-process" "6.3.0" - "@lerna/package-graph" "6.3.0" - "@lerna/project" "6.3.0" - "@lerna/validation-error" "6.3.0" - "@lerna/write-log-file" "6.3.0" +"@lerna/command@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/command/-/command-6.4.1.tgz#96c4f5d88792c6c638738c66fcc3a7ad0d2487e2" + integrity sha512-3Lifj8UTNYbRad8JMP7IFEEdlIyclWyyvq/zvNnTS9kCOEymfmsB3lGXr07/AFoi6qDrvN64j7YSbPZ6C6qonw== + dependencies: + "@lerna/child-process" "6.4.1" + "@lerna/package-graph" "6.4.1" + "@lerna/project" "6.4.1" + "@lerna/validation-error" "6.4.1" + "@lerna/write-log-file" "6.4.1" clone-deep "^4.0.1" dedent "^0.7.0" execa "^5.0.0" is-ci "^2.0.0" npmlog "^6.0.2" -"@lerna/conventional-commits@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-6.3.0.tgz#0b3c76b12aead8c243712d037b1894a74ac98502" - integrity sha512-6wyMDApEAn0WGHOGpfnC3O7wqhteZvr2wQymP8VLSpedeBRi+HyZspmWY8hNfVi7uce1C+JmJFN1mpPuaAVbTg== +"@lerna/conventional-commits@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-6.4.1.tgz#b8d44a8a71865b4d37b900137acef623f3a0a11b" + integrity sha512-NIvCOjStjQy5O8VojB7/fVReNNDEJOmzRG2sTpgZ/vNS4AzojBQZ/tobzhm7rVkZZ43R9srZeuhfH9WgFsVUSA== dependencies: - "@lerna/validation-error" "6.3.0" + "@lerna/validation-error" "6.4.1" conventional-changelog-angular "^5.0.12" conventional-changelog-core "^4.2.4" conventional-recommended-bump "^6.1.0" @@ -913,24 +913,24 @@ pify "^5.0.0" semver "^7.3.4" -"@lerna/create-symlink@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-6.3.0.tgz#b024063fdc8c26967b953ad2e1282e996fb44c19" - integrity sha512-ozzPFJsYCPPedKRzEE7YuXM5sNf1BNCPahJ8mmqW1/OI8JfR00yNIrFxhjEQsuU0VSwn5dgDEWjYuEh22q/QJA== +"@lerna/create-symlink@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-6.4.1.tgz#0efec22d78dd814a70d8345ced52c39beb05874b" + integrity sha512-rNivHFYV1GAULxnaTqeGb2AdEN2OZzAiZcx5CFgj45DWXQEGwPEfpFmCSJdXhFZbyd3K0uiDlAXjAmV56ov3FQ== dependencies: cmd-shim "^5.0.0" fs-extra "^9.1.0" npmlog "^6.0.2" -"@lerna/create@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/create/-/create-6.3.0.tgz#1a69958bcb069737b9a98b7147c6a25bcd2ac301" - integrity sha512-VQMzfN8ZoC7v4dt/Q87f+BNe2G7xLEz8N4Yb6TVFGQevYulkLMfzU4ycQARhGdKL+lS53V2n+CivMdfM3OuTuw== +"@lerna/create@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/create/-/create-6.4.1.tgz#3fc8556adadff1265432a6cee69ee14465798e71" + integrity sha512-qfQS8PjeGDDlxEvKsI/tYixIFzV2938qLvJohEKWFn64uvdLnXCamQ0wvRJST8p1ZpHWX4AXrB+xEJM3EFABrA== dependencies: - "@lerna/child-process" "6.3.0" - "@lerna/command" "6.3.0" - "@lerna/npm-conf" "6.3.0" - "@lerna/validation-error" "6.3.0" + "@lerna/child-process" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/npm-conf" "6.4.1" + "@lerna/validation-error" "6.4.1" dedent "^0.7.0" fs-extra "^9.1.0" init-package-json "^3.0.2" @@ -944,218 +944,218 @@ validate-npm-package-name "^4.0.0" yargs-parser "20.2.4" -"@lerna/describe-ref@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-6.3.0.tgz#4de44e6f02f760833a52eea82817ffbf753a2471" - integrity sha512-qgpD7qLeAA9LONNFNrzkBz+nveVH0FxYaB8WHyfspjdvXpBU7GuyA6TIUT3sM0ufPhn0lu1jKji0Zq5w7RmJNg== +"@lerna/describe-ref@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-6.4.1.tgz#c0a0beca5dfeada3a39b030f69c8c98f5623bb13" + integrity sha512-MXGXU8r27wl355kb1lQtAiu6gkxJ5tAisVJvFxFM1M+X8Sq56icNoaROqYrvW6y97A9+3S8Q48pD3SzkFv31Xw== dependencies: - "@lerna/child-process" "6.3.0" + "@lerna/child-process" "6.4.1" npmlog "^6.0.2" -"@lerna/diff@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-6.3.0.tgz#5e444dc130de2a9c4ea6a3f45e872c6e17a1b583" - integrity sha512-0J9W0jPXp/b5/wtAgXyT/PIc1kqfH+Kd7gdzenZSI1uGpFHcZx8VnsCnc9Xq8B62k6YCpmw0jcW79THRWTEC3Q== +"@lerna/diff@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-6.4.1.tgz#ca9e62a451ce199faaa7ef5990ded3fad947e2f9" + integrity sha512-TnzJsRPN2fOjUrmo5Boi43fJmRtBJDsVgwZM51VnLoKcDtO1kcScXJ16Od2Xx5bXbp5dES5vGDLL/USVVWfeAg== dependencies: - "@lerna/child-process" "6.3.0" - "@lerna/command" "6.3.0" - "@lerna/validation-error" "6.3.0" + "@lerna/child-process" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/validation-error" "6.4.1" npmlog "^6.0.2" -"@lerna/exec@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-6.3.0.tgz#596f99b484f80f5518b9fde4b282dee82cc01e0e" - integrity sha512-f++DKi9MgmaY+WXhICPoied6G2BfB0U+Q6erqdsGXVfeeZcVLzuWcVckYPg6CmVHx4pvQskeV6b07zvuX5v0PQ== - dependencies: - "@lerna/child-process" "6.3.0" - "@lerna/command" "6.3.0" - "@lerna/filter-options" "6.3.0" - "@lerna/profiler" "6.3.0" - "@lerna/run-topologically" "6.3.0" - "@lerna/validation-error" "6.3.0" +"@lerna/exec@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-6.4.1.tgz#493ce805b6959e8299ec58fab8d31fd01ed209ba" + integrity sha512-KAWfuZpoyd3FMejHUORd0GORMr45/d9OGAwHitfQPVs4brsxgQFjbbBEEGIdwsg08XhkDb4nl6IYVASVTq9+gA== + dependencies: + "@lerna/child-process" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/filter-options" "6.4.1" + "@lerna/profiler" "6.4.1" + "@lerna/run-topologically" "6.4.1" + "@lerna/validation-error" "6.4.1" p-map "^4.0.0" -"@lerna/filter-options@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-6.3.0.tgz#d871a1ab838cc926a23f895f35ae7f96c385a294" - integrity sha512-hnOZxn9mUhbNU1L7F4e6IwIpp0ci3/doyLtE/46jLqgupBl33kicqI9gyoO9fYt2wt/0YSOPOILqDP6KaQc+kw== +"@lerna/filter-options@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-6.4.1.tgz#571d37436878fab8b2ac84ca1c3863acd3515cfb" + integrity sha512-efJh3lP2T+9oyNIP2QNd9EErf0Sm3l3Tz8CILMsNJpjSU6kO43TYWQ+L/ezu2zM99KVYz8GROLqDcHRwdr8qUA== dependencies: - "@lerna/collect-updates" "6.3.0" - "@lerna/filter-packages" "6.3.0" + "@lerna/collect-updates" "6.4.1" + "@lerna/filter-packages" "6.4.1" dedent "^0.7.0" npmlog "^6.0.2" -"@lerna/filter-packages@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-6.3.0.tgz#c3eeb1dd00b446971c2657bb4c829a94793ce8ad" - integrity sha512-SdWO+nKkKakOtiqcBqkdPODVz1AdD4dnvCIhzE3R14k0rjX2cI+i/044qbxRWSlegqveFziiuyR5Op5kZK+68w== +"@lerna/filter-packages@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-6.4.1.tgz#e138b182816a049c81de094069cad12aaa41a236" + integrity sha512-LCMGDGy4b+Mrb6xkcVzp4novbf5MoZEE6ZQF1gqG0wBWqJzNcKeFiOmf352rcDnfjPGZP6ct5+xXWosX/q6qwg== dependencies: - "@lerna/validation-error" "6.3.0" + "@lerna/validation-error" "6.4.1" multimatch "^5.0.0" npmlog "^6.0.2" -"@lerna/get-npm-exec-opts@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-6.3.0.tgz#bbc01f06d5e1e5fa818256e1ab56eb90f53e0915" - integrity sha512-OlNF2x7Q0omSGQF5YBcOadXqn3n1Dhm5m5jw2t1Z/7ryHBqobpZ0wNmFupTgQCquHX/+MDkz8pIPvG6uPlb7SQ== +"@lerna/get-npm-exec-opts@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-6.4.1.tgz#42681f6db4238277889b3423f87308eda5dc01ec" + integrity sha512-IvN/jyoklrWcjssOf121tZhOc16MaFPOu5ii8a+Oy0jfTriIGv929Ya8MWodj75qec9s+JHoShB8yEcMqZce4g== dependencies: npmlog "^6.0.2" -"@lerna/get-packed@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-6.3.0.tgz#b779852fe6b6c596fb8f3acd52fead843c397c49" - integrity sha512-YFsPDErYMxd+FvLyhYGoZzheYIwyev3ygAwqfnoQ4oZzXbUCqq3jrOiI/26jyt6z32tAxMtac6Mh6u0FlbK4jw== +"@lerna/get-packed@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-6.4.1.tgz#b3b8b907002d50bf8792dd97e2729249c0b0e0cd" + integrity sha512-uaDtYwK1OEUVIXn84m45uPlXShtiUcw6V9TgB3rvHa3rrRVbR7D4r+JXcwVxLGrAS7LwxVbYWEEO/Z/bX7J/Lg== dependencies: fs-extra "^9.1.0" ssri "^9.0.1" tar "^6.1.0" -"@lerna/github-client@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-6.3.0.tgz#df1ac69a4d5edbe2c74317e40b2c9055a153cf41" - integrity sha512-/ElVBT+msyiazYbG9E1w1qcWRtr53v57vy0nZwptWXRmdGSpxWyMHGFC8y+KGYyMDNaEXryAzHj0eZjI3Of/hg== +"@lerna/github-client@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-6.4.1.tgz#25d19b440395a6039b9162ee58dadb9dce990ff0" + integrity sha512-ridDMuzmjMNlcDmrGrV9mxqwUKzt9iYqCPwVYJlRYrnE3jxyg+RdooquqskVFj11djcY6xCV2Q2V1lUYwF+PmA== dependencies: - "@lerna/child-process" "6.3.0" + "@lerna/child-process" "6.4.1" "@octokit/plugin-enterprise-rest" "^6.0.1" "@octokit/rest" "^19.0.3" git-url-parse "^13.1.0" npmlog "^6.0.2" -"@lerna/gitlab-client@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/gitlab-client/-/gitlab-client-6.3.0.tgz#a382aa15a32066b3d6f93631370ad7a37c2c3c58" - integrity sha512-iLPWMuK7B+ur5HZgexZrqLrmoWxJXx8QCDv7j25V8ZJmYmRkSqb0HCZHDn+ggvb0WHg+1RvUlvSUt5p+k5q9Zw== +"@lerna/gitlab-client@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/gitlab-client/-/gitlab-client-6.4.1.tgz#a01d962dc52a55b8272ea52bc54d72c5fd9db6f9" + integrity sha512-AdLG4d+jbUvv0jQyygQUTNaTCNSMDxioJso6aAjQ/vkwyy3fBJ6FYzX74J4adSfOxC2MQZITFyuG+c9ggp7pyQ== dependencies: node-fetch "^2.6.1" npmlog "^6.0.2" -"@lerna/global-options@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-6.3.0.tgz#4b34014e85004d894744ce3d2c8dbc36b6cc45aa" - integrity sha512-MvG3uZFRXqvPa2iE8br5ogi/wloJYQlCa3g51BNohJcSGjZRQyg/igPS8vnRH+tOQM3dhlQSSN4TmPxlh+1vGg== +"@lerna/global-options@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-6.4.1.tgz#7df76b1d38500606a8dc3ce0804bab6894c4f4a3" + integrity sha512-UTXkt+bleBB8xPzxBPjaCN/v63yQdfssVjhgdbkQ//4kayaRA65LyEtJTi9rUrsLlIy9/rbeb+SAZUHg129fJg== -"@lerna/has-npm-version@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-6.3.0.tgz#ffde722d83dbaf5be177cd5ea42bb43f4704c82c" - integrity sha512-aaD/H1MEgSrjPvEArgSt23Eqx3YIExAzeidDHyhDMRerbs7BqKGhbsyGAybXL8tHTZcdCMVlSBAXgLMOoH8VCg== +"@lerna/has-npm-version@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-6.4.1.tgz#04eba7df687e665294834253b659430efc1e01bb" + integrity sha512-vW191w5iCkwNWWWcy4542ZOpjKYjcP/pU3o3+w6NM1J3yBjWZcNa8lfzQQgde2QkGyNi+i70o6wIca1o0sdKwg== dependencies: - "@lerna/child-process" "6.3.0" + "@lerna/child-process" "6.4.1" semver "^7.3.4" -"@lerna/import@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/import/-/import-6.3.0.tgz#a6a57b72c2128875b6a1f8349d87d1497e363d95" - integrity sha512-95utKmEKZsQFanKd8BK1w9OhtYXAw9LtsO0jlD3YdacUtrZewUpxhFq9x2GI/7pxFFUSDjhJPISh2AYKucH8pQ== - dependencies: - "@lerna/child-process" "6.3.0" - "@lerna/command" "6.3.0" - "@lerna/prompt" "6.3.0" - "@lerna/pulse-till-done" "6.3.0" - "@lerna/validation-error" "6.3.0" +"@lerna/import@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/import/-/import-6.4.1.tgz#b5696fed68a32d32398d66f95192267f1da5110e" + integrity sha512-oDg8g1PNrCM1JESLsG3rQBtPC+/K9e4ohs0xDKt5E6p4l7dc0Ib4oo0oCCT/hGzZUlNwHxrc2q9JMRzSAn6P/Q== + dependencies: + "@lerna/child-process" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/prompt" "6.4.1" + "@lerna/pulse-till-done" "6.4.1" + "@lerna/validation-error" "6.4.1" dedent "^0.7.0" fs-extra "^9.1.0" p-map-series "^2.1.0" -"@lerna/info@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/info/-/info-6.3.0.tgz#0da9449d7dd7854b494833bb441b55ad9ab0773e" - integrity sha512-AwHc/Qq70+NvY6fvl4+8CLXSAj3hjB9YBOcGSxjRJ/vawL1zU9TIV3vOUx6+t0IWAK+DFgvKSrZ3a23CEef3ug== +"@lerna/info@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/info/-/info-6.4.1.tgz#30354fcb82c99b1f0ed753f957fbaca5b250c3fa" + integrity sha512-Ks4R7IndIr4vQXz+702gumPVhH6JVkshje0WKA3+ew2qzYZf68lU1sBe1OZsQJU3eeY2c60ax+bItSa7aaIHGw== dependencies: - "@lerna/command" "6.3.0" - "@lerna/output" "6.3.0" + "@lerna/command" "6.4.1" + "@lerna/output" "6.4.1" envinfo "^7.7.4" -"@lerna/init@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/init/-/init-6.3.0.tgz#12bf227da3ae091f2e537f1329d1addb632c7d9c" - integrity sha512-pVTuLGyC7GrdaDzUvy7Jzj9R+wCI1W7fm+VuVCEv8SR3iVao0sUCXh73jMfOIxQXGXqgpqKywp1WL4QbluhVGw== +"@lerna/init@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/init/-/init-6.4.1.tgz#ea4905ca976189db4b0bf04d78919060146bf684" + integrity sha512-CXd/s/xgj0ZTAoOVyolOTLW2BG7uQOhWW4P/ktlwwJr9s3c4H/z+Gj36UXw3q5X1xdR29NZt7Vc6fvROBZMjUQ== dependencies: - "@lerna/child-process" "6.3.0" - "@lerna/command" "6.3.0" - "@lerna/project" "6.3.0" + "@lerna/child-process" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/project" "6.4.1" fs-extra "^9.1.0" p-map "^4.0.0" write-json-file "^4.3.0" -"@lerna/link@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/link/-/link-6.3.0.tgz#e2530aa161082c775d278f93a71ec7727c83f0b5" - integrity sha512-BeLEXdF4R8FwqVET95qXOQNHLnWTfdmcpE8pEiEXr+Gux6OEFASFt54arFLO7XMyPOSAO31wIU9ue2I+dPb/CQ== +"@lerna/link@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/link/-/link-6.4.1.tgz#f31ed1f6aea1581e358a9ff545be78b61e923175" + integrity sha512-O8Rt7MAZT/WT2AwrB/+HY76ktnXA9cDFO9rhyKWZGTHdplbzuJgfsGzu8Xv0Ind+w+a8xLfqtWGPlwiETnDyrw== dependencies: - "@lerna/command" "6.3.0" - "@lerna/package-graph" "6.3.0" - "@lerna/symlink-dependencies" "6.3.0" - "@lerna/validation-error" "6.3.0" + "@lerna/command" "6.4.1" + "@lerna/package-graph" "6.4.1" + "@lerna/symlink-dependencies" "6.4.1" + "@lerna/validation-error" "6.4.1" p-map "^4.0.0" slash "^3.0.0" -"@lerna/list@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/list/-/list-6.3.0.tgz#85bd2aae8f5f794ec68d4914c0d4491caaf09573" - integrity sha512-0+T4kITNq5ojrAQ9pKBA2vSyKD9ZsTSzf13b4twDaH7qvgixP+ukTGnwWDFld3kg/5wNLjj13ZMgGXkbdnDaZw== +"@lerna/list@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/list/-/list-6.4.1.tgz#12ad83902e148d1e5ba007149b72b14636f9f1ba" + integrity sha512-7a6AKgXgC4X7nK6twVPNrKCiDhrCiAhL/FE4u9HYhHqw9yFwyq8Qe/r1RVOkAOASNZzZ8GuBvob042bpunupCw== dependencies: - "@lerna/command" "6.3.0" - "@lerna/filter-options" "6.3.0" - "@lerna/listable" "6.3.0" - "@lerna/output" "6.3.0" + "@lerna/command" "6.4.1" + "@lerna/filter-options" "6.4.1" + "@lerna/listable" "6.4.1" + "@lerna/output" "6.4.1" -"@lerna/listable@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-6.3.0.tgz#bc74d424341bf8a252fa2efb696f3e91c54838dc" - integrity sha512-b0eytzZ8TLlovADaUDM8k0PuLhpvg7O5dblP9SWZoyFy2BkDIhbpVZQGQcoiEghEHdXhsEiYAsaVMxsEbx7+eQ== +"@lerna/listable@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-6.4.1.tgz#6f5c83865391c6beeb41802951c674e2de119bde" + integrity sha512-L8ANeidM10aoF8aL3L/771Bb9r/TRkbEPzAiC8Iy2IBTYftS87E3rT/4k5KBEGYzMieSKJaskSFBV0OQGYV1Cw== dependencies: - "@lerna/query-graph" "6.3.0" + "@lerna/query-graph" "6.4.1" chalk "^4.1.0" columnify "^1.6.0" -"@lerna/log-packed@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-6.3.0.tgz#397a008b7257760b3da6628e2a7b967d86cde239" - integrity sha512-tREuXKswpbPpFX+h0wPYOX9WdytfztdiSHggmSwH8dS5dC0mpf19MYapYN8QsLFvTWiSpZAo6JASqHIlSHPIpA== +"@lerna/log-packed@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-6.4.1.tgz#43eae50d5c0cd906b1977a58b62b35541cf89ec1" + integrity sha512-Pwv7LnIgWqZH4vkM1rWTVF+pmWJu7d0ZhVwyhCaBJUsYbo+SyB2ZETGygo3Z/A+vZ/S7ImhEEKfIxU9bg5lScQ== dependencies: byte-size "^7.0.0" columnify "^1.6.0" has-unicode "^2.0.1" npmlog "^6.0.2" -"@lerna/npm-conf@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-6.3.0.tgz#70b8419f5be939dde6d942ab82e43a0b9c3d4fca" - integrity sha512-8wnsmwXwbA0R3lTykv/Kn9WsFpg/iK68OuqTlXi8gVJEKDKkCmUHEO+6xUZynr1cS6LOQA6Pzcu4tA0rF0vu9g== +"@lerna/npm-conf@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-6.4.1.tgz#64dba237ff41472a24f96192669c1bc0dce15edb" + integrity sha512-Q+83uySGXYk3n1pYhvxtzyGwBGijYgYecgpiwRG1YNyaeGy+Mkrj19cyTWubT+rU/kM5c6If28+y9kdudvc7zQ== dependencies: config-chain "^1.1.12" pify "^5.0.0" -"@lerna/npm-dist-tag@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-6.3.0.tgz#6deda086592d6b6f54165cd46d70e030a0e662ee" - integrity sha512-ypimtgfkhMKPIpnXV+P1DQn/t0xasErujDvP23Ga51TTpwkbBVINAOV+u9CvI1jOzQ2SKHDkF6l/24D1nA5WNg== +"@lerna/npm-dist-tag@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-6.4.1.tgz#f14e7176f7e323284e8aa8636b44818a61738fd1" + integrity sha512-If1Hn4q9fn0JWuBm455iIZDWE6Fsn4Nv8Tpqb+dYf0CtoT5Hn+iT64xSiU5XJw9Vc23IR7dIujkEXm2MVbnvZw== dependencies: - "@lerna/otplease" "6.3.0" + "@lerna/otplease" "6.4.1" npm-package-arg "8.1.1" npm-registry-fetch "^13.3.0" npmlog "^6.0.2" -"@lerna/npm-install@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-6.3.0.tgz#6ba385ebaa8616ee5ff124483730a6f1ca05c31c" - integrity sha512-HGmAN38t3SdO9G5UCjnBYofU8Ng/zp8bwSY1o/GjhGn8JrXY7C+buQ/C5Lvtk6RUEMIGoMdbURLuShPEnH77Gw== +"@lerna/npm-install@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-6.4.1.tgz#99f5748cb43de9786ea2b538c94a7183d38fc476" + integrity sha512-7gI1txMA9qTaT3iiuk/8/vL78wIhtbbOLhMf8m5yQ2G+3t47RUA8MNgUMsq4Zszw9C83drayqesyTf0u8BzVRg== dependencies: - "@lerna/child-process" "6.3.0" - "@lerna/get-npm-exec-opts" "6.3.0" + "@lerna/child-process" "6.4.1" + "@lerna/get-npm-exec-opts" "6.4.1" fs-extra "^9.1.0" npm-package-arg "8.1.1" npmlog "^6.0.2" signal-exit "^3.0.3" write-pkg "^4.0.0" -"@lerna/npm-publish@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-6.3.0.tgz#5824e953aeda9a9d7e5aded0577e40a5ce74b00f" - integrity sha512-V25wNY7xl96kOgV1ObNliS+i+lic8FOuZUm+A0Xy1chuAFRNYIPpQVe4S/0aimRRgeishoU+2bJYTqP+JNQdoQ== +"@lerna/npm-publish@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-6.4.1.tgz#baf07b108ae8b32932612db63206bcd5b5ee0e88" + integrity sha512-lbNEg+pThPAD8lIgNArm63agtIuCBCF3umxvgTQeLzyqUX6EtGaKJFyz/6c2ANcAuf8UfU7WQxFFbOiolibXTQ== dependencies: - "@lerna/otplease" "6.3.0" - "@lerna/run-lifecycle" "6.3.0" + "@lerna/otplease" "6.4.1" + "@lerna/run-lifecycle" "6.4.1" fs-extra "^9.1.0" libnpmpublish "^6.0.4" npm-package-arg "8.1.1" @@ -1163,85 +1163,85 @@ pify "^5.0.0" read-package-json "^5.0.1" -"@lerna/npm-run-script@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-6.3.0.tgz#c7b0ce417e1c250c6fef8a367a9dbd9aa6d122a0" - integrity sha512-vzFtHABhFlvp5ehRHe7rAZlHOpItCPhixmli7kv1ULrPyoflnHRF7hQSQH0G/vPOQ+5Kf8pAWJ6YlmMRwG3bGA== +"@lerna/npm-run-script@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-6.4.1.tgz#86db4f15d359b8a371db666aa51c9b2b87b602f3" + integrity sha512-HyvwuyhrGqDa1UbI+pPbI6v+wT6I34R0PW3WCADn6l59+AyqLOCUQQr+dMW7jdYNwjO6c/Ttbvj4W58EWsaGtQ== dependencies: - "@lerna/child-process" "6.3.0" - "@lerna/get-npm-exec-opts" "6.3.0" + "@lerna/child-process" "6.4.1" + "@lerna/get-npm-exec-opts" "6.4.1" npmlog "^6.0.2" -"@lerna/otplease@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-6.3.0.tgz#831c938d0f348083127a489cf50f7ec4539e2da3" - integrity sha512-fEsaI3oehsxQ4wFXmtYzuVjNUigKMN10HorUsXZlsoZGJ+M+l5KbHUYbwjMjSqmxqqWLXCvsNi9eRKAqJegjnQ== +"@lerna/otplease@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-6.4.1.tgz#9573e053c43e7139442da96fe655aa02749cb8a3" + integrity sha512-ePUciFfFdythHNMp8FP5K15R/CoGzSLVniJdD50qm76c4ATXZHnGCW2PGwoeAZCy4QTzhlhdBq78uN0wAs75GA== dependencies: - "@lerna/prompt" "6.3.0" + "@lerna/prompt" "6.4.1" -"@lerna/output@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/output/-/output-6.3.0.tgz#52d2da9b2947521f25afd825c90f4d74618d77e5" - integrity sha512-T88KWZYMbpdODbV6mrdDdlVKS7SUHKyJ1TcfjVl1c+RXWaks9v4m027zPZF4KE4qy89FGD23pqWUiUQewc7hIQ== +"@lerna/output@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/output/-/output-6.4.1.tgz#327baf768b8fb63db9d52f68288d387379f814f7" + integrity sha512-A1yRLF0bO+lhbIkrryRd6hGSD0wnyS1rTPOWJhScO/Zyv8vIPWhd2fZCLR1gI2d/Kt05qmK3T/zETTwloK7Fww== dependencies: npmlog "^6.0.2" -"@lerna/pack-directory@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-6.3.0.tgz#08b74b28e9ba092b34ede700428a14efbc8d6399" - integrity sha512-3gYvmc/jLvSsXUI/zvp28mrXGkk1Yu/QshJKKxrI4b3B6m9OWzxAmGpK/pwvoNEe/iwcOFD3ZB4um7jcLW6U9A== +"@lerna/pack-directory@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-6.4.1.tgz#e78aae4e7944057d8fc6cb4dd8ae50be7a95c2fd" + integrity sha512-kBtDL9bPP72/Nl7Gqa2CA3Odb8CYY1EF2jt801f+B37TqRLf57UXQom7yF3PbWPCPmhoU+8Fc4RMpUwSbFC46Q== dependencies: - "@lerna/get-packed" "6.3.0" - "@lerna/package" "6.3.0" - "@lerna/run-lifecycle" "6.3.0" - "@lerna/temp-write" "6.3.0" + "@lerna/get-packed" "6.4.1" + "@lerna/package" "6.4.1" + "@lerna/run-lifecycle" "6.4.1" + "@lerna/temp-write" "6.4.1" npm-packlist "^5.1.1" npmlog "^6.0.2" tar "^6.1.0" -"@lerna/package-graph@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-6.3.0.tgz#b7667847da211c67b73b608be392ce3be826722d" - integrity sha512-79S4DzxL4tkADAtSRgZ7o7mHdaWU9QN75UrxBnMjw/5KvBgX/o5r59FpAKxLHEFgo3fLbVHXxyGpPNBT/8ikpg== +"@lerna/package-graph@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-6.4.1.tgz#7a18024d531f0bd88609944e572b4861f0f8868f" + integrity sha512-fQvc59stRYOqxT3Mn7g/yI9/Kw5XetJoKcW5l8XeqKqcTNDURqKnN0qaNBY6lTTLOe4cR7gfXF2l1u3HOz0qEg== dependencies: - "@lerna/prerelease-id-from-version" "6.3.0" - "@lerna/validation-error" "6.3.0" + "@lerna/prerelease-id-from-version" "6.4.1" + "@lerna/validation-error" "6.4.1" npm-package-arg "8.1.1" npmlog "^6.0.2" semver "^7.3.4" -"@lerna/package@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/package/-/package-6.3.0.tgz#869ab54ee3868ca2f6298bfeff9890035553bfcc" - integrity sha512-u/m7Kvs72SqWchIOX2sTZAI87bcgUAUXEmCdwt5lnT50w3LADr57OtPJh8UhBW7SmdLgDoz3SsTLc5psZi12lw== +"@lerna/package@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/package/-/package-6.4.1.tgz#ebbd4c5f58f4b6cf77019271a686be9585272a3b" + integrity sha512-TrOah58RnwS9R8d3+WgFFTu5lqgZs7M+e1dvcRga7oSJeKscqpEK57G0xspvF3ycjfXQwRMmEtwPmpkeEVLMzA== dependencies: load-json-file "^6.2.0" npm-package-arg "8.1.1" write-pkg "^4.0.0" -"@lerna/prerelease-id-from-version@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-6.3.0.tgz#374f49a3807b3eb7172c59f6d58c27ef3789d7eb" - integrity sha512-kyGOMEdtYzG2luhg26uIy9fsnyHO70Uu3KW2C92D4UI9oTLYqfbf8o5pCa3d3GifOMoRmYf9OzJtJitERYAyOw== +"@lerna/prerelease-id-from-version@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-6.4.1.tgz#65eb1835cdfd112783eea6b596812c64f535386b" + integrity sha512-uGicdMFrmfHXeC0FTosnUKRgUjrBJdZwrmw7ZWMb5DAJGOuTzrvJIcz5f0/eL3XqypC/7g+9DoTgKjX3hlxPZA== dependencies: semver "^7.3.4" -"@lerna/profiler@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/profiler/-/profiler-6.3.0.tgz#473d680f8550f1d50ef73247956a0ac65e8aa5d2" - integrity sha512-KzV3bI9/17YRXaiGZankkTg9FZotliUYfUaz4WhL/iSjYwx8sHD7GicsNQD2wMtkyNCfR/OsZ0jVDs9B7d0qPw== +"@lerna/profiler@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/profiler/-/profiler-6.4.1.tgz#0d5e017e1389e35960d671f43db7eb16337fda1b" + integrity sha512-dq2uQxcu0aq6eSoN+JwnvHoAnjtZAVngMvywz5bTAfzz/sSvIad1v8RCpJUMBQHxaPtbfiNvOIQgDZOmCBIM4g== dependencies: fs-extra "^9.1.0" npmlog "^6.0.2" upath "^2.0.1" -"@lerna/project@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/project/-/project-6.3.0.tgz#61fd197a69c8385414196b1eafbf38b9957f78a0" - integrity sha512-ZDMl2GYDyCw4bCdcLFyvg4b3txLor1u3rqvZdhfhjLMDD8alZ56IItSEIR//dpI0jSLVGBFe214ZC5hFz/GrpA== +"@lerna/project@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/project/-/project-6.4.1.tgz#0519323aa8bde5b73fc0bf1c428385a556a445f0" + integrity sha512-BPFYr4A0mNZ2jZymlcwwh7PfIC+I6r52xgGtJ4KIrIOB6mVKo9u30dgYJbUQxmSuMRTOnX7PJZttQQzSda4gEg== dependencies: - "@lerna/package" "6.3.0" - "@lerna/validation-error" "6.3.0" + "@lerna/package" "6.4.1" + "@lerna/validation-error" "6.4.1" cosmiconfig "^7.0.0" dedent "^0.7.0" dot-prop "^6.0.1" @@ -1254,38 +1254,38 @@ resolve-from "^5.0.0" write-json-file "^4.3.0" -"@lerna/prompt@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-6.3.0.tgz#bceb81b8070ef78c0134668560853dde472ecff0" - integrity sha512-Q3b0xFRTrustHwvAuQUIh6c6ZTL3WyuwvymPlC7PaeW4BKVLZoK1lAjMyypDLFiEApp0GadNmOAMXJdAdw3Vtg== +"@lerna/prompt@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-6.4.1.tgz#5ede06b4c8e17ec3045180b10ec5bd313cbc8585" + integrity sha512-vMxCIgF9Vpe80PnargBGAdS/Ib58iYEcfkcXwo7mYBCxEVcaUJFKZ72FEW8rw+H5LkxBlzrBJyfKRoOe0ks9gQ== dependencies: inquirer "^8.2.4" npmlog "^6.0.2" -"@lerna/publish@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-6.3.0.tgz#c3a563cb70bd24a47b3d251e463146a16d40d4c1" - integrity sha512-RZQBsD72wCQnzku8U1ov0kTvM8fkyzmuqI6m4tyrWtSGzNk8iALzJ8dBUD8DHkvcauLrdqB4HTKC2IPACeuFqg== - dependencies: - "@lerna/check-working-tree" "6.3.0" - "@lerna/child-process" "6.3.0" - "@lerna/collect-updates" "6.3.0" - "@lerna/command" "6.3.0" - "@lerna/describe-ref" "6.3.0" - "@lerna/log-packed" "6.3.0" - "@lerna/npm-conf" "6.3.0" - "@lerna/npm-dist-tag" "6.3.0" - "@lerna/npm-publish" "6.3.0" - "@lerna/otplease" "6.3.0" - "@lerna/output" "6.3.0" - "@lerna/pack-directory" "6.3.0" - "@lerna/prerelease-id-from-version" "6.3.0" - "@lerna/prompt" "6.3.0" - "@lerna/pulse-till-done" "6.3.0" - "@lerna/run-lifecycle" "6.3.0" - "@lerna/run-topologically" "6.3.0" - "@lerna/validation-error" "6.3.0" - "@lerna/version" "6.3.0" +"@lerna/publish@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-6.4.1.tgz#e1bdfa67297ca4a3054863e7acfc8482bf613c35" + integrity sha512-/D/AECpw2VNMa1Nh4g29ddYKRIqygEV1ftV8PYXVlHpqWN7VaKrcbRU6pn0ldgpFlMyPtESfv1zS32F5CQ944w== + dependencies: + "@lerna/check-working-tree" "6.4.1" + "@lerna/child-process" "6.4.1" + "@lerna/collect-updates" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/describe-ref" "6.4.1" + "@lerna/log-packed" "6.4.1" + "@lerna/npm-conf" "6.4.1" + "@lerna/npm-dist-tag" "6.4.1" + "@lerna/npm-publish" "6.4.1" + "@lerna/otplease" "6.4.1" + "@lerna/output" "6.4.1" + "@lerna/pack-directory" "6.4.1" + "@lerna/prerelease-id-from-version" "6.4.1" + "@lerna/prompt" "6.4.1" + "@lerna/pulse-till-done" "6.4.1" + "@lerna/run-lifecycle" "6.4.1" + "@lerna/run-topologically" "6.4.1" + "@lerna/validation-error" "6.4.1" + "@lerna/version" "6.4.1" fs-extra "^9.1.0" libnpmaccess "^6.0.3" npm-package-arg "8.1.1" @@ -1296,99 +1296,100 @@ pacote "^13.6.1" semver "^7.3.4" -"@lerna/pulse-till-done@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-6.3.0.tgz#1f1d8c309b55ea9ef5e598d0fecb5a15d6b05a86" - integrity sha512-VldNIj5TD75ymvCCip81c9s4hlzd52WRpRvYRV2I5i5yTNmSOQbL+8CBdBs1AWVySpRIx7IrUFJFDsCIHYPsfw== +"@lerna/pulse-till-done@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-6.4.1.tgz#85c38a43939bf5e21b61091d0bcf73a1109a59db" + integrity sha512-efAkOC1UuiyqYBfrmhDBL6ufYtnpSqAG+lT4d/yk3CzJEJKkoCwh2Hb692kqHHQ5F74Uusc8tcRB7GBcfNZRWA== dependencies: npmlog "^6.0.2" -"@lerna/query-graph@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-6.3.0.tgz#f3424bbd1390f5d76eb1b8487269578dfbb0bdd5" - integrity sha512-6hnJQiqboRU1yDHGjlDgTAb/y7KUn1NxhwYxU6LQxxitvRhIa7k1abigJpyncmfX8plaof77pIA6gNYgKgdk5A== +"@lerna/query-graph@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-6.4.1.tgz#3c224a49ff392d08ce8aeeaa1af4458f522a2b78" + integrity sha512-gBGZLgu2x6L4d4ZYDn4+d5rxT9RNBC+biOxi0QrbaIq83I+JpHVmFSmExXK3rcTritrQ3JT9NCqb+Yu9tL9adQ== dependencies: - "@lerna/package-graph" "6.3.0" + "@lerna/package-graph" "6.4.1" -"@lerna/resolve-symlink@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-6.3.0.tgz#f27a864a00d24433087c6cb33aa2da2907196bee" - integrity sha512-q63uQreQvzBOPPnaZYXMjJgmmBZP3HlBNSGIb15ZdpNbKbehg/+ysnwcYOkNDSDwSjUx/MtZ+sVRjK42/z8BFQ== +"@lerna/resolve-symlink@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-6.4.1.tgz#ab42dcbd03bc4028ec77ee481c5db8884ebaf40a" + integrity sha512-gnqltcwhWVLUxCuwXWe/ch9WWTxXRI7F0ZvCtIgdfOpbosm3f1g27VO1LjXeJN2i6ks03qqMowqy4xB4uMR9IA== dependencies: fs-extra "^9.1.0" npmlog "^6.0.2" read-cmd-shim "^3.0.0" -"@lerna/rimraf-dir@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-6.3.0.tgz#e5a458aaf8d7bc50653a02d97bf4e74acce606c7" - integrity sha512-+CMkQzYgJa4YYXxrPeN1nvRL3Oa2Uve+9cKWaJQh9gCyZudR0rTO5CHgvjm+NIoaDBC+zHMUj+i1ZEHqK+R/lg== +"@lerna/rimraf-dir@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-6.4.1.tgz#116e379f653135b3ae955dcba703bdf212cab51a" + integrity sha512-5sDOmZmVj0iXIiEgdhCm0Prjg5q2SQQKtMd7ImimPtWKkV0IyJWxrepJFbeQoFj5xBQF7QB5jlVNEfQfKhD6pQ== dependencies: - "@lerna/child-process" "6.3.0" + "@lerna/child-process" "6.4.1" npmlog "^6.0.2" path-exists "^4.0.0" rimraf "^3.0.2" -"@lerna/run-lifecycle@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-6.3.0.tgz#2ef8d1eab33c8a56486b142df6313dff9fc83fc0" - integrity sha512-v9eUqh0lzVqADWYIEiOjBvvQDeZlSA3LMMZfyT4iJFu+vh5bC1l5LYEU1votlrsRpU8y1moXhRM7w4Bq9sM77w== +"@lerna/run-lifecycle@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-6.4.1.tgz#1eac136afae97e197bdb564e67fb385f4d346685" + integrity sha512-42VopI8NC8uVCZ3YPwbTycGVBSgukJltW5Saein0m7TIqFjwSfrcP0n7QJOr+WAu9uQkk+2kBstF5WmvKiqgEA== dependencies: - "@lerna/npm-conf" "6.3.0" + "@lerna/npm-conf" "6.4.1" "@npmcli/run-script" "^4.1.7" npmlog "^6.0.2" p-queue "^6.6.2" -"@lerna/run-topologically@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-6.3.0.tgz#260d514b9eafafe5221163ebbee1ae25bb93b47e" - integrity sha512-fANp3x59wHt8DdyAUbGgWKDboN0EpSr3eZ6zzgrPJ/tYyZBeEdxdN3hh6wZdijtEOAIV1xnBrdInwrzHWAuoXw== +"@lerna/run-topologically@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-6.4.1.tgz#640b07d83f1d1e6d3bc36f81a74957839bb1672f" + integrity sha512-gXlnAsYrjs6KIUGDnHM8M8nt30Amxq3r0lSCNAt+vEu2sMMEOh9lffGGaJobJZ4bdwoXnKay3uER/TU8E9owMw== dependencies: - "@lerna/query-graph" "6.3.0" + "@lerna/query-graph" "6.4.1" p-queue "^6.6.2" -"@lerna/run@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/run/-/run-6.3.0.tgz#8eb58af1d542f197ac7bc96d01f460f8ee0e5c6e" - integrity sha512-ee2xa5siTar28Tmug1omMD6QPdN2ltcuKFYVu/k3uNo9MvhmJzssmk85BnkDcP1ZHoJK2jciAAFeyOU5JukyZQ== - dependencies: - "@lerna/command" "6.3.0" - "@lerna/filter-options" "6.3.0" - "@lerna/npm-run-script" "6.3.0" - "@lerna/output" "6.3.0" - "@lerna/profiler" "6.3.0" - "@lerna/run-topologically" "6.3.0" - "@lerna/timer" "6.3.0" - "@lerna/validation-error" "6.3.0" +"@lerna/run@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/run/-/run-6.4.1.tgz#985279f071ff23ae15f92837f85f979a1352fc01" + integrity sha512-HRw7kS6KNqTxqntFiFXPEeBEct08NjnL6xKbbOV6pXXf+lXUQbJlF8S7t6UYqeWgTZ4iU9caIxtZIY+EpW93mQ== + dependencies: + "@lerna/command" "6.4.1" + "@lerna/filter-options" "6.4.1" + "@lerna/npm-run-script" "6.4.1" + "@lerna/output" "6.4.1" + "@lerna/profiler" "6.4.1" + "@lerna/run-topologically" "6.4.1" + "@lerna/timer" "6.4.1" + "@lerna/validation-error" "6.4.1" fs-extra "^9.1.0" + nx ">=15.4.2 < 16" p-map "^4.0.0" -"@lerna/symlink-binary@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-6.3.0.tgz#137ec5f177d557fddb495d4072ab424b20e3182e" - integrity sha512-KEJo0W3ifwUT5K23nDuSm6+1LYkmvvOCtoQFKfDebRD1PJ1mBX7GLET/0k3/Fss6VZBvVO7kBrR3XRM40V/eaw== +"@lerna/symlink-binary@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-6.4.1.tgz#d8e1b653a7ae9fe38834851c66c92278e3bb25ae" + integrity sha512-poZX90VmXRjL/JTvxaUQPeMDxFUIQvhBkHnH+dwW0RjsHB/2Tu4QUAsE0OlFnlWQGsAtXF4FTtW8Xs57E/19Kw== dependencies: - "@lerna/create-symlink" "6.3.0" - "@lerna/package" "6.3.0" + "@lerna/create-symlink" "6.4.1" + "@lerna/package" "6.4.1" fs-extra "^9.1.0" p-map "^4.0.0" -"@lerna/symlink-dependencies@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-6.3.0.tgz#7caf2e96f652c65c380db299b06d46f30d56b8b4" - integrity sha512-Ur0YoBF61/MYgoHAzUQL8yBtmHJ7zZPBbalVXoJjqlLuXKvxGUaiNpU4B5FF3+ihe8s8veoGwHRG2iKy1srYjQ== +"@lerna/symlink-dependencies@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-6.4.1.tgz#988203cc260406b64d61294367821a0f26419ee6" + integrity sha512-43W2uLlpn3TTYuHVeO/2A6uiTZg6TOk/OSKi21ujD7IfVIYcRYCwCV+8LPP12R3rzyab0JWkWnhp80Z8A2Uykw== dependencies: - "@lerna/create-symlink" "6.3.0" - "@lerna/resolve-symlink" "6.3.0" - "@lerna/symlink-binary" "6.3.0" + "@lerna/create-symlink" "6.4.1" + "@lerna/resolve-symlink" "6.4.1" + "@lerna/symlink-binary" "6.4.1" fs-extra "^9.1.0" p-map "^4.0.0" p-map-series "^2.1.0" -"@lerna/temp-write@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/temp-write/-/temp-write-6.3.0.tgz#99926d47516669e8a453b85ef2c8d86fdab4bd6a" - integrity sha512-lO16B55xj6+ETrM6adggdKj1MPrCZkIDrshbaLKqEVNHLAo+rd6SkhHVyvKT1oP9+BIX10q3yL/bc/szU+euUg== +"@lerna/temp-write@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/temp-write/-/temp-write-6.4.1.tgz#1c46d05b633597c77b0c5f5ab46c1315195f7786" + integrity sha512-7uiGFVoTyos5xXbVQg4bG18qVEn9dFmboXCcHbMj5mc/+/QmU9QeNz/Cq36O5TY6gBbLnyj3lfL5PhzERWKMFg== dependencies: graceful-fs "^4.1.15" is-stream "^2.0.0" @@ -1396,38 +1397,38 @@ temp-dir "^1.0.0" uuid "^8.3.2" -"@lerna/timer@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-6.3.0.tgz#3cecd7f8ddc1b373eddcbe1ac5ee978e3741cfbc" - integrity sha512-BRB5RI2dYSD4TGPbjablUBJNqQHOjdtfqksfSFWRGUHZvRgMmYyDNocQp+mYZO6PPAEuCRpdf5Me3zNlDOtacw== +"@lerna/timer@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-6.4.1.tgz#47fe50b56bd2fc32396a2559f7bb65de8200f07d" + integrity sha512-ogmjFTWwRvevZr76a2sAbhmu3Ut2x73nDIn0bcwZwZ3Qc3pHD8eITdjs/wIKkHse3J7l3TO5BFJPnrvDS7HLnw== -"@lerna/validation-error@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-6.3.0.tgz#81a1b1189295416dced701edcdfb1ce999af5f08" - integrity sha512-XLfMZxxfzql56joLpiLNR0KeivpsYkhJByB11zcWLjErT0HOA/zCRJfJ24vgpyzi5JgFIEpkUZYlsawBuQnfYQ== +"@lerna/validation-error@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-6.4.1.tgz#2cab92c2be395158c3d65fa57ddb73892617d7e8" + integrity sha512-fxfJvl3VgFd7eBfVMRX6Yal9omDLs2mcGKkNYeCEyt4Uwlz1B5tPAXyk/sNMfkKV2Aat/mlK5tnY13vUrMKkyA== dependencies: npmlog "^6.0.2" -"@lerna/version@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/version/-/version-6.3.0.tgz#1f6b5df8626aa519b787df1ac2e5015993bd0041" - integrity sha512-KUJPOiLbPjGHFe4IXxsNSqw3hJJlinrc4bhXklQWGd/OvKjJwTI57/ZeO3ALJIKcRnS57DnPqQCgwr9zZ4UIrw== - dependencies: - "@lerna/check-working-tree" "6.3.0" - "@lerna/child-process" "6.3.0" - "@lerna/collect-updates" "6.3.0" - "@lerna/command" "6.3.0" - "@lerna/conventional-commits" "6.3.0" - "@lerna/github-client" "6.3.0" - "@lerna/gitlab-client" "6.3.0" - "@lerna/output" "6.3.0" - "@lerna/prerelease-id-from-version" "6.3.0" - "@lerna/prompt" "6.3.0" - "@lerna/run-lifecycle" "6.3.0" - "@lerna/run-topologically" "6.3.0" - "@lerna/temp-write" "6.3.0" - "@lerna/validation-error" "6.3.0" - "@nrwl/devkit" ">=14.8.6 < 16" +"@lerna/version@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/version/-/version-6.4.1.tgz#01011364df04240ce92dffed1d2fa76bb9f959ff" + integrity sha512-1/krPq0PtEqDXtaaZsVuKev9pXJCkNC1vOo2qCcn6PBkODw/QTAvGcUi0I+BM2c//pdxge9/gfmbDo1lC8RtAQ== + dependencies: + "@lerna/check-working-tree" "6.4.1" + "@lerna/child-process" "6.4.1" + "@lerna/collect-updates" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/conventional-commits" "6.4.1" + "@lerna/github-client" "6.4.1" + "@lerna/gitlab-client" "6.4.1" + "@lerna/output" "6.4.1" + "@lerna/prerelease-id-from-version" "6.4.1" + "@lerna/prompt" "6.4.1" + "@lerna/run-lifecycle" "6.4.1" + "@lerna/run-topologically" "6.4.1" + "@lerna/temp-write" "6.4.1" + "@lerna/validation-error" "6.4.1" + "@nrwl/devkit" ">=15.4.2 < 16" chalk "^4.1.0" dedent "^0.7.0" load-json-file "^6.2.0" @@ -1441,10 +1442,10 @@ slash "^3.0.0" write-json-file "^4.3.0" -"@lerna/write-log-file@6.3.0": - version "6.3.0" - resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-6.3.0.tgz#a2114816f5f8ddfcfafbe2ae0c085d4c76f1811b" - integrity sha512-Bmb0Z8qaWS47asssdtYY8E73oT4D2jd3LgBiqz6T738woPQcrh+H2L/2Japg95io53XLClBKh6rrfXhFDcdM5g== +"@lerna/write-log-file@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-6.4.1.tgz#b9b959e4b853cdabf0309bc5da1513fa025117ec" + integrity sha512-LE4fueQSDrQo76F4/gFXL0wnGhqdG7WHVH8D8TrKouF2Afl4NHltObCm4WsSMPjcfciVnZQFfx1ruxU4r/enHQ== dependencies: npmlog "^6.0.2" write-file-atomic "^4.0.1" @@ -1682,17 +1683,17 @@ read-package-json-fast "^2.0.3" which "^2.0.2" -"@nrwl/cli@15.4.4": - version "15.4.4" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-15.4.4.tgz#1a0bf08adee8a748ad25c62f84fccdf25b378dde" - integrity sha512-29f1No6eJAZczwVsJTjujyE40Lav6iwkfwTxnoiTUWaHHw9S95a8dMXelUB/BT2Tyf7OOFpwWZMXtDcRktrgGA== +"@nrwl/cli@15.6.3": + version "15.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-15.6.3.tgz#999531d6efb30afc39373bdcbd7e78254a3a3fd3" + integrity sha512-K4E0spofThZXMnhA6R8hkUTdfqmwSnUE2+DlD5Y3jqsvKTAgwF5U41IFkEouFZCf+dWjy0RA20bWoX48EVFtmQ== dependencies: - nx "15.4.4" + nx "15.6.3" -"@nrwl/devkit@>=14.8.6 < 16": - version "15.4.4" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-15.4.4.tgz#6c062bc5834df839a79a7f5cb2a384a9a16b6a23" - integrity sha512-/kDPYyiwRfvtJReE7DrzK/hMtbuhUpO4HQm+TeJvMuxMwCeqSJQP930GUipRqGUfH5aVkbSBkEaa50F7dLE+kg== +"@nrwl/devkit@>=15.4.2 < 16": + version "15.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-15.6.3.tgz#e4e96c53ba3304786a49034286c8511534b2b194" + integrity sha512-/JDvdzNxUM+C1PCZPCrvmFx+OfywqZdOq1GS9QR8C0VctTLG4D/SGSFD88O1SAdcbH/f1mMiBGfEYZYd23fghQ== dependencies: "@phenomnomnominal/tsquery" "4.1.1" ejs "^3.1.7" @@ -1700,12 +1701,12 @@ semver "7.3.4" tslib "^2.3.0" -"@nrwl/tao@15.4.4": - version "15.4.4" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-15.4.4.tgz#d618f03d8697da0626717a29084210c11e7b64ee" - integrity sha512-ekPYVpz1y3XlCPu6UkQfcpwyNHQ0SsXMN8omB4MPTSknvEhKmcVOPG3Kr4W9fk1UjmBr58ItAGmtx2sjVMH7XQ== +"@nrwl/tao@15.6.3": + version "15.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-15.6.3.tgz#b24e11345375dea96bc386c60b9b1102a7584932" + integrity sha512-bDZbPIbU5Mf2BvX0q8GjPxrm1WkYyfW+gp7mLuuJth2sEpZiCr47mSwuGko/y4CKXvIX46VQcAS0pKQMKugXsg== dependencies: - nx "15.4.4" + nx "15.6.3" "@octokit/auth-token@^2.4.4": version "2.5.0" @@ -1715,11 +1716,11 @@ "@octokit/types" "^6.0.3" "@octokit/auth-token@^3.0.0": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-3.0.2.tgz#a0fc8de149fd15876e1ac78f6525c1c5ab48435f" - integrity sha512-pq7CwIMV1kmzkFTimdwjAINCXKTajZErLB4wMLYapR2nuB/Jpr66+05wOTZMSCBXP6n4DdDWT2W19Bm17vU69Q== + version "3.0.3" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-3.0.3.tgz#ce7e48a3166731f26068d7a7a7996b5da58cbe0c" + integrity sha512-/aFM2M4HVDBT/jjDBa84sJniv1t9Gm/rLkalaz9htOm+L+8JMj1k9w0CkUdcxNyNxZPlTxKPVko+m1VlM58ZVA== dependencies: - "@octokit/types" "^8.0.0" + "@octokit/types" "^9.0.0" "@octokit/core@^3.5.1": version "3.6.0" @@ -1735,15 +1736,15 @@ universal-user-agent "^6.0.0" "@octokit/core@^4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-4.1.0.tgz#b6b03a478f1716de92b3f4ec4fd64d05ba5a9251" - integrity sha512-Czz/59VefU+kKDy+ZfDwtOIYIkFjExOKf+HA92aiTZJ6EfWpFzYQWw0l54ji8bVmyhc+mGaLUbSUmXazG7z5OQ== + version "4.2.0" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-4.2.0.tgz#8c253ba9605aca605bc46187c34fcccae6a96648" + integrity sha512-AgvDRUg3COpR82P7PBdGZF/NNqGmtMq2NiPqeSsDIeCfYFOZ9gddqWNQHnFdEUf+YwOj4aZYmJnlPp7OXmDIDg== dependencies: "@octokit/auth-token" "^3.0.0" "@octokit/graphql" "^5.0.0" "@octokit/request" "^6.0.0" "@octokit/request-error" "^3.0.0" - "@octokit/types" "^8.0.0" + "@octokit/types" "^9.0.0" before-after-hook "^2.2.0" universal-user-agent "^6.0.0" @@ -1757,11 +1758,11 @@ universal-user-agent "^6.0.0" "@octokit/endpoint@^7.0.0": - version "7.0.3" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-7.0.3.tgz#0b96035673a9e3bedf8bab8f7335de424a2147ed" - integrity sha512-57gRlb28bwTsdNXq+O3JTQ7ERmBTuik9+LelgcLIVfYwf235VHbN9QNo4kXExtp/h8T423cR5iJThKtFYxC7Lw== + version "7.0.5" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-7.0.5.tgz#2bb2a911c12c50f10014183f5d596ce30ac67dd1" + integrity sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA== dependencies: - "@octokit/types" "^8.0.0" + "@octokit/types" "^9.0.0" is-plain-object "^5.0.0" universal-user-agent "^6.0.0" @@ -1775,12 +1776,12 @@ universal-user-agent "^6.0.0" "@octokit/graphql@^5.0.0": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-5.0.4.tgz#519dd5c05123868276f3ae4e50ad565ed7dff8c8" - integrity sha512-amO1M5QUQgYQo09aStR/XO7KAl13xpigcy/kI8/N1PnZYSS69fgte+xA4+c2DISKqUZfsh0wwjc2FaCt99L41A== + version "5.0.5" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-5.0.5.tgz#a4cb3ea73f83b861893a6370ee82abb36e81afd2" + integrity sha512-Qwfvh3xdqKtIznjX9lz2D458r7dJPP8l6r4GQkIdWQouZwHQK0mVT88uwiU2bdTU2OtT1uOlKpRciUWldpG0yQ== dependencies: "@octokit/request" "^6.0.0" - "@octokit/types" "^8.0.0" + "@octokit/types" "^9.0.0" universal-user-agent "^6.0.0" "@octokit/openapi-types@^12.11.0": @@ -1788,10 +1789,10 @@ resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.11.0.tgz#da5638d64f2b919bca89ce6602d059f1b52d3ef0" integrity sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ== -"@octokit/openapi-types@^14.0.0": - version "14.0.0" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-14.0.0.tgz#949c5019028c93f189abbc2fb42f333290f7134a" - integrity sha512-HNWisMYlR8VCnNurDU6os2ikx0s0VyEjDYHNS/h4cgb8DeOxQ0n72HyinUtdDVxJhFy3FWLGl0DJhfEWk3P5Iw== +"@octokit/openapi-types@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-16.0.0.tgz#d92838a6cd9fb4639ca875ddb3437f1045cc625e" + integrity sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA== "@octokit/plugin-enterprise-rest@^6.0.1": version "6.0.1" @@ -1805,12 +1806,12 @@ dependencies: "@octokit/types" "^6.40.0" -"@octokit/plugin-paginate-rest@^5.0.0": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-5.0.1.tgz#93d7e74f1f69d68ba554fa6b888c2a9cf1f99a83" - integrity sha512-7A+rEkS70pH36Z6JivSlR7Zqepz3KVucEFVDnSrgHXzG7WLAzYwcHZbKdfTXHwuTHbkT1vKvz7dHl1+HNf6Qyw== +"@octokit/plugin-paginate-rest@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.0.0.tgz#f34b5a7d9416019126042cd7d7b811e006c0d561" + integrity sha512-Sq5VU1PfT6/JyuXPyt04KZNVsFOSBaYOAq2QRZUwzVlI10KFvcbUo8lR258AAQL1Et60b0WuVik+zOWKLuDZxw== dependencies: - "@octokit/types" "^8.0.0" + "@octokit/types" "^9.0.0" "@octokit/plugin-request-log@^1.0.4": version "1.0.4" @@ -1825,12 +1826,12 @@ "@octokit/types" "^6.39.0" deprecation "^2.3.1" -"@octokit/plugin-rest-endpoint-methods@^6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.7.0.tgz#2f6f17f25b6babbc8b41d2bb0a95a8839672ce7c" - integrity sha512-orxQ0fAHA7IpYhG2flD2AygztPlGYNAdlzYz8yrD8NDgelPfOYoRPROfEyIe035PlxvbYrgkfUZIhSBKju/Cvw== +"@octokit/plugin-rest-endpoint-methods@^7.0.0": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.0.1.tgz#f7ebe18144fd89460f98f35a587b056646e84502" + integrity sha512-pnCaLwZBudK5xCdrR823xHGNgqOzRnJ/mpC/76YPpNP7DybdsJtP7mdOwh+wYZxK5jqeQuhu59ogMI4NRlBUvA== dependencies: - "@octokit/types" "^8.0.0" + "@octokit/types" "^9.0.0" deprecation "^2.3.1" "@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": @@ -1843,11 +1844,11 @@ once "^1.4.0" "@octokit/request-error@^3.0.0": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-3.0.2.tgz#f74c0f163d19463b87528efe877216c41d6deb0a" - integrity sha512-WMNOFYrSaX8zXWoJg9u/pKgWPo94JXilMLb2VManNOby9EZxrQaBe/QSC4a1TzpAlpxofg2X/jMnCyZgL6y7eg== + version "3.0.3" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-3.0.3.tgz#ef3dd08b8e964e53e55d471acfe00baa892b9c69" + integrity sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ== dependencies: - "@octokit/types" "^8.0.0" + "@octokit/types" "^9.0.0" deprecation "^2.0.0" once "^1.4.0" @@ -1864,13 +1865,13 @@ universal-user-agent "^6.0.0" "@octokit/request@^6.0.0": - version "6.2.2" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-6.2.2.tgz#a2ba5ac22bddd5dcb3f539b618faa05115c5a255" - integrity sha512-6VDqgj0HMc2FUX2awIs+sM6OwLgwHvAi4KCK3mT2H2IKRt6oH9d0fej5LluF5mck1lRR/rFWN0YIDSYXYSylbw== + version "6.2.3" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-6.2.3.tgz#76d5d6d44da5c8d406620a4c285d280ae310bdb4" + integrity sha512-TNAodj5yNzrrZ/VxP+H5HiYaZep0H3GU0O7PaF+fhDrt8FPrnkei9Aal/txsN/1P7V3CPiThG0tIvpPDYUsyAA== dependencies: "@octokit/endpoint" "^7.0.0" "@octokit/request-error" "^3.0.0" - "@octokit/types" "^8.0.0" + "@octokit/types" "^9.0.0" is-plain-object "^5.0.0" node-fetch "^2.6.7" universal-user-agent "^6.0.0" @@ -1886,14 +1887,14 @@ "@octokit/plugin-rest-endpoint-methods" "^5.12.0" "@octokit/rest@^19.0.3": - version "19.0.5" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-19.0.5.tgz#4dbde8ae69b27dca04b5f1d8119d282575818f6c" - integrity sha512-+4qdrUFq2lk7Va+Qff3ofREQWGBeoTKNqlJO+FGjFP35ZahP+nBenhZiGdu8USSgmq4Ky3IJ/i4u0xbLqHaeow== + version "19.0.7" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-19.0.7.tgz#d2e21b4995ab96ae5bfae50b4969da7e04e0bb70" + integrity sha512-HRtSfjrWmWVNp2uAkEpQnuGMJsu/+dBr47dRc5QVgsCbnIc1+GFEaoKBWkYG+zjrsHpSqcAElMio+n10c0b5JA== dependencies: "@octokit/core" "^4.1.0" - "@octokit/plugin-paginate-rest" "^5.0.0" + "@octokit/plugin-paginate-rest" "^6.0.0" "@octokit/plugin-request-log" "^1.0.4" - "@octokit/plugin-rest-endpoint-methods" "^6.7.0" + "@octokit/plugin-rest-endpoint-methods" "^7.0.0" "@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.39.0", "@octokit/types@^6.40.0": version "6.41.0" @@ -1902,12 +1903,12 @@ dependencies: "@octokit/openapi-types" "^12.11.0" -"@octokit/types@^8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-8.0.0.tgz#93f0b865786c4153f0f6924da067fe0bb7426a9f" - integrity sha512-65/TPpOJP1i3K4lBJMnWqPUJ6zuOtzhtagDvydAWbEXpbFYA0oMKKyLb95NFZZP0lSh/4b6K+DQlzvYQJQQePg== +"@octokit/types@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-9.0.0.tgz#6050db04ddf4188ec92d60e4da1a2ce0633ff635" + integrity sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw== dependencies: - "@octokit/openapi-types" "^14.0.0" + "@octokit/openapi-types" "^16.0.0" "@parcel/watcher@2.0.4": version "2.0.4" @@ -1941,6 +1942,11 @@ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f" integrity sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA== +"@sinclair/typebox@^0.25.16": + version "0.25.21" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.25.21.tgz#763b05a4b472c93a8db29b2c3e359d55b29ce272" + integrity sha512-gFukHN4t8K4+wVC+ECqeqwzBDeFeTzBXroBTqE6vcWrQGbEUpHO7LYdG0f4xnvYq4VOEwITSlHlp0JBAIFMS/g== + "@sinonjs/commons@^1.7.0": version "1.8.6" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.6.tgz#80c516a4dc264c2a69115e7578d62581ff455ed9" @@ -1948,6 +1954,20 @@ dependencies: type-detect "4.0.8" +"@sinonjs/commons@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-2.0.0.tgz#fd4ca5b063554307e8327b4564bd56d3b73924a3" + integrity sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^10.0.2": + version "10.0.2" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.0.2.tgz#d10549ed1f423d80639c528b6c7f5a1017747d0c" + integrity sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw== + dependencies: + "@sinonjs/commons" "^2.0.0" + "@sinonjs/fake-timers@^9.1.2": version "9.1.2" resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz#4eaab737fab77332ab132d396a3c0d364bd0ea8c" @@ -1981,12 +2001,12 @@ integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== "@types/babel__core@^7.1.14": - version "7.1.20" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.20.tgz#e168cdd612c92a2d335029ed62ac94c95b362359" - integrity sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ== + version "7.20.0" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.0.tgz#61bc5a4cae505ce98e1e36c5445e4bee060d8891" + integrity sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ== dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" "@types/babel__generator" "*" "@types/babel__template" "*" "@types/babel__traverse" "*" @@ -2066,18 +2086,18 @@ dependencies: "@types/node" "*" -"@types/glob@^8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-8.0.0.tgz#321607e9cbaec54f687a0792b2d1d370739455d2" - integrity sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA== +"@types/glob@^8.0.1": + version "8.0.1" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-8.0.1.tgz#6e3041640148b7764adf21ce5c7138ad454725b0" + integrity sha512-8bVUjXZvJacUFkJXHdyZ9iH1Eaj5V7I8c4NdH5sQJsdXkqT4CA5Dhb4yb4VE/3asyx4L9ayZr1NIhTsWHczmMw== dependencies: - "@types/minimatch" "*" + "@types/minimatch" "^5.1.2" "@types/node" "*" "@types/graceful-fs@^4.1.3": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" - integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== + version "4.1.6" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae" + integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw== dependencies: "@types/node" "*" @@ -2107,10 +2127,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^29.2.5": - version "29.2.5" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.2.5.tgz#c27f41a9d6253f288d1910d3c5f09484a56b73c0" - integrity sha512-H2cSxkKgVmqNHXP7TC2L/WUorrZu8ZigyRywfVzv6EyBlxj39n4C00hjXYQWsbwqgElaj/CiAeSRmk5GoaKTgw== +"@types/jest@^29.4.0": + version "29.4.0" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.4.0.tgz#a8444ad1704493e84dbf07bb05990b275b3b9206" + integrity sha512-VaywcGQ9tPorCX/Jkkni7RWGFfI11whqzs8dvxF41P17Z+z872thvEvlIbznjPJ02kl1HMX3LmLOonsj2n7HeQ== dependencies: expect "^29.0.0" pretty-format "^29.0.0" @@ -2130,16 +2150,16 @@ resolved "https://registry.yarnpkg.com/@types/lockfile/-/lockfile-1.0.2.tgz#3f77e84171a2b7e3198bd5717c7547a54393baf8" integrity sha512-jD5VbvhfMhaYN4M3qPJuhMVUg3Dfc4tvPvLEAXn6GXbs/ajDFtCQahX37GIE65ipTI3I+hEvNaXS3MYAn9Ce3Q== -"@types/minimatch@*": - version "5.1.2" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" - integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== - "@types/minimatch@^3.0.3": version "3.0.5" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== +"@types/minimatch@^5.1.2": + version "5.1.2" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" + integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== + "@types/minimist@^1.2.0": version "1.2.2" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" @@ -2241,87 +2261,88 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^5.48.0": - version "5.48.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.48.0.tgz#54f8368d080eb384a455f60c2ee044e948a8ce67" - integrity sha512-SVLafp0NXpoJY7ut6VFVUU9I+YeFsDzeQwtK0WZ+xbRN3mtxJ08je+6Oi2N89qDn087COdO0u3blKZNv9VetRQ== +"@typescript-eslint/eslint-plugin@^5.50.0": + version "5.50.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.50.0.tgz#fb48c31cadc853ffc1dc35373f56b5e2a8908fe9" + integrity sha512-vwksQWSFZiUhgq3Kv7o1Jcj0DUNylwnIlGvKvLLYsq8pAWha6/WCnXUeaSoNNha/K7QSf2+jvmkxggC1u3pIwQ== dependencies: - "@typescript-eslint/scope-manager" "5.48.0" - "@typescript-eslint/type-utils" "5.48.0" - "@typescript-eslint/utils" "5.48.0" + "@typescript-eslint/scope-manager" "5.50.0" + "@typescript-eslint/type-utils" "5.50.0" + "@typescript-eslint/utils" "5.50.0" debug "^4.3.4" + grapheme-splitter "^1.0.4" ignore "^5.2.0" natural-compare-lite "^1.4.0" regexpp "^3.2.0" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.48.0": - version "5.48.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.48.0.tgz#02803355b23884a83e543755349809a50b7ed9ba" - integrity sha512-1mxNA8qfgxX8kBvRDIHEzrRGrKHQfQlbW6iHyfHYS0Q4X1af+S6mkLNtgCOsGVl8+/LUPrqdHMssAemkrQ01qg== +"@typescript-eslint/parser@^5.50.0": + version "5.50.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.50.0.tgz#a33f44b2cc83d1b7176ec854fbecd55605b0b032" + integrity sha512-KCcSyNaogUDftK2G9RXfQyOCt51uB5yqC6pkUYqhYh8Kgt+DwR5M0EwEAxGPy/+DH6hnmKeGsNhiZRQxjH71uQ== dependencies: - "@typescript-eslint/scope-manager" "5.48.0" - "@typescript-eslint/types" "5.48.0" - "@typescript-eslint/typescript-estree" "5.48.0" + "@typescript-eslint/scope-manager" "5.50.0" + "@typescript-eslint/types" "5.50.0" + "@typescript-eslint/typescript-estree" "5.50.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.48.0": - version "5.48.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.48.0.tgz#607731cb0957fbc52fd754fd79507d1b6659cecf" - integrity sha512-0AA4LviDtVtZqlyUQnZMVHydDATpD9SAX/RC5qh6cBd3xmyWvmXYF+WT1oOmxkeMnWDlUVTwdODeucUnjz3gow== +"@typescript-eslint/scope-manager@5.50.0": + version "5.50.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.50.0.tgz#90b8a3b337ad2c52bbfe4eac38f9164614e40584" + integrity sha512-rt03kaX+iZrhssaT974BCmoUikYtZI24Vp/kwTSy841XhiYShlqoshRFDvN1FKKvU2S3gK+kcBW1EA7kNUrogg== dependencies: - "@typescript-eslint/types" "5.48.0" - "@typescript-eslint/visitor-keys" "5.48.0" + "@typescript-eslint/types" "5.50.0" + "@typescript-eslint/visitor-keys" "5.50.0" -"@typescript-eslint/type-utils@5.48.0": - version "5.48.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.48.0.tgz#40496dccfdc2daa14a565f8be80ad1ae3882d6d6" - integrity sha512-vbtPO5sJyFjtHkGlGK4Sthmta0Bbls4Onv0bEqOGm7hP9h8UpRsHJwsrCiWtCUndTRNQO/qe6Ijz9rnT/DB+7g== +"@typescript-eslint/type-utils@5.50.0": + version "5.50.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.50.0.tgz#509d5cc9728d520008f7157b116a42c5460e7341" + integrity sha512-dcnXfZ6OGrNCO7E5UY/i0ktHb7Yx1fV6fnQGGrlnfDhilcs6n19eIRcvLBqx6OQkrPaFlDPk3OJ0WlzQfrV0bQ== dependencies: - "@typescript-eslint/typescript-estree" "5.48.0" - "@typescript-eslint/utils" "5.48.0" + "@typescript-eslint/typescript-estree" "5.50.0" + "@typescript-eslint/utils" "5.50.0" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.48.0": - version "5.48.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.48.0.tgz#d725da8dfcff320aab2ac6f65c97b0df30058449" - integrity sha512-UTe67B0Ypius0fnEE518NB2N8gGutIlTojeTg4nt0GQvikReVkurqxd2LvYa9q9M5MQ6rtpNyWTBxdscw40Xhw== +"@typescript-eslint/types@5.50.0": + version "5.50.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.50.0.tgz#c461d3671a6bec6c2f41f38ed60bd87aa8a30093" + integrity sha512-atruOuJpir4OtyNdKahiHZobPKFvZnBnfDiyEaBf6d9vy9visE7gDjlmhl+y29uxZ2ZDgvXijcungGFjGGex7w== -"@typescript-eslint/typescript-estree@5.48.0": - version "5.48.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.48.0.tgz#a7f04bccb001003405bb5452d43953a382c2fac2" - integrity sha512-7pjd94vvIjI1zTz6aq/5wwE/YrfIyEPLtGJmRfyNR9NYIW+rOvzzUv3Cmq2hRKpvt6e9vpvPUQ7puzX7VSmsEw== +"@typescript-eslint/typescript-estree@5.50.0": + version "5.50.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.50.0.tgz#0b9b82975bdfa40db9a81fdabc7f93396867ea97" + integrity sha512-Gq4zapso+OtIZlv8YNAStFtT6d05zyVCK7Fx3h5inlLBx2hWuc/0465C2mg/EQDDU2LKe52+/jN4f0g9bd+kow== dependencies: - "@typescript-eslint/types" "5.48.0" - "@typescript-eslint/visitor-keys" "5.48.0" + "@typescript-eslint/types" "5.50.0" + "@typescript-eslint/visitor-keys" "5.50.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.48.0": - version "5.48.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.48.0.tgz#eee926af2733f7156ad8d15e51791e42ce300273" - integrity sha512-x2jrMcPaMfsHRRIkL+x96++xdzvrdBCnYRd5QiW5Wgo1OB4kDYPbC1XjWP/TNqlfK93K/lUL92erq5zPLgFScQ== +"@typescript-eslint/utils@5.50.0": + version "5.50.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.50.0.tgz#807105f5ffb860644d30d201eefad7017b020816" + integrity sha512-v/AnUFImmh8G4PH0NDkf6wA8hujNNcrwtecqW4vtQ1UOSNBaZl49zP1SHoZ/06e+UiwzHpgb5zP5+hwlYYWYAw== dependencies: "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.48.0" - "@typescript-eslint/types" "5.48.0" - "@typescript-eslint/typescript-estree" "5.48.0" + "@typescript-eslint/scope-manager" "5.50.0" + "@typescript-eslint/types" "5.50.0" + "@typescript-eslint/typescript-estree" "5.50.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.48.0": - version "5.48.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.48.0.tgz#4446d5e7f6cadde7140390c0e284c8702d944904" - integrity sha512-5motVPz5EgxQ0bHjut3chzBkJ3Z3sheYVcSwS5BpHZpLqSptSmELNtGixmgj65+rIfhvtQTz5i9OP2vtzdDH7Q== +"@typescript-eslint/visitor-keys@5.50.0": + version "5.50.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.50.0.tgz#b752ffc143841f3d7bc57d6dd01ac5c40f8c4903" + integrity sha512-cdMeD9HGu6EXIeGOh2yVW6oGf9wq8asBgZx7nsR/D36gTfQ0odE5kcRYe5M81vjEFAcPeugXrHg78Imu55F6gg== dependencies: - "@typescript-eslint/types" "5.48.0" + "@typescript-eslint/types" "5.50.0" eslint-visitor-keys "^3.3.0" "@webassemblyjs/ast@1.11.1": @@ -2481,9 +2502,9 @@ integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== "@yarnpkg/parsers@^3.0.0-rc.18": - version "3.0.0-rc.34" - resolved "https://registry.yarnpkg.com/@yarnpkg/parsers/-/parsers-3.0.0-rc.34.tgz#db1d16e082e167db6dbc67f1c264639e0b4c5e1a" - integrity sha512-NhEA0BusInyk7EiJ7i7qF1Mkrb6gGjZcQQ/W1xxGazxapubEmGO7v5WSll6hWxFXE2ngtLj8lflq1Ff5VtqEww== + version "3.0.0-rc.37" + resolved "https://registry.yarnpkg.com/@yarnpkg/parsers/-/parsers-3.0.0-rc.37.tgz#a00f9b6c478699b0b7a6b56000ea764cb28a8680" + integrity sha512-MPKHrD11PgNExFMCXcgA/MnfYbITbiHYQjB8TNZmE4t9Z+zRCB1RTJKOppp8K8QOf+OEo8CybufVNcZZMLt2tw== dependencies: js-yaml "^3.10.0" tslib "^2.4.0" @@ -2529,9 +2550,9 @@ acorn-walk@^8.1.1: integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== acorn@^8.4.1, acorn@^8.5.0, acorn@^8.7.1, acorn@^8.8.0: - version "8.8.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" - integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== + version "8.8.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== add-stream@^1.0.0: version "1.0.0" @@ -2639,7 +2660,7 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== -anymatch@^3.0.3, anymatch@~3.1.2: +anymatch@^3.0.3: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== @@ -2748,10 +2769,15 @@ at-least-node@^1.0.0: resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== +available-typed-arrays@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" + integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== + axios@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.2.tgz#72681724c6e6a43a9fea860fc558127dbe32f9f1" - integrity sha512-bz/J4gS2S3I7mpN/YZfGFTqhXTYzRho8Ay38w2otuuDR322KzFIWm/4W2K6gIwvWaws5n+mnb7D1lN9uD+QH6Q== + version "1.3.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.0.tgz#4cb0d72213989dec08d4b10129e42063bcb3dc78" + integrity sha512-oCye5nHhTypzkdLIvF9SaHfr8UAquqCn1KY3j8vsrjeol8yohAdGxIpRPbF1bOLsx33HOAatdfMX1yzsj2cHwg== dependencies: follow-redirects "^1.15.0" form-data "^4.0.0" @@ -2770,15 +2796,15 @@ babel-jest@^28.1.3: graceful-fs "^4.2.9" slash "^3.0.0" -babel-jest@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.3.1.tgz#05c83e0d128cd48c453eea851482a38782249f44" - integrity sha512-aard+xnMoxgjwV70t0L6wkW/3HQQtV+O0PEimxKgzNqCJnbYmroPojdP2tqKSOAt8QAKV/uSZU8851M7B5+fcA== +babel-jest@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.4.1.tgz#01fa167e27470b35c2d4a1b841d9586b1764da19" + integrity sha512-xBZa/pLSsF/1sNpkgsiT3CmY7zV1kAsZ9OxxtrFqYucnOuRftXAfcJqcDVyOPeN4lttWTwhLdu0T9f8uvoPEUg== dependencies: - "@jest/transform" "^29.3.1" + "@jest/transform" "^29.4.1" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.2.0" + babel-preset-jest "^29.4.0" chalk "^4.0.0" graceful-fs "^4.2.9" slash "^3.0.0" @@ -2804,10 +2830,10 @@ babel-plugin-jest-hoist@^28.1.3: "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" -babel-plugin-jest-hoist@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.2.0.tgz#23ee99c37390a98cfddf3ef4a78674180d823094" - integrity sha512-TnspP2WNiR3GLfCsUNHqeXw0RoQ2f9U5hQ5L3XFpwuO8htQmSrhh8qsB6vi5Yi8+kuynN1yjDjQsPfkebmB6ZA== +babel-plugin-jest-hoist@^29.4.0: + version "29.4.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.4.0.tgz#3fd3dfcedf645932df6d0c9fc3d9a704dd860248" + integrity sha512-a/sZRLQJEmsmejQ2rPEUe35nO1+C9dc9O1gplH1SXmJxveQSRUYdBk8yGZG/VOUuZs1u2aHZJusEGoRMbhhwCg== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" @@ -2840,12 +2866,12 @@ babel-preset-jest@^28.1.3: babel-plugin-jest-hoist "^28.1.3" babel-preset-current-node-syntax "^1.0.0" -babel-preset-jest@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.2.0.tgz#3048bea3a1af222e3505e4a767a974c95a7620dc" - integrity sha512-z9JmMJppMxNv8N7fNRHvhMg9cvIkMxQBXgFkane3yKVEvEOP+kB50lk8DFRvF9PGqbyXxlmebKWhuDORO8RgdA== +babel-preset-jest@^29.4.0: + version "29.4.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.4.0.tgz#c2b03c548b02dea0a18ae21d5759c136f9251ee4" + integrity sha512-fUB9vZflUSM3dO/6M2TCAepTzvA4VkOvl67PjErcrQMGt9Eve7uazaeyCZ2th3UtI7ljpiBJES0F7A1vBRsLZA== dependencies: - babel-plugin-jest-hoist "^29.2.0" + babel-plugin-jest-hoist "^29.4.0" babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: @@ -2875,7 +2901,7 @@ bin-links@^3.0.0, bin-links@^3.0.3: rimraf "^3.0.0" write-file-atomic "^4.0.0" -binary-extensions@^2.0.0, binary-extensions@^2.2.0: +binary-extensions@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== @@ -2904,7 +2930,7 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^3.0.2, braces@~3.0.2: +braces@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -2912,14 +2938,14 @@ braces@^3.0.2, braces@~3.0.2: fill-range "^7.0.1" browserslist@^4.14.5, browserslist@^4.21.3: - version "4.21.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" - integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== + version "4.21.5" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.5.tgz#75c5dae60063ee641f977e00edd3cfb2fb7af6a7" + integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== dependencies: - caniuse-lite "^1.0.30001400" - electron-to-chromium "^1.4.251" - node-releases "^2.0.6" - update-browserslist-db "^1.0.9" + caniuse-lite "^1.0.30001449" + electron-to-chromium "^1.4.284" + node-releases "^2.0.8" + update-browserslist-db "^1.0.10" bser@2.1.1: version "2.1.1" @@ -3014,24 +3040,16 @@ camelcase@^6.2.0, camelcase@^6.3.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001400: - version "1.0.30001441" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz#987437b266260b640a23cd18fbddb509d7f69f3e" - integrity sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg== +caniuse-lite@^1.0.30001449: + version "1.0.30001450" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001450.tgz#022225b91200589196b814b51b1bbe45144cf74f" + integrity sha512-qMBmvmQmFXaSxexkjjfMvD5rnDL0+m+dUMZKoDYsGG8iZN29RuYh9eRoMvKsT6uMAWlyUUGDEQGJJYjzCIO9ew== case@^1.6.3: version "1.6.3" resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== -chalk@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -3059,21 +3077,6 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -chokidar@^3.5.1: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - chownr@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" @@ -3268,9 +3271,9 @@ commander@^2.20.0: integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== commander@^9.4.1: - version "9.4.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" - integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== + version "9.5.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== common-ancestor-path@^1.0.1: version "1.0.1" @@ -3601,9 +3604,9 @@ deep-is@^0.1.3: integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== + version "4.3.0" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.0.tgz#65491893ec47756d44719ae520e0e2609233b59b" + integrity sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og== defaults@^1.0.3: version "1.0.4" @@ -3763,7 +3766,7 @@ ejs@^3.1.7: dependencies: jake "^10.8.5" -electron-to-chromium@^1.4.251: +electron-to-chromium@^1.4.284: version "1.4.284" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592" integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== @@ -3840,26 +3843,32 @@ error-ex@^1.3.1: is-arrayish "^0.2.1" es-abstract@^1.19.0, es-abstract@^1.20.4: - version "1.20.5" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.5.tgz#e6dc99177be37cacda5988e692c3fa8b218e95d2" - integrity sha512-7h8MM2EQhsCA7pU/Nv78qOXFpD8Rhqd12gYiSJVkrH9+e8VuA8JlPJK/hQjjlLv6pJvx/z1iRFKzYb0XT/RuAQ== + version "1.21.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.1.tgz#e6105a099967c08377830a0c9cb589d570dd86c6" + integrity sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg== dependencies: + available-typed-arrays "^1.0.5" call-bind "^1.0.2" + es-set-tostringtag "^2.0.1" es-to-primitive "^1.2.1" function-bind "^1.1.1" function.prototype.name "^1.1.5" get-intrinsic "^1.1.3" get-symbol-description "^1.0.0" + globalthis "^1.0.3" gopd "^1.0.1" has "^1.0.3" has-property-descriptors "^1.0.0" + has-proto "^1.0.1" has-symbols "^1.0.3" - internal-slot "^1.0.3" + internal-slot "^1.0.4" + is-array-buffer "^3.0.1" is-callable "^1.2.7" is-negative-zero "^2.0.2" is-regex "^1.1.4" is-shared-array-buffer "^1.0.2" is-string "^1.0.7" + is-typed-array "^1.1.10" is-weakref "^1.0.2" object-inspect "^1.12.2" object-keys "^1.1.1" @@ -3868,13 +3877,24 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: safe-regex-test "^1.0.0" string.prototype.trimend "^1.0.6" string.prototype.trimstart "^1.0.6" + typed-array-length "^1.0.4" unbox-primitive "^1.0.2" + which-typed-array "^1.1.9" es-module-lexer@^0.9.0: version "0.9.3" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== +es-set-tostringtag@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" + integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== + dependencies: + get-intrinsic "^1.1.3" + has "^1.0.3" + has-tostringtag "^1.0.0" + es-shim-unscopables@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" @@ -3916,18 +3936,19 @@ eslint-config-prettier@^8.6.0: resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz#dec1d29ab728f4fa63061774e1672ac4e363d207" integrity sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA== -eslint-import-resolver-node@^0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" - integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== +eslint-import-resolver-node@^0.3.6, eslint-import-resolver-node@^0.3.7: + version "0.3.7" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" + integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== dependencies: debug "^3.2.7" - resolve "^1.20.0" + is-core-module "^2.11.0" + resolve "^1.22.1" -eslint-import-resolver-typescript@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.2.tgz#9431acded7d898fd94591a08ea9eec3514c7de91" - integrity sha512-zX4ebnnyXiykjhcBvKIf5TNvt8K7yX6bllTRZ14MiurKPjDpCAZujlszTdB8pcNXhZcOf+god4s9SjQa5GnytQ== +eslint-import-resolver-typescript@^3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.3.tgz#db5ed9e906651b7a59dd84870aaef0e78c663a05" + integrity sha512-njRcKYBc3isE42LaTcJNVANR3R99H9bAxBDMNDr2W7yq5gYPxbU3MkdhsQukxZ/Xg9C2vcyLlDsbKfRDg0QvCQ== dependencies: debug "^4.3.4" enhanced-resolve "^5.10.0" @@ -4003,10 +4024,10 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.31.0: - version "8.31.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.31.0.tgz#75028e77cbcff102a9feae1d718135931532d524" - integrity sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA== +eslint@^8.33.0: + version "8.33.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.33.0.tgz#02f110f32998cb598c6461f24f4d306e41ca33d7" + integrity sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA== dependencies: "@eslint/eslintrc" "^1.4.1" "@humanwhocodes/config-array" "^0.11.8" @@ -4132,16 +4153,16 @@ expect@^28.1.3: jest-message-util "^28.1.3" jest-util "^28.1.3" -expect@^29.0.0, expect@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-29.3.1.tgz#92877aad3f7deefc2e3f6430dd195b92295554a6" - integrity sha512-gGb1yTgU30Q0O/tQq+z30KBWv24ApkMgFUpvKBkyLUBL68Wv8dHdJxTBZFl/iT8K/bqDHvUYRH6IIN3rToopPA== +expect@^29.0.0, expect@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.4.1.tgz#58cfeea9cbf479b64ed081fd1e074ac8beb5a1fe" + integrity sha512-OKrGESHOaMxK3b6zxIq9SOW8kEXztKff/Dvg88j4xIJxur1hspEbedVkR3GpHe5LO+WB2Qw7OWN0RMTdp6as5A== dependencies: - "@jest/expect-utils" "^29.3.1" + "@jest/expect-utils" "^29.4.1" jest-get-type "^29.2.0" - jest-matcher-utils "^29.3.1" - jest-message-util "^29.3.1" - jest-util "^29.3.1" + jest-matcher-utils "^29.4.1" + jest-message-util "^29.4.1" + jest-util "^29.4.1" external-editor@^3.0.3: version "3.1.0" @@ -4294,6 +4315,13 @@ follow-redirects@^1.15.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -4317,6 +4345,15 @@ fs-extra@^10.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.0.tgz#5784b102104433bb0e090f48bfc4a30742c357ed" + integrity sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -4348,7 +4385,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2, fsevents@~2.3.2: +fsevents@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -4398,9 +4435,9 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385" - integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" + integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== dependencies: function-bind "^1.1.1" has "^1.0.3" @@ -4498,7 +4535,7 @@ gitconfiglocal@^1.0.0: dependencies: ini "^1.3.2" -glob-parent@^5.1.1, glob-parent@^5.1.2, glob-parent@~5.1.2: +glob-parent@^5.1.1, glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -4541,10 +4578,10 @@ glob@^7.1.3, glob@^7.1.4, glob@^7.1.7: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.1, glob@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" - integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== +glob@^8.0.1, glob@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -4558,12 +4595,19 @@ globals@^11.1.0: integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^13.19.0: - version "13.19.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.19.0.tgz#7a42de8e6ad4f7242fbcca27ea5b23aca367b5c8" - integrity sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ== + version "13.20.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" + integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== dependencies: type-fest "^0.20.2" +globalthis@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" + integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + dependencies: + define-properties "^1.1.3" + globalyzer@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/globalyzer/-/globalyzer-0.1.0.tgz#cb76da79555669a1519d5a8edf093afaa0bf1465" @@ -4653,6 +4697,11 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" @@ -4709,9 +4758,9 @@ html-escaper@^2.0.0: integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== http-cache-semantics@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== + version "4.1.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" + integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== http-proxy-agent@^5.0.0: version "5.0.0" @@ -4880,7 +4929,7 @@ inquirer@^8.2.4, inquirer@^8.2.5: through "^2.3.6" wrap-ansi "^7.0.0" -internal-slot@^1.0.3: +internal-slot@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.4.tgz#8551e7baf74a7a6ba5f749cfb16aa60722f0d6f3" integrity sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ== @@ -4904,6 +4953,15 @@ ip@^2.0.0: resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== +is-array-buffer@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.1.tgz#deb1db4fcae48308d54ef2442706c0393997052a" + integrity sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + is-typed-array "^1.1.10" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -4916,13 +4974,6 @@ is-bigint@^1.0.1: dependencies: has-bigints "^1.0.1" -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - is-boolean-object@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" @@ -4931,7 +4982,7 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-callable@^1.1.4, is-callable@^1.2.7: +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== @@ -4950,7 +5001,7 @@ is-cidr@^4.0.2: dependencies: cidr-regex "^3.1.1" -is-core-module@^2.10.0, is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: +is-core-module@^2.10.0, is-core-module@^2.11.0, is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: version "2.11.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== @@ -4984,7 +5035,7 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -5098,6 +5149,17 @@ is-text-path@^1.0.1: dependencies: text-extensions "^1.0.0" +is-typed-array@^1.1.10, is-typed-array@^1.1.9: + version "1.1.10" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" + integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + is-typedarray@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -5194,10 +5256,10 @@ jake@^10.8.5: filelist "^1.0.1" minimatch "^3.0.4" -jest-changed-files@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.2.0.tgz#b6598daa9803ea6a4dce7968e20ab380ddbee289" - integrity sha512-qPVmLLyBmvF5HJrY7krDisx6Voi8DmlV3GZYX0aFNbaQsZeoz1hfxcCMbqDGuQCxU1dJy9eYc2xscE8QrCCYaA== +jest-changed-files@^29.4.0: + version "29.4.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.4.0.tgz#ac2498bcd394228f7eddcadcf928b3583bf2779d" + integrity sha512-rnI1oPxgFghoz32Y8eZsGJMjW54UlqT17ycQeCEktcxxwqqKdlj9afl8LNeO0Pbu+h2JQHThQP0BzS67eTRx4w== dependencies: execa "^5.0.0" p-limit "^3.1.0" @@ -5227,46 +5289,46 @@ jest-circus@^28.1.3: slash "^3.0.0" stack-utils "^2.0.3" -jest-circus@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.3.1.tgz#177d07c5c0beae8ef2937a67de68f1e17bbf1b4a" - integrity sha512-wpr26sEvwb3qQQbdlmei+gzp6yoSSoSL6GsLPxnuayZSMrSd5Ka7IjAvatpIernBvT2+Ic6RLTg+jSebScmasg== +jest-circus@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.4.1.tgz#ff1b63eb04c3b111cefea9489e8dbadd23ce49bd" + integrity sha512-v02NuL5crMNY4CGPHBEflLzl4v91NFb85a+dH9a1pUNx6Xjggrd8l9pPy4LZ1VYNRXlb+f65+7O/MSIbLir6pA== dependencies: - "@jest/environment" "^29.3.1" - "@jest/expect" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/environment" "^29.4.1" + "@jest/expect" "^29.4.1" + "@jest/test-result" "^29.4.1" + "@jest/types" "^29.4.1" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" is-generator-fn "^2.0.0" - jest-each "^29.3.1" - jest-matcher-utils "^29.3.1" - jest-message-util "^29.3.1" - jest-runtime "^29.3.1" - jest-snapshot "^29.3.1" - jest-util "^29.3.1" + jest-each "^29.4.1" + jest-matcher-utils "^29.4.1" + jest-message-util "^29.4.1" + jest-runtime "^29.4.1" + jest-snapshot "^29.4.1" + jest-util "^29.4.1" p-limit "^3.1.0" - pretty-format "^29.3.1" + pretty-format "^29.4.1" slash "^3.0.0" stack-utils "^2.0.3" -jest-cli@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.3.1.tgz#e89dff427db3b1df50cea9a393ebd8640790416d" - integrity sha512-TO/ewvwyvPOiBBuWZ0gm04z3WWP8TIK8acgPzE4IxgsLKQgb377NYGrQLc3Wl/7ndWzIH2CDNNsUjGxwLL43VQ== +jest-cli@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.4.1.tgz#7abef96944f300feb9b76f68b1eb2d68774fe553" + integrity sha512-jz7GDIhtxQ37M+9dlbv5K+/FVcIo1O/b1sX3cJgzlQUf/3VG25nvuWzlDC4F1FLLzUThJeWLu8I7JF9eWpuURQ== dependencies: - "@jest/core" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/core" "^29.4.1" + "@jest/test-result" "^29.4.1" + "@jest/types" "^29.4.1" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.9" import-local "^3.0.2" - jest-config "^29.3.1" - jest-util "^29.3.1" - jest-validate "^29.3.1" + jest-config "^29.4.1" + jest-util "^29.4.1" + jest-validate "^29.4.1" prompts "^2.0.1" yargs "^17.3.1" @@ -5298,31 +5360,31 @@ jest-config@^28.1.3: slash "^3.0.0" strip-json-comments "^3.1.1" -jest-config@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.3.1.tgz#0bc3dcb0959ff8662957f1259947aedaefb7f3c6" - integrity sha512-y0tFHdj2WnTEhxmGUK1T7fgLen7YK4RtfvpLFBXfQkh2eMJAQq24Vx9472lvn5wg0MAO6B+iPfJfzdR9hJYalg== +jest-config@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.4.1.tgz#e62670c6c980ec21d75941806ec4d0c0c6402728" + integrity sha512-g7p3q4NuXiM4hrS4XFATTkd+2z0Ml2RhFmFPM8c3WyKwVDNszbl4E7cV7WIx1YZeqqCtqbtTtZhGZWJlJqngzg== dependencies: "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.3.1" - "@jest/types" "^29.3.1" - babel-jest "^29.3.1" + "@jest/test-sequencer" "^29.4.1" + "@jest/types" "^29.4.1" + babel-jest "^29.4.1" chalk "^4.0.0" ci-info "^3.2.0" deepmerge "^4.2.2" glob "^7.1.3" graceful-fs "^4.2.9" - jest-circus "^29.3.1" - jest-environment-node "^29.3.1" + jest-circus "^29.4.1" + jest-environment-node "^29.4.1" jest-get-type "^29.2.0" jest-regex-util "^29.2.0" - jest-resolve "^29.3.1" - jest-runner "^29.3.1" - jest-util "^29.3.1" - jest-validate "^29.3.1" + jest-resolve "^29.4.1" + jest-runner "^29.4.1" + jest-util "^29.4.1" + jest-validate "^29.4.1" micromatch "^4.0.4" parse-json "^5.2.0" - pretty-format "^29.3.1" + pretty-format "^29.4.1" slash "^3.0.0" strip-json-comments "^3.1.1" @@ -5336,15 +5398,15 @@ jest-diff@^28.1.3: jest-get-type "^28.0.2" pretty-format "^28.1.3" -jest-diff@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.3.1.tgz#d8215b72fed8f1e647aed2cae6c752a89e757527" - integrity sha512-vU8vyiO7568tmin2lA3r2DP8oRvzhvRcD4DjpXc6uGveQodyk7CKLhQlCSiwgx3g0pFaE88/KLZ0yaTWMc4Uiw== +jest-diff@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.4.1.tgz#9a6dc715037e1fa7a8a44554e7d272088c4029bd" + integrity sha512-uazdl2g331iY56CEyfbNA0Ut7Mn2ulAG5vUaEHXycf1L6IPyuImIxSz4F0VYBKi7LYIuxOwTZzK3wh5jHzASMw== dependencies: chalk "^4.0.0" diff-sequences "^29.3.1" jest-get-type "^29.2.0" - pretty-format "^29.3.1" + pretty-format "^29.4.1" jest-docblock@^28.1.1: version "28.1.1" @@ -5371,16 +5433,16 @@ jest-each@^28.1.3: jest-util "^28.1.3" pretty-format "^28.1.3" -jest-each@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.3.1.tgz#bc375c8734f1bb96625d83d1ca03ef508379e132" - integrity sha512-qrZH7PmFB9rEzCSl00BWjZYuS1BSOH8lLuC0azQE9lQrAx3PWGKHTDudQiOSwIy5dGAJh7KA0ScYlCP7JxvFYA== +jest-each@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.4.1.tgz#05ce9979e7486dbd0f5d41895f49ccfdd0afce01" + integrity sha512-QlYFiX3llJMWUV0BtWht/esGEz9w+0i7BHwODKCze7YzZzizgExB9MOfiivF/vVT0GSQ8wXLhvHXh3x2fVD4QQ== dependencies: - "@jest/types" "^29.3.1" + "@jest/types" "^29.4.1" chalk "^4.0.0" jest-get-type "^29.2.0" - jest-util "^29.3.1" - pretty-format "^29.3.1" + jest-util "^29.4.1" + pretty-format "^29.4.1" jest-environment-node@^28.1.3: version "28.1.3" @@ -5394,17 +5456,17 @@ jest-environment-node@^28.1.3: jest-mock "^28.1.3" jest-util "^28.1.3" -jest-environment-node@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.3.1.tgz#5023b32472b3fba91db5c799a0d5624ad4803e74" - integrity sha512-xm2THL18Xf5sIHoU7OThBPtuH6Lerd+Y1NLYiZJlkE3hbE+7N7r8uvHIl/FkZ5ymKXJe/11SQuf3fv4v6rUMag== +jest-environment-node@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.4.1.tgz#22550b7d0f8f0b16228639c9f88ca04bbf3c1974" + integrity sha512-x/H2kdVgxSkxWAIlIh9MfMuBa0hZySmfsC5lCsWmWr6tZySP44ediRKDUiNggX/eHLH7Cd5ZN10Rw+XF5tXsqg== dependencies: - "@jest/environment" "^29.3.1" - "@jest/fake-timers" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/environment" "^29.4.1" + "@jest/fake-timers" "^29.4.1" + "@jest/types" "^29.4.1" "@types/node" "*" - jest-mock "^29.3.1" - jest-util "^29.3.1" + jest-mock "^29.4.1" + jest-util "^29.4.1" jest-expect-message@^1.1.3: version "1.1.3" @@ -5440,20 +5502,20 @@ jest-haste-map@^28.1.3: optionalDependencies: fsevents "^2.3.2" -jest-haste-map@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.3.1.tgz#af83b4347f1dae5ee8c2fb57368dc0bb3e5af843" - integrity sha512-/FFtvoG1xjbbPXQLFef+WSU4yrc0fc0Dds6aRPBojUid7qlPqZvxdUBA03HW0fnVHXVCnCdkuoghYItKNzc/0A== +jest-haste-map@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.4.1.tgz#b0579dc82d94b40ed9041af56ad25c2f80bedaeb" + integrity sha512-imTjcgfVVTvg02khXL11NNLTx9ZaofbAWhilrMg/G8dIkp+HYCswhxf0xxJwBkfhWb3e8dwbjuWburvxmcr58w== dependencies: - "@jest/types" "^29.3.1" + "@jest/types" "^29.4.1" "@types/graceful-fs" "^4.1.3" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.9" jest-regex-util "^29.2.0" - jest-util "^29.3.1" - jest-worker "^29.3.1" + jest-util "^29.4.1" + jest-worker "^29.4.1" micromatch "^4.0.4" walker "^1.0.8" optionalDependencies: @@ -5467,13 +5529,13 @@ jest-leak-detector@^28.1.3: jest-get-type "^28.0.2" pretty-format "^28.1.3" -jest-leak-detector@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.3.1.tgz#95336d020170671db0ee166b75cd8ef647265518" - integrity sha512-3DA/VVXj4zFOPagGkuqHnSQf1GZBmmlagpguxEERO6Pla2g84Q1MaVIB3YMxgUaFIaYag8ZnTyQgiZ35YEqAQA== +jest-leak-detector@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.4.1.tgz#632186c546e084da2b490b7496fee1a1c9929637" + integrity sha512-akpZv7TPyGMnH2RimOCgy+hPmWZf55EyFUvymQ4LMsQP8xSPlZumCPtXGoDhFNhUE2039RApZkTQDKU79p/FiQ== dependencies: jest-get-type "^29.2.0" - pretty-format "^29.3.1" + pretty-format "^29.4.1" jest-matcher-utils@^28.1.3: version "28.1.3" @@ -5485,15 +5547,15 @@ jest-matcher-utils@^28.1.3: jest-get-type "^28.0.2" pretty-format "^28.1.3" -jest-matcher-utils@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.3.1.tgz#6e7f53512f80e817dfa148672bd2d5d04914a572" - integrity sha512-fkRMZUAScup3txIKfMe3AIZZmPEjWEdsPJFK3AIy5qRohWqQFg1qrmKfYXR9qEkNc7OdAu2N4KPHibEmy4HPeQ== +jest-matcher-utils@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.4.1.tgz#73d834e305909c3b43285fbc76f78bf0ad7e1954" + integrity sha512-k5h0u8V4nAEy6lSACepxL/rw78FLDkBnXhZVgFneVpnJONhb2DhZj/Gv4eNe+1XqQ5IhgUcqj745UwH0HJmMnA== dependencies: chalk "^4.0.0" - jest-diff "^29.3.1" + jest-diff "^29.4.1" jest-get-type "^29.2.0" - pretty-format "^29.3.1" + pretty-format "^29.4.1" jest-message-util@^28.1.3: version "28.1.3" @@ -5510,18 +5572,18 @@ jest-message-util@^28.1.3: slash "^3.0.0" stack-utils "^2.0.3" -jest-message-util@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.3.1.tgz#37bc5c468dfe5120712053dd03faf0f053bd6adb" - integrity sha512-lMJTbgNcDm5z+6KDxWtqOFWlGQxD6XaYwBqHR8kmpkP+WWWG90I35kdtQHY67Ay5CSuydkTBbJG+tH9JShFCyA== +jest-message-util@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.4.1.tgz#522623aa1df9a36ebfdffb06495c7d9d19e8a845" + integrity sha512-H4/I0cXUaLeCw6FM+i4AwCnOwHRgitdaUFOdm49022YD5nfyr8C/DrbXOBEyJaj+w/y0gGJ57klssOaUiLLQGQ== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.3.1" + "@jest/types" "^29.4.1" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.9" micromatch "^4.0.4" - pretty-format "^29.3.1" + pretty-format "^29.4.1" slash "^3.0.0" stack-utils "^2.0.3" @@ -5533,14 +5595,14 @@ jest-mock@^28.1.3: "@jest/types" "^28.1.3" "@types/node" "*" -jest-mock@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.3.1.tgz#60287d92e5010979d01f218c6b215b688e0f313e" - integrity sha512-H8/qFDtDVMFvFP4X8NuOT3XRDzOUTz+FeACjufHzsOIBAxivLqkB1PoLCaJx9iPPQ8dZThHPp/G3WRWyMgA3JA== +jest-mock@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.4.1.tgz#a218a2abf45c99c501d4665207748a6b9e29afbd" + integrity sha512-MwA4hQ7zBOcgVCVnsM8TzaFLVUD/pFWTfbkY953Y81L5ret3GFRZtmPmRFAjKQSdCKoJvvqOu6Bvfpqlwwb0dQ== dependencies: - "@jest/types" "^29.3.1" + "@jest/types" "^29.4.1" "@types/node" "*" - jest-util "^29.3.1" + jest-util "^29.4.1" jest-pnp-resolver@^1.2.2: version "1.2.3" @@ -5557,13 +5619,13 @@ jest-regex-util@^29.2.0: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.2.0.tgz#82ef3b587e8c303357728d0322d48bbfd2971f7b" integrity sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA== -jest-resolve-dependencies@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.3.1.tgz#a6a329708a128e68d67c49f38678a4a4a914c3bf" - integrity sha512-Vk0cYq0byRw2WluNmNWGqPeRnZ3p3hHmjJMp2dyyZeYIfiBskwq4rpiuGFR6QGAdbj58WC7HN4hQHjf2mpvrLA== +jest-resolve-dependencies@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.4.1.tgz#02420a2e055da105e5fca8218c471d8b9553c904" + integrity sha512-Y3QG3M1ncAMxfjbYgtqNXC5B595zmB6e//p/qpA/58JkQXu/IpLDoLeOa8YoYfsSglBKQQzNUqtfGJJT/qLmJg== dependencies: jest-regex-util "^29.2.0" - jest-snapshot "^29.3.1" + jest-snapshot "^29.4.1" jest-resolve@^28.1.3: version "28.1.3" @@ -5580,19 +5642,19 @@ jest-resolve@^28.1.3: resolve.exports "^1.1.0" slash "^3.0.0" -jest-resolve@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.3.1.tgz#9a4b6b65387a3141e4a40815535c7f196f1a68a7" - integrity sha512-amXJgH/Ng712w3Uz5gqzFBBjxV8WFLSmNjoreBGMqxgCz5cH7swmBZzgBaCIOsvb0NbpJ0vgaSFdJqMdT+rADw== +jest-resolve@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.4.1.tgz#4c6bf71a07b8f0b79c5fdf4f2a2cf47317694c5e" + integrity sha512-j/ZFNV2lm9IJ2wmlq1uYK0Y/1PiyDq9g4HEGsNTNr3viRbJdV+8Lf1SXIiLZXFvyiisu0qUyIXGBnw+OKWkJwQ== dependencies: chalk "^4.0.0" graceful-fs "^4.2.9" - jest-haste-map "^29.3.1" + jest-haste-map "^29.4.1" jest-pnp-resolver "^1.2.2" - jest-util "^29.3.1" - jest-validate "^29.3.1" + jest-util "^29.4.1" + jest-validate "^29.4.1" resolve "^1.20.0" - resolve.exports "^1.1.0" + resolve.exports "^2.0.0" slash "^3.0.0" jest-runner@^28.1.3: @@ -5622,30 +5684,30 @@ jest-runner@^28.1.3: p-limit "^3.1.0" source-map-support "0.5.13" -jest-runner@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.3.1.tgz#a92a879a47dd096fea46bb1517b0a99418ee9e2d" - integrity sha512-oFvcwRNrKMtE6u9+AQPMATxFcTySyKfLhvso7Sdk/rNpbhg4g2GAGCopiInk1OP4q6gz3n6MajW4+fnHWlU3bA== - dependencies: - "@jest/console" "^29.3.1" - "@jest/environment" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" +jest-runner@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.4.1.tgz#57460d9ebb0eea2e27eeddca1816cf8537469661" + integrity sha512-8d6XXXi7GtHmsHrnaqBKWxjKb166Eyj/ksSaUYdcBK09VbjPwIgWov1VwSmtupCIz8q1Xv4Qkzt/BTo3ZqiCeg== + dependencies: + "@jest/console" "^29.4.1" + "@jest/environment" "^29.4.1" + "@jest/test-result" "^29.4.1" + "@jest/transform" "^29.4.1" + "@jest/types" "^29.4.1" "@types/node" "*" chalk "^4.0.0" emittery "^0.13.1" graceful-fs "^4.2.9" jest-docblock "^29.2.0" - jest-environment-node "^29.3.1" - jest-haste-map "^29.3.1" - jest-leak-detector "^29.3.1" - jest-message-util "^29.3.1" - jest-resolve "^29.3.1" - jest-runtime "^29.3.1" - jest-util "^29.3.1" - jest-watcher "^29.3.1" - jest-worker "^29.3.1" + jest-environment-node "^29.4.1" + jest-haste-map "^29.4.1" + jest-leak-detector "^29.4.1" + jest-message-util "^29.4.1" + jest-resolve "^29.4.1" + jest-runtime "^29.4.1" + jest-util "^29.4.1" + jest-watcher "^29.4.1" + jest-worker "^29.4.1" p-limit "^3.1.0" source-map-support "0.5.13" @@ -5677,31 +5739,32 @@ jest-runtime@^28.1.3: slash "^3.0.0" strip-bom "^4.0.0" -jest-runtime@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.3.1.tgz#21efccb1a66911d6d8591276a6182f520b86737a" - integrity sha512-jLzkIxIqXwBEOZx7wx9OO9sxoZmgT2NhmQKzHQm1xwR1kNW/dn0OjxR424VwHHf1SPN6Qwlb5pp1oGCeFTQ62A== +jest-runtime@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.4.1.tgz#9a50f9c69d3a391690897c01b0bfa8dc5dd45808" + integrity sha512-UXTMU9uKu2GjYwTtoAw5rn4STxWw/nadOfW7v1sx6LaJYa3V/iymdCLQM6xy3+7C6mY8GfX22vKpgxY171UIoA== dependencies: - "@jest/environment" "^29.3.1" - "@jest/fake-timers" "^29.3.1" - "@jest/globals" "^29.3.1" + "@jest/environment" "^29.4.1" + "@jest/fake-timers" "^29.4.1" + "@jest/globals" "^29.4.1" "@jest/source-map" "^29.2.0" - "@jest/test-result" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/test-result" "^29.4.1" + "@jest/transform" "^29.4.1" + "@jest/types" "^29.4.1" "@types/node" "*" chalk "^4.0.0" cjs-module-lexer "^1.0.0" collect-v8-coverage "^1.0.0" glob "^7.1.3" graceful-fs "^4.2.9" - jest-haste-map "^29.3.1" - jest-message-util "^29.3.1" - jest-mock "^29.3.1" + jest-haste-map "^29.4.1" + jest-message-util "^29.4.1" + jest-mock "^29.4.1" jest-regex-util "^29.2.0" - jest-resolve "^29.3.1" - jest-snapshot "^29.3.1" - jest-util "^29.3.1" + jest-resolve "^29.4.1" + jest-snapshot "^29.4.1" + jest-util "^29.4.1" + semver "^7.3.5" slash "^3.0.0" strip-bom "^4.0.0" @@ -5734,10 +5797,10 @@ jest-snapshot@^28.1.3: pretty-format "^28.1.3" semver "^7.3.5" -jest-snapshot@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.3.1.tgz#17bcef71a453adc059a18a32ccbd594b8cc4e45e" - integrity sha512-+3JOc+s28upYLI2OJM4PWRGK9AgpsMs/ekNryUV0yMBClT9B1DF2u2qay8YxcQd338PPYSFNb0lsar1B49sLDA== +jest-snapshot@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.4.1.tgz#5692210b3690c94f19317913d4082b123bd83dd9" + integrity sha512-l4iV8EjGgQWVz3ee/LR9sULDk2pCkqb71bjvlqn+qp90lFwpnulHj4ZBT8nm1hA1C5wowXLc7MGnw321u0tsYA== dependencies: "@babel/core" "^7.11.6" "@babel/generator" "^7.7.2" @@ -5745,23 +5808,23 @@ jest-snapshot@^29.3.1: "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/expect-utils" "^29.4.1" + "@jest/transform" "^29.4.1" + "@jest/types" "^29.4.1" "@types/babel__traverse" "^7.0.6" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^29.3.1" + expect "^29.4.1" graceful-fs "^4.2.9" - jest-diff "^29.3.1" + jest-diff "^29.4.1" jest-get-type "^29.2.0" - jest-haste-map "^29.3.1" - jest-matcher-utils "^29.3.1" - jest-message-util "^29.3.1" - jest-util "^29.3.1" + jest-haste-map "^29.4.1" + jest-matcher-utils "^29.4.1" + jest-message-util "^29.4.1" + jest-util "^29.4.1" natural-compare "^1.4.0" - pretty-format "^29.3.1" + pretty-format "^29.4.1" semver "^7.3.5" jest-util@^28.1.3: @@ -5776,12 +5839,12 @@ jest-util@^28.1.3: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-util@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.3.1.tgz#1dda51e378bbcb7e3bc9d8ab651445591ed373e1" - integrity sha512-7YOVZaiX7RJLv76ZfHt4nbNEzzTRiMW/IiOG7ZOKmTXmoGBxUDefgMAxQubu6WPVqP5zSzAdZG0FfLcC7HOIFQ== +jest-util@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.4.1.tgz#2eeed98ff4563b441b5a656ed1a786e3abc3e4c4" + integrity sha512-bQy9FPGxVutgpN4VRc0hk6w7Hx/m6L53QxpDreTZgJd9gfx/AV2MjyPde9tGyZRINAUrSv57p2inGBu2dRLmkQ== dependencies: - "@jest/types" "^29.3.1" + "@jest/types" "^29.4.1" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" @@ -5800,17 +5863,17 @@ jest-validate@^28.1.3: leven "^3.1.0" pretty-format "^28.1.3" -jest-validate@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.3.1.tgz#d56fefaa2e7d1fde3ecdc973c7f7f8f25eea704a" - integrity sha512-N9Lr3oYR2Mpzuelp1F8negJR3YE+L1ebk1rYA5qYo9TTY3f9OWdptLoNSPP9itOCBIRBqjt/S5XHlzYglLN67g== +jest-validate@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.4.1.tgz#0d5174510415083ec329d4f981bf6779211f17e9" + integrity sha512-qNZXcZQdIQx4SfUB/atWnI4/I2HUvhz8ajOSYUu40CSmf9U5emil8EDHgE7M+3j9/pavtk3knlZBDsgFvv/SWw== dependencies: - "@jest/types" "^29.3.1" + "@jest/types" "^29.4.1" camelcase "^6.2.0" chalk "^4.0.0" jest-get-type "^29.2.0" leven "^3.1.0" - pretty-format "^29.3.1" + pretty-format "^29.4.1" jest-watcher@^28.1.3: version "28.1.3" @@ -5826,18 +5889,18 @@ jest-watcher@^28.1.3: jest-util "^28.1.3" string-length "^4.0.1" -jest-watcher@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.3.1.tgz#3341547e14fe3c0f79f9c3a4c62dbc3fc977fd4a" - integrity sha512-RspXG2BQFDsZSRKGCT/NiNa8RkQ1iKAjrO0//soTMWx/QUt+OcxMqMSBxz23PYGqUuWm2+m2mNNsmj0eIoOaFg== +jest-watcher@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.4.1.tgz#6e3e2486918bd778849d4d6e67fd77b814f3e6ed" + integrity sha512-vFOzflGFs27nU6h8dpnVRER3O2rFtL+VMEwnG0H3KLHcllLsU8y9DchSh0AL/Rg5nN1/wSiQ+P4ByMGpuybaVw== dependencies: - "@jest/test-result" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/test-result" "^29.4.1" + "@jest/types" "^29.4.1" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.13.1" - jest-util "^29.3.1" + jest-util "^29.4.1" string-length "^4.0.1" jest-worker@^27.4.5: @@ -5858,30 +5921,30 @@ jest-worker@^28.1.3: merge-stream "^2.0.0" supports-color "^8.0.0" -jest-worker@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.3.1.tgz#e9462161017a9bb176380d721cab022661da3d6b" - integrity sha512-lY4AnnmsEWeiXirAIA0c9SDPbuCBq8IYuDVL8PMm0MZ2PEs2yPvRA/J64QBXuZp7CYKrDM/rmNrc9/i3KJQncw== +jest-worker@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.4.1.tgz#7cb4a99a38975679600305650f86f4807460aab1" + integrity sha512-O9doU/S1EBe+yp/mstQ0VpPwpv0Clgn68TkNwGxL6/usX/KUW9Arnn4ag8C3jc6qHcXznhsT5Na1liYzAsuAbQ== dependencies: "@types/node" "*" - jest-util "^29.3.1" + jest-util "^29.4.1" merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-29.3.1.tgz#c130c0d551ae6b5459b8963747fed392ddbde122" - integrity sha512-6iWfL5DTT0Np6UYs/y5Niu7WIfNv/wRTtN5RSXt2DIEft3dx3zPuw/3WJQBCJfmEzvDiEKwoqMbGD9n49+qLSA== +jest@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.4.1.tgz#bb34baca8e05901b49c02c62f1183a6182ea1785" + integrity sha512-cknimw7gAXPDOmj0QqztlxVtBVCw2lYY9CeIE5N6kD+kET1H4H79HSNISJmijb1HF+qk+G+ploJgiDi5k/fRlg== dependencies: - "@jest/core" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/core" "^29.4.1" + "@jest/types" "^29.4.1" import-local "^3.0.2" - jest-cli "^29.3.1" + jest-cli "^29.4.1" js-sdsl@^4.1.4: - version "4.2.0" - resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.2.0.tgz#278e98b7bea589b8baaf048c20aeb19eb7ad09d0" - integrity sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ== + version "4.3.0" + resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.3.0.tgz#aeefe32a451f7af88425b11fdb5f58c90ae1d711" + integrity sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ== js-tokens@^4.0.0: version "4.0.0" @@ -5959,7 +6022,7 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -json5@^2.2.1, json5@^2.2.2: +json5@^2.2.2: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -6010,33 +6073,35 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -lerna@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-6.3.0.tgz#5cac7b4c9df9ef194cecf828571f1415cd20fb79" - integrity sha512-AlAIabKU7tW2p6C0sNPKoCAq6GBpS+iGcSfnHEGTDsg/daMySMacnJMOuD7cN9O2o5UxZeZDtGIr2tEPfCN7Eg== - dependencies: - "@lerna/add" "6.3.0" - "@lerna/bootstrap" "6.3.0" - "@lerna/changed" "6.3.0" - "@lerna/clean" "6.3.0" - "@lerna/cli" "6.3.0" - "@lerna/command" "6.3.0" - "@lerna/create" "6.3.0" - "@lerna/diff" "6.3.0" - "@lerna/exec" "6.3.0" - "@lerna/import" "6.3.0" - "@lerna/info" "6.3.0" - "@lerna/init" "6.3.0" - "@lerna/link" "6.3.0" - "@lerna/list" "6.3.0" - "@lerna/publish" "6.3.0" - "@lerna/run" "6.3.0" - "@lerna/version" "6.3.0" - "@nrwl/devkit" ">=14.8.6 < 16" +lerna@^6.4.1: + version "6.4.1" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-6.4.1.tgz#a1e5abcb6c00de3367f50d75eca449e382525e0f" + integrity sha512-0t8TSG4CDAn5+vORjvTFn/ZEGyc4LOEsyBUpzcdIxODHPKM4TVOGvbW9dBs1g40PhOrQfwhHS+3fSx/42j42dQ== + dependencies: + "@lerna/add" "6.4.1" + "@lerna/bootstrap" "6.4.1" + "@lerna/changed" "6.4.1" + "@lerna/clean" "6.4.1" + "@lerna/cli" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/create" "6.4.1" + "@lerna/diff" "6.4.1" + "@lerna/exec" "6.4.1" + "@lerna/filter-options" "6.4.1" + "@lerna/import" "6.4.1" + "@lerna/info" "6.4.1" + "@lerna/init" "6.4.1" + "@lerna/link" "6.4.1" + "@lerna/list" "6.4.1" + "@lerna/publish" "6.4.1" + "@lerna/run" "6.4.1" + "@lerna/validation-error" "6.4.1" + "@lerna/version" "6.4.1" + "@nrwl/devkit" ">=15.4.2 < 16" import-local "^3.0.2" inquirer "^8.2.4" npmlog "^6.0.2" - nx ">=14.8.6 < 16" + nx ">=15.4.2 < 16" typescript "^3 || ^4" leven@^3.1.0: @@ -6170,6 +6235,11 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +lines-and-columns@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.3.tgz#b2f0badedb556b747020ab8ea7f0373e22efac1b" + integrity sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w== + load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -6433,9 +6503,9 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: brace-expansion "^1.1.7" minimatch@^5.0.1, minimatch@^5.1.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.2.tgz#0939d7d6f0898acbd1508abe534d1929368a8fff" - integrity sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg== + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== dependencies: brace-expansion "^2.0.1" @@ -6508,11 +6578,9 @@ minipass@^3.0.0, minipass@^3.1.1, minipass@^3.1.6, minipass@^3.3.5: yallist "^4.0.0" minipass@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.0.0.tgz#7cebb0f9fa7d56f0c5b17853cbe28838a8dbbd3b" - integrity sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw== - dependencies: - yallist "^4.0.0" + version "4.0.1" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.0.1.tgz#2b9408c6e81bb8b338d600fb3685e375a370a057" + integrity sha512-V9esFpNbK0arbN3fm2sxDKqMYgIp7XtVdE4Esj+PE4Qaaxdg1wIw48ITQIOn1sc8xXSmUviVL3cyjMqPlrVkiA== minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" @@ -6610,16 +6678,16 @@ node-addon-api@^3.2.1: integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + version "2.6.9" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.9.tgz#7c7f744b5cc6eb5fd404e0c7a9fec630a55657e6" + integrity sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg== dependencies: whatwg-url "^5.0.0" node-gyp-build@^4.3.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40" - integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg== + version "4.6.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" + integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== node-gyp@^9.0.0, node-gyp@^9.1.0: version "9.3.1" @@ -6642,10 +6710,10 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.6: - version "2.0.8" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.8.tgz#0f349cdc8fcfa39a92ac0be9bc48b7706292b9ae" - integrity sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A== +node-releases@^2.0.8: + version "2.0.9" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.9.tgz#fe66405285382b0c4ac6bcfbfbe7e8a510650b4d" + integrity sha512-2xfmOrRkGogbTK9R6Leda0DGiXeY3p2NJpy4+gNCffdUvV6mdEJnaDEic1i3Ec2djAo8jWYoJMR5PB0MSMpxUA== nopt@^5.0.0: version "5.0.0" @@ -6691,7 +6759,7 @@ normalize-package-data@^4.0.0: semver "^7.3.5" validate-npm-package-license "^3.0.4" -normalize-path@^3.0.0, normalize-path@~3.0.0: +normalize-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== @@ -6895,20 +6963,19 @@ npmlog@^6.0.0, npmlog@^6.0.2: gauge "^4.0.3" set-blocking "^2.0.0" -nx@15.4.4, "nx@>=14.8.6 < 16": - version "15.4.4" - resolved "https://registry.yarnpkg.com/nx/-/nx-15.4.4.tgz#4cb3d3861972c6fc75df50dd526a2c7e1a26410c" - integrity sha512-JWYeGcKsQVHR6nlk7XSL1/dAuSo2eyW+ahmMmK3j3vSnqRlZiN0q53ALZ4nD8VemAwtZCJ3CiOi4D/HExi5wbw== +nx@15.6.3, "nx@>=15.4.2 < 16": + version "15.6.3" + resolved "https://registry.yarnpkg.com/nx/-/nx-15.6.3.tgz#900087bce38c6e5975660c23ebd41ead1bf54f98" + integrity sha512-3t0A0GPLNen1yPAyE+VGZ3nkAzZYb5nfXtAcx8SHBlKq4u42yBY3khBmP1y4Og3jhIwFIj7J7Npeh8ZKrthmYQ== dependencies: - "@nrwl/cli" "15.4.4" - "@nrwl/tao" "15.4.4" + "@nrwl/cli" "15.6.3" + "@nrwl/tao" "15.6.3" "@parcel/watcher" "2.0.4" "@yarnpkg/lockfile" "^1.1.0" "@yarnpkg/parsers" "^3.0.0-rc.18" "@zkochan/js-yaml" "0.0.6" axios "^1.0.0" - chalk "4.1.0" - chokidar "^3.5.1" + chalk "^4.1.0" cli-cursor "3.1.0" cli-spinners "2.6.1" cliui "^7.0.2" @@ -6917,11 +6984,12 @@ nx@15.4.4, "nx@>=14.8.6 < 16": fast-glob "3.2.7" figures "3.2.0" flat "^5.0.2" - fs-extra "^10.1.0" + fs-extra "^11.1.0" glob "7.1.4" ignore "^5.0.4" js-yaml "4.1.0" jsonc-parser "3.2.0" + lines-and-columns "~2.0.3" minimatch "3.0.5" npm-run-path "^4.0.1" open "^8.4.0" @@ -6937,9 +7005,9 @@ nx@15.4.4, "nx@>=14.8.6 < 16": yargs-parser "21.1.1" object-inspect@^1.12.2, object-inspect@^1.9.0: - version "1.12.2" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" - integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== object-keys@^1.1.1: version "1.1.1" @@ -7260,7 +7328,7 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -7317,10 +7385,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.1.tgz#4e1fd11c34e2421bc1da9aea9bd8127cd0a35efc" - integrity sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg== +prettier@^2.8.3: + version "2.8.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632" + integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw== pretty-format@^28.1.3: version "28.1.3" @@ -7332,12 +7400,12 @@ pretty-format@^28.1.3: ansi-styles "^5.0.0" react-is "^18.0.0" -pretty-format@^29.0.0, pretty-format@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.3.1.tgz#1841cac822b02b4da8971dacb03e8a871b4722da" - integrity sha512-FyLnmb1cYJV8biEIiRyzRFvs2lry7PPIvOqKVe1GCUEYg4YGmlx1qG9EJNMxArYm7piII4qb8UV1Pncq5dxmcg== +pretty-format@^29.0.0, pretty-format@^29.4.1: + version "29.4.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.4.1.tgz#0da99b532559097b8254298da7c75a0785b1751c" + integrity sha512-dt/Z761JUVsrIKaY215o1xQJBGlSmTx/h4cSqXqjHLnU1+Kt+mavVE7UgqJJO5ukx5HjSswHfmXz4LjS2oIJfg== dependencies: - "@jest/schemas" "^29.0.0" + "@jest/schemas" "^29.4.0" ansi-styles "^5.0.0" react-is "^18.0.0" @@ -7405,14 +7473,14 @@ proxy-from-env@^1.1.0: integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== -pyright@^1.1.287: - version "1.1.287" - resolved "https://registry.yarnpkg.com/pyright/-/pyright-1.1.287.tgz#7edb5739e94422f7b6604e2f1909086bb53cf8ba" - integrity sha512-katsAvKQea24z3PLRsyRFlPFR4G/G7PduWM9XzYfnRNs0jx730xRYbwB9DoUJBxHJansf+HRhnG30H7Zzk22Tg== +pyright@^1.1.292: + version "1.1.292" + resolved "https://registry.yarnpkg.com/pyright/-/pyright-1.1.292.tgz#5f84bd925830803d0015f5e4ed47f45d57a4a4ba" + integrity sha512-qwNT2mBKiZXSzVckHkyuCoyrKa8CXh6o4xH7PL/+jeIdiv+a5ljfkxPvIEm6Stln8YEU/tnQb8xODUtgKsu5YA== q@^1.5.1: version "1.5.1" @@ -7554,13 +7622,6 @@ readdir-scoped-modules@^1.1.0: graceful-fs "^4.1.2" once "^1.3.0" -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - rechoir@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" @@ -7628,11 +7689,16 @@ resolve-from@^5.0.0: integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== resolve.exports@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" - integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== + version "1.1.1" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999" + integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ== + +resolve.exports@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.0.tgz#c1a0028c2d166ec2fbf7d0644584927e76e7400e" + integrity sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg== -resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22.0: +resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -7775,9 +7841,9 @@ sentence-case@^2.1.1: upper-case-first "^1.1.2" serialize-javascript@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + version "6.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" + integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== dependencies: randombytes "^2.1.0" @@ -8149,12 +8215,12 @@ supports-preserve-symlinks-flag@^1.0.0: integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== synckit@^0.8.4: - version "0.8.4" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.4.tgz#0e6b392b73fafdafcde56692e3352500261d64ec" - integrity sha512-Dn2ZkzMdSX827QbowGbU/4yjWuvNaCoScLLoMo/yKbu+P4GBR6cRGKZH27k6a9bRzdqcyd1DE96pQtQ6uNkmyw== + version "0.8.5" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.5.tgz#b7f4358f9bb559437f9f167eb6bc46b3c9818fa3" + integrity sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q== dependencies: "@pkgr/utils" "^2.3.1" - tslib "^2.4.0" + tslib "^2.5.0" tablemark@^2.0.0: version "2.0.0" @@ -8209,9 +8275,9 @@ terser-webpack-plugin@^5.1.3: terser "^5.14.1" terser@^5.14.1: - version "5.16.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.1.tgz#5af3bc3d0f24241c7fb2024199d5c461a1075880" - integrity sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw== + version "5.16.2" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.2.tgz#8f495819439e8b5c150e7530fc434a6e70ea18b2" + integrity sha512-JKuM+KvvWVqT7muHVyrwv7FVRPnmHDwF6XwoIxdbF5Witi0vu99RYpxDexpJndXt3jbZZmmWr2/mQa6HvSNdSg== dependencies: "@jridgewell/source-map" "^0.3.2" acorn "^8.5.0" @@ -8359,10 +8425,10 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" - integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== +tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== tsutils@^3.21.0: version "3.21.0" @@ -8413,6 +8479,15 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +typed-array-length@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" + integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + is-typed-array "^1.1.9" + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -8440,9 +8515,9 @@ typescript-json-schema@^0.55.0: yargs "^17.1.1" "typescript@^3 || ^4": - version "4.9.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" - integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== typescript@~3.9.10: version "3.9.10" @@ -8508,7 +8583,7 @@ upath@^2.0.1: resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b" integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== -update-browserslist-db@^1.0.9: +update-browserslist-db@^1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== @@ -8704,6 +8779,18 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q== +which-typed-array@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" + integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + is-typed-array "^1.1.10" + which@^2.0.1, which@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -8788,6 +8875,14 @@ write-file-atomic@^4.0.0, write-file-atomic@^4.0.1: imurmurhash "^0.1.4" signal-exit "^3.0.7" +write-file-atomic@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.0.tgz#54303f117e109bf3d540261125c8ea5a7320fab0" + integrity sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^3.0.7" + write-json-file@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" From 7697571542df82b5d228faf85d0e637edb254519 Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Fri, 3 Feb 2023 16:52:18 +0100 Subject: [PATCH 07/14] fix(go): shorten file names for sub-packages (#3927) CDKTF is running into build issues one some providers due to file names being too long for golang to handle: https://github.com/cdktf/cdktf-provider-googlebeta/actions/runs/4002506018/jobs/6869839656#step:8:11 This is my slightly naive try to get rid of a few characters (especially with long package names) --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 --- packages/@jsii/java-runtime/pom.xml.t.js | 2 +- .../jsii-pacmak/lib/targets/go/package.ts | 25 +- .../__snapshots__/examples.test.js.snap | 426 +- .../__snapshots__/target-go.test.js.snap | 41030 ++++++++-------- 4 files changed, 20733 insertions(+), 20750 deletions(-) diff --git a/packages/@jsii/java-runtime/pom.xml.t.js b/packages/@jsii/java-runtime/pom.xml.t.js index 34fab4329c..2489f00498 100644 --- a/packages/@jsii/java-runtime/pom.xml.t.js +++ b/packages/@jsii/java-runtime/pom.xml.t.js @@ -64,7 +64,7 @@ process.stdout.write(` [1.3.2,1.4.0) [13.0.0,24.0-a0) [5.8.0,5.10-a0) - [3.12.4,4.0-a0) + [4.11.0,5.0-a0) 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-go.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap index 83d963d183..e0ee5d1573 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,1230 +3354,769 @@ 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 -`; - -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. +func (j *jsiiProxy_AllTypes) StringProperty() *string { + var returns *string + _jsii_.Get( + j, + "stringProperty", + &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. +func (j *jsiiProxy_AllTypes) UnionArrayProperty() *[]interface{} { + var returns *[]interface{} + _jsii_.Get( + j, + "unionArrayProperty", + &returns, + ) + return returns +} - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. +func (j *jsiiProxy_AllTypes) UnionMapProperty() *map[string]interface{} { + var returns *map[string]interface{} + _jsii_.Get( + j, + "unionMapProperty", + &returns, + ) + return returns +} - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. +func (j *jsiiProxy_AllTypes) UnionProperty() interface{} { + var returns interface{} + _jsii_.Get( + j, + "unionProperty", + &returns, + ) + return returns +} - "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. +func (j *jsiiProxy_AllTypes) UnknownArrayProperty() *[]interface{} { + var returns *[]interface{} + _jsii_.Get( + j, + "unknownArrayProperty", + &returns, + ) + return returns +} - "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). +func (j *jsiiProxy_AllTypes) UnknownMapProperty() *map[string]interface{} { + var returns *map[string]interface{} + _jsii_.Get( + j, + "unknownMapProperty", + &returns, + ) + return returns +} - "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 (j *jsiiProxy_AllTypes) UnknownProperty() interface{} { + var returns interface{} + _jsii_.Get( + j, + "unknownProperty", + &returns, + ) + return returns +} - "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. +func NewAllTypes() AllTypes { + _init_.Initialize() - 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. + j := jsiiProxy_AllTypes{} - 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. + _jsii_.Create( + "jsii-calc.AllTypes", + nil, // no parameters + &j, + ) - 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: + return &j +} - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and +func NewAllTypes_Override(a AllTypes) { + _init_.Initialize() - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + _jsii_.Create( + "jsii-calc.AllTypes", + nil, // no parameters + a, + ) +} - (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)SetAnyArrayProperty(val *[]interface{}) { + _jsii_.Set( + j, + "anyArrayProperty", + 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)SetAnyMapProperty(val *map[string]interface{}) { + _jsii_.Set( + j, + "anyMapProperty", + 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)SetAnyProperty(val interface{}) { + _jsii_.Set( + j, + "anyProperty", + 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)SetArrayProperty(val *[]*string) { + _jsii_.Set( + j, + "arrayProperty", + 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)SetBooleanProperty(val *bool) { + _jsii_.Set( + j, + "booleanProperty", + 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)SetDateProperty(val *time.Time) { + _jsii_.Set( + j, + "dateProperty", + 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)SetEnumProperty(val AllTypesEnum) { + _jsii_.Set( + j, + "enumProperty", + 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)SetJsonProperty(val *map[string]interface{}) { + _jsii_.Set( + j, + "jsonProperty", + val, + ) +} - END OF TERMS AND CONDITIONS +func (j *jsiiProxy_AllTypes)SetMapProperty(val *map[string]scopejsiicalclib.Number) { + _jsii_.Set( + j, + "mapProperty", + val, + ) +} - APPENDIX: How to apply the Apache License to your work. +func (j *jsiiProxy_AllTypes)SetNumberProperty(val *float64) { + _jsii_.Set( + j, + "numberProperty", + 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)SetOptionalEnumValue(val StringEnum) { + _jsii_.Set( + j, + "optionalEnumValue", + val, + ) +} - Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +func (j *jsiiProxy_AllTypes)SetStringProperty(val *string) { + _jsii_.Set( + j, + "stringProperty", + 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 (j *jsiiProxy_AllTypes)SetUnionArrayProperty(val *[]interface{}) { + _jsii_.Set( + j, + "unionArrayProperty", + val, + ) +} - http://www.apache.org/licenses/LICENSE-2.0 +func (j *jsiiProxy_AllTypes)SetUnionMapProperty(val *map[string]interface{}) { + _jsii_.Set( + j, + "unionMapProperty", + val, + ) +} - 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. -`; +func (j *jsiiProxy_AllTypes)SetUnionProperty(val interface{}) { + _jsii_.Set( + j, + "unionProperty", + val, + ) +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/NOTICE 1`] = ` -jsii -Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +func (j *jsiiProxy_AllTypes)SetUnknownArrayProperty(val *[]interface{}) { + _jsii_.Set( + j, + "unknownArrayProperty", + val, + ) +} -`; +func (j *jsiiProxy_AllTypes)SetUnknownMapProperty(val *map[string]interface{}) { + _jsii_.Set( + j, + "unknownMapProperty", + val, + ) +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/README.md 1`] = ` -# jsii Calculator +func (j *jsiiProxy_AllTypes)SetUnknownProperty(val interface{}) { + _jsii_.Set( + j, + "unknownProperty", + val, + ) +} -This library is used to demonstrate and test the features of JSII +func (a *jsiiProxy_AllTypes) AnyIn(inp interface{}) { + _jsii_.InvokeVoid( + a, + "anyIn", + []interface{}{inp}, + ) +} -## How to use running sum API: +func (a *jsiiProxy_AllTypes) AnyOut() interface{} { + var returns interface{} -First, create a calculator: + _jsii_.Invoke( + a, + "anyOut", + nil, // no parameters + &returns, + ) -\`\`\`go -calculator := calc.NewCalculator() -\`\`\` + return returns +} -Then call some operations: +func (a *jsiiProxy_AllTypes) EnumMethod(value StringEnum) StringEnum { + var returns StringEnum -\`\`\`go -calculator.Add(jsii.Number(10)) -\`\`\` + _jsii_.Invoke( + a, + "enumMethod", + []interface{}{value}, + &returns, + ) -## Code Samples + return returns +} -\`\`\`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/AllTypesEnum.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -import ( - "reflect" - _jsii_ "github.com/aws/jsii-runtime-go/runtime" +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" ) -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{} - }, - ) -} `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/anonymous_IOptionA.go 1`] = ` -package anonymous +exports[`Generated code for "jsii-calc": /go/jsiicalc/AllowedMethodNames.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 IOptionA interface { - DoSomething() *string +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 for IOptionA -type jsiiProxy_IOptionA struct { +// The jsii proxy struct for AllowedMethodNames +type jsiiProxy_AllowedMethodNames struct { _ byte // padding } -func (i *jsiiProxy_IOptionA) DoSomething() *string { - var returns *string +func NewAllowedMethodNames() AllowedMethodNames { + _init_.Initialize() - _jsii_.Invoke( - i, - "doSomething", - nil, // no parameters - &returns, + j := jsiiProxy_AllowedMethodNames{} + + _jsii_.Create( + "jsii-calc.AllowedMethodNames", + nil, // no parameters + &j, ) - return returns + return &j } +func NewAllowedMethodNames_Override(a AllowedMethodNames) { + _init_.Initialize() -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/anonymous_IOptionB.go 1`] = ` -package anonymous - -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -type IOptionB interface { - DoSomethingElse() *string + _jsii_.Create( + "jsii-calc.AllowedMethodNames", + nil, // no parameters + a, + ) } -// The jsii proxy for IOptionB -type jsiiProxy_IOptionB struct { - _ byte // padding +func (a *jsiiProxy_AllowedMethodNames) GetBar(_p1 *string, _p2 *float64) { + _jsii_.InvokeVoid( + a, + "getBar", + []interface{}{_p1, _p2}, + ) } -func (i *jsiiProxy_IOptionB) DoSomethingElse() *string { +func (a *jsiiProxy_AllowedMethodNames) GetFoo(withParam *string) *string { var returns *string _jsii_.Invoke( - i, - "doSomethingElse", - 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_UseOptions.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 UseOptions interface { +type AmbiguousParameters interface { + Props() *StructParameterType + Scope() Bell } -// The jsii proxy struct for UseOptions -type jsiiProxy_UseOptions struct { +// The jsii proxy struct for AmbiguousParameters +type jsiiProxy_AmbiguousParameters struct { _ byte // padding } -func UseOptions_Consume(option interface{}) *string { - _init_.Initialize() - - var returns *string - - _jsii_.StaticInvoke( - "jsii-calc.anonymous.UseOptions", - "consume", - []interface{}{option}, +func (j *jsiiProxy_AmbiguousParameters) Props() *StructParameterType { + var returns *StructParameterType + _jsii_.Get( + j, + "props", &returns, ) - return returns } -func UseOptions_PrivideAsAny(which *string) interface{} { - _init_.Initialize() - - var returns interface{} - - _jsii_.StaticInvoke( - "jsii-calc.anonymous.UseOptions", - "privideAsAny", - []interface{}{which}, +func (j *jsiiProxy_AmbiguousParameters) Scope() Bell { + var returns Bell + _jsii_.Get( + j, + "scope", &returns, ) - return returns } -func UseOptions_Provide(which *string) interface{} { + +func NewAmbiguousParameters(scope Bell, props *StructParameterType) AmbiguousParameters { _init_.Initialize() - var returns interface{} + j := jsiiProxy_AmbiguousParameters{} - _jsii_.StaticInvoke( - "jsii-calc.anonymous.UseOptions", - "provide", - []interface{}{which}, - &returns, + _jsii_.Create( + "jsii-calc.AmbiguousParameters", + []interface{}{scope, props}, + &j, ) - return returns + return &j } +func NewAmbiguousParameters_Override(a AmbiguousParameters, scope Bell, props *StructParameterType) { + _init_.Initialize() -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/cdk16625.go 1`] = ` -package cdk16625 - -import ( - "reflect" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -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{} - }, + _jsii_.Create( + "jsii-calc.AmbiguousParameters", + []interface{}{scope, props}, + a, ) } + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/cdk16625_Cdk16625.go 1`] = ` -package cdk16625 +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" - - "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3" ) -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 +type AnonymousImplementationProvider interface { + IAnonymousImplementationProvider + ProvideAsClass() Implementation + ProvideAsInterface() IAnonymouslyImplementMe } -// The jsii proxy struct for Cdk16625 -type jsiiProxy_Cdk16625 struct { - _ byte // padding +// The jsii proxy struct for AnonymousImplementationProvider +type jsiiProxy_AnonymousImplementationProvider struct { + jsiiProxy_IAnonymousImplementationProvider } -func NewCdk16625_Override(c Cdk16625) { +func NewAnonymousImplementationProvider() AnonymousImplementationProvider { _init_.Initialize() + j := jsiiProxy_AnonymousImplementationProvider{} + _jsii_.Create( - "jsii-calc.cdk16625.Cdk16625", + "jsii-calc.AnonymousImplementationProvider", nil, // no parameters - c, + &j, ) + + return &j } -func (c *jsiiProxy_Cdk16625) Test() { - _jsii_.InvokeVoid( - c, - "test", +func NewAnonymousImplementationProvider_Override(a AnonymousImplementationProvider) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.AnonymousImplementationProvider", nil, // no parameters + a, ) } -func (c *jsiiProxy_Cdk16625) Unwrap(gen jsiicalc.IRandomNumberGenerator) *float64 { - var returns *float64 +func (a *jsiiProxy_AnonymousImplementationProvider) ProvideAsClass() Implementation { + var returns Implementation _jsii_.Invoke( - c, - "unwrap", - []interface{}{gen}, + a, + "provideAsClass", + nil, // no parameters &returns, ) return returns } +func (a *jsiiProxy_AnonymousImplementationProvider) ProvideAsInterface() IAnonymouslyImplementMe { + var returns IAnonymouslyImplementMe -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/donotimport.go 1`] = ` -package donotimport - -import ( - "reflect" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -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 - }, + _jsii_.Invoke( + a, + "provideAsInterface", + 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/AsyncVirtualMethods.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. +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. // - // Returns: 1337. - Next() *float64 + // 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 } -// The jsii proxy struct for UnimportedSubmoduleType -type jsiiProxy_UnimportedSubmoduleType struct { - internal.Type__jsiicalcIRandomNumberGenerator +// The jsii proxy struct for AsyncVirtualMethods +type jsiiProxy_AsyncVirtualMethods struct { + _ byte // padding } -func NewUnimportedSubmoduleType(value *float64) UnimportedSubmoduleType { +func NewAsyncVirtualMethods() AsyncVirtualMethods { _init_.Initialize() - j := jsiiProxy_UnimportedSubmoduleType{} + j := jsiiProxy_AsyncVirtualMethods{} _jsii_.Create( - "jsii-calc.cdk16625.donotimport.UnimportedSubmoduleType", - []interface{}{value}, + "jsii-calc.AsyncVirtualMethods", + nil, // no parameters &j, ) return &j } -func NewUnimportedSubmoduleType_Override(u UnimportedSubmoduleType, value *float64) { +func NewAsyncVirtualMethods_Override(a AsyncVirtualMethods) { _init_.Initialize() _jsii_.Create( - "jsii-calc.cdk16625.donotimport.UnimportedSubmoduleType", - []interface{}{value}, - u, + "jsii-calc.AsyncVirtualMethods", + nil, // no parameters + a, ) } -func (u *jsiiProxy_UnimportedSubmoduleType) Next() *float64 { +func (a *jsiiProxy_AsyncVirtualMethods) CallMe() *float64 { var returns *float64 _jsii_.Invoke( - u, - "next", + a, + "callMe", nil, // no parameters &returns, ) @@ -3515,391 +4124,216 @@ func (u *jsiiProxy_UnimportedSubmoduleType) Next() *float64 { return returns } +func (a *jsiiProxy_AsyncVirtualMethods) CallMe2() *float64 { + var returns *float64 -`; + _jsii_.Invoke( + a, + "callMe2", + nil, // no parameters + &returns, + ) -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 + return returns +} -`; +func (a *jsiiProxy_AsyncVirtualMethods) CallMeDoublePromise() *float64 { + var returns *float64 -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/cdk22369.go 1`] = ` -package cdk22369 + _jsii_.Invoke( + a, + "callMeDoublePromise", + nil, // no parameters + &returns, + ) -import ( - "reflect" + return returns +} - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) +func (a *jsiiProxy_AsyncVirtualMethods) DontOverrideMe() *float64 { + var returns *float64 -func init() { - _jsii_.RegisterClass( - "jsii-calc.cdk22369.AcceptsPath", - reflect.TypeOf((*AcceptsPath)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_AcceptsPath{} - }, + _jsii_.Invoke( + a, + "dontOverrideMe", + nil, // no parameters + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.cdk22369.AcceptsPathProps", - reflect.TypeOf((*AcceptsPathProps)(nil)).Elem(), + + 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/cdk22369/cdk22369_AcceptsPath.go 1`] = ` -package cdk22369 +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" ) -type AcceptsPath interface { +type AugmentableClass interface { + MethodOne() + MethodTwo() } -// The jsii proxy struct for AcceptsPath -type jsiiProxy_AcceptsPath struct { +// The jsii proxy struct for AugmentableClass +type jsiiProxy_AugmentableClass struct { _ byte // padding } -func NewAcceptsPath(props *AcceptsPathProps) AcceptsPath { +func NewAugmentableClass() AugmentableClass { _init_.Initialize() - j := jsiiProxy_AcceptsPath{} + j := jsiiProxy_AugmentableClass{} _jsii_.Create( - "jsii-calc.cdk22369.AcceptsPath", - []interface{}{props}, + "jsii-calc.AugmentableClass", + nil, // no parameters &j, ) return &j } -func NewAcceptsPath_Override(a AcceptsPath, props *AcceptsPathProps) { +func NewAugmentableClass_Override(a AugmentableClass) { _init_.Initialize() _jsii_.Create( - "jsii-calc.cdk22369.AcceptsPath", - []interface{}{props}, + "jsii-calc.AugmentableClass", + nil, // no parameters a, ) } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/cdk22369_AcceptsPathProps.go 1`] = ` -package cdk22369 - - -type AcceptsPathProps struct { - // A path that doesn't exist. - SourcePath *string \`field:"required" json:"sourcePath" yaml:"sourcePath"\` +func (a *jsiiProxy_AugmentableClass) MethodOne() { + _jsii_.InvokeVoid( + a, + "methodOne", + nil, // no parameters + ) } - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/composition.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, - }, +func (a *jsiiProxy_AugmentableClass) MethodTwo() { + _jsii_.InvokeVoid( + a, + "methodTwo", + 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/BaseClass.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/scopejsiicalclib" ) -// 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) - // 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) - // 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{} +type BaseClass interface { + Property() *string + Method() *float64 } -// The jsii proxy struct for CompositeOperation -type jsiiProxy_CompositeOperation struct { - internal.Type__scopejsiicalclibOperation +// The jsii proxy struct for BaseClass +type jsiiProxy_BaseClass struct { + _ byte // padding } -func (j *jsiiProxy_CompositeOperation) DecorationPostfixes() *[]*string { - var returns *[]*string +func (j *jsiiProxy_BaseClass) Property() *string { + var returns *string _jsii_.Get( j, - "decorationPostfixes", + "property", &returns, ) return returns } -func (j *jsiiProxy_CompositeOperation) DecorationPrefixes() *[]*string { - var returns *[]*string - _jsii_.Get( - j, - "decorationPrefixes", + +func NewBaseClass_Override(b BaseClass) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.BaseClass", + nil, // no parameters + b, + ) +} + +func (b *jsiiProxy_BaseClass) Method() *float64 { + var returns *float64 + + _jsii_.Invoke( + b, + "method", + nil, // no parameters &returns, ) + return returns } -func (j *jsiiProxy_CompositeOperation) Expression() scopejsiicalclib.NumericValue { - var returns scopejsiicalclib.NumericValue - _jsii_.Get( - j, - "expression", - &returns, - ) - return returns -} - -func (j *jsiiProxy_CompositeOperation) StringStyle() CompositeOperation_CompositionStringStyle { - var returns CompositeOperation_CompositionStringStyle - _jsii_.Get( - j, - "stringStyle", - &returns, - ) - return returns -} - -func (j *jsiiProxy_CompositeOperation) Value() *float64 { - var returns *float64 - _jsii_.Get( - j, - "value", - &returns, - ) - return returns -} - - -func NewCompositeOperation_Override(c CompositeOperation) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.composition.CompositeOperation", - nil, // no parameters - c, - ) -} - -func (j *jsiiProxy_CompositeOperation)SetDecorationPostfixes(val *[]*string) { - _jsii_.Set( - j, - "decorationPostfixes", - val, - ) -} - -func (j *jsiiProxy_CompositeOperation)SetDecorationPrefixes(val *[]*string) { - _jsii_.Set( - j, - "decorationPrefixes", - val, - ) -} - -func (j *jsiiProxy_CompositeOperation)SetStringStyle(val CompositeOperation_CompositionStringStyle) { - _jsii_.Set( - j, - "stringStyle", - val, - ) -} - -func (c *jsiiProxy_CompositeOperation) ToString() *string { - var returns *string - - _jsii_.Invoke( - c, - "toString", - nil, // no parameters - &returns, - ) - - return returns -} - -func (c *jsiiProxy_CompositeOperation) TypeName() interface{} { - var returns interface{} - - _jsii_.Invoke( - c, - "typeName", - nil, // no parameters - &returns, - ) - - return returns -} - - -`; - -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 - -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/derivedclasshasnoproperties/derivedclasshasnoproperties.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/derivedclasshasnoproperties/derivedclasshasnoproperties_Base.go 1`] = ` -package derivedclasshasnoproperties +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 Base interface { - Prop() *string - SetProp(val *string) +type BaseJsii976 interface { } -// The jsii proxy struct for Base -type jsiiProxy_Base struct { +// The jsii proxy struct for BaseJsii976 +type jsiiProxy_BaseJsii976 struct { _ byte // padding } -func (j *jsiiProxy_Base) Prop() *string { - var returns *string - _jsii_.Get( - j, - "prop", - &returns, - ) - return returns -} - - -func NewBase() Base { +func NewBaseJsii976() BaseJsii976 { _init_.Initialize() - j := jsiiProxy_Base{} + j := jsiiProxy_BaseJsii976{} _jsii_.Create( - "jsii-calc.DerivedClassHasNoProperties.Base", + "jsii-calc.BaseJsii976", nil, // no parameters &j, ) @@ -3907,64 +4341,58 @@ func NewBase() Base { return &j } -func NewBase_Override(b Base) { +func NewBaseJsii976_Override(b BaseJsii976) { _init_.Initialize() _jsii_.Create( - "jsii-calc.DerivedClassHasNoProperties.Base", + "jsii-calc.BaseJsii976", nil, // no parameters b, ) } -func (j *jsiiProxy_Base)SetProp(val *string) { - _jsii_.Set( - j, - "prop", - val, - ) -} - `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Derived.go 1`] = ` -package derivedclasshasnoproperties +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 Derived interface { - Base - Prop() *string - SetProp(val *string) +type Bell interface { + IBell + Rung() *bool + SetRung(val *bool) + Ring() } -// The jsii proxy struct for Derived -type jsiiProxy_Derived struct { - jsiiProxy_Base +// The jsii proxy struct for Bell +type jsiiProxy_Bell struct { + jsiiProxy_IBell } -func (j *jsiiProxy_Derived) Prop() *string { - var returns *string +func (j *jsiiProxy_Bell) Rung() *bool { + var returns *bool _jsii_.Get( j, - "prop", + "rung", &returns, ) return returns } -func NewDerived() Derived { +func NewBell() Bell { _init_.Initialize() - j := jsiiProxy_Derived{} + j := jsiiProxy_Bell{} _jsii_.Create( - "jsii-calc.DerivedClassHasNoProperties.Derived", + "jsii-calc.Bell", nil, // no parameters &j, ) @@ -3972,2871 +4400,2945 @@ func NewDerived() Derived { return &j } -func NewDerived_Override(d Derived) { +func NewBell_Override(b Bell) { _init_.Initialize() _jsii_.Create( - "jsii-calc.DerivedClassHasNoProperties.Derived", + "jsii-calc.Bell", nil, // no parameters - d, + b, ) } -func (j *jsiiProxy_Derived)SetProp(val *string) { +func (j *jsiiProxy_Bell)SetRung(val *bool) { _jsii_.Set( j, - "prop", + "rung", val, ) } - -`; - -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/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 (b *jsiiProxy_Bell) Ring() { + _jsii_.InvokeVoid( + b, + "ring", + nil, // no parameters ) } + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/bar_Consumer.go 1`] = ` -package bar +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/internal" + "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib" ) -type Consumer interface { +// 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{} } -// The jsii proxy struct for Consumer -type jsiiProxy_Consumer struct { - _ byte // padding +// The jsii proxy struct for BinaryOperation +type jsiiProxy_BinaryOperation struct { + internal.Type__scopejsiicalclibOperation + internal.Type__scopejsiicalclibIFriendly } -func Consumer_Consume(props *ConsumerProps) *Homonymous { - _init_.Initialize() - - var returns *Homonymous - - _jsii_.StaticInvoke( - "jsii-calc.homonymousForwardReferences.bar.Consumer", - "consume", - []interface{}{props}, +func (j *jsiiProxy_BinaryOperation) Lhs() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue + _jsii_.Get( + j, + "lhs", &returns, ) - 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/homonymousforwardreferences/bar/bar_ConsumerProps.go 1`] = ` -package bar +// Creates a BinaryOperation. +func NewBinaryOperation_Override(b BinaryOperation, lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) { + _init_.Initialize() -type ConsumerProps struct { - Homonymous *Homonymous \`field:"required" json:"homonymous" yaml:"homonymous"\` + _jsii_.Create( + "jsii-calc.BinaryOperation", + []interface{}{lhs, rhs}, + b, + ) } +func (b *jsiiProxy_BinaryOperation) Hello() *string { + var returns *string -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/bar_Homonymous.go 1`] = ` -package bar - + _jsii_.Invoke( + b, + "hello", + nil, // no parameters + &returns, + ) -type Homonymous struct { - NumericProperty *float64 \`field:"required" json:"numericProperty" yaml:"numericProperty"\` + return returns } +func (b *jsiiProxy_BinaryOperation) ToString() *string { + var returns *string -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo.go 1`] = ` -package foo + _jsii_.Invoke( + b, + "toString", + nil, // no parameters + &returns, + ) -import ( - "reflect" + return returns +} - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) +func (b *jsiiProxy_BinaryOperation) TypeName() interface{} { + var returns interface{} -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(), + _jsii_.Invoke( + b, + "typeName", + nil, // no parameters + &returns, ) + + return returns } + `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo_Consumer.go 1`] = ` -package foo +exports[`Generated code for "jsii-calc": /go/jsiicalc/BurriedAnonymousObject.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 { +// 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 Consumer -type jsiiProxy_Consumer struct { +// The jsii proxy struct for BurriedAnonymousObject +type jsiiProxy_BurriedAnonymousObject struct { _ byte // padding } -func Consumer_Consume(props *ConsumerProps) *Homonymous { +func NewBurriedAnonymousObject_Override(b BurriedAnonymousObject) { _init_.Initialize() - var returns *Homonymous - - _jsii_.StaticInvoke( - "jsii-calc.homonymousForwardReferences.foo.Consumer", - "consume", - []interface{}{props}, - &returns, + _jsii_.Create( + "jsii-calc.BurriedAnonymousObject", + nil, // no parameters + b, ) - - return returns } +func (b *jsiiProxy_BurriedAnonymousObject) Check() *bool { + var returns *bool -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo_ConsumerProps.go 1`] = ` -package foo - + _jsii_.Invoke( + b, + "check", + nil, // no parameters + &returns, + ) -type ConsumerProps struct { - Homonymous *Homonymous \`field:"required" json:"homonymous" yaml:"homonymous"\` + return returns } +func (b *jsiiProxy_BurriedAnonymousObject) GiveItBack(value interface{}) interface{} { + var returns interface{} -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo_Homonymous.go 1`] = ` -package foo - + _jsii_.Invoke( + b, + "giveItBack", + []interface{}{value}, + &returns, + ) -type Homonymous struct { - StringProperty *string \`field:"required" json:"stringProperty" yaml:"stringProperty"\` + return returns } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceincludesclasses/interfaceinnamespaceincludesclasses.go 1`] = ` -package interfaceinnamespaceincludesclasses - -import ( - "reflect" - - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) - -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(), - ) -} - -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceincludesclasses/interfaceinnamespaceincludesclasses_Foo.go 1`] = ` -package interfaceinnamespaceincludesclasses +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" -) -type Foo interface { - Bar() *string - SetBar(val *string) + "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{} } -// The jsii proxy struct for Foo -type jsiiProxy_Foo struct { - _ byte // padding +// The jsii proxy struct for Calculator +type jsiiProxy_Calculator struct { + internal.Type__compositionCompositeOperation } -func (j *jsiiProxy_Foo) Bar() *string { - var returns *string +func (j *jsiiProxy_Calculator) Curr() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue _jsii_.Get( j, - "bar", + "curr", &returns, ) return returns } +func (j *jsiiProxy_Calculator) DecorationPostfixes() *[]*string { + var returns *[]*string + _jsii_.Get( + j, + "decorationPostfixes", + &returns, + ) + return returns +} -func NewFoo() Foo { +func (j *jsiiProxy_Calculator) DecorationPrefixes() *[]*string { + var returns *[]*string + _jsii_.Get( + j, + "decorationPrefixes", + &returns, + ) + return returns +} + +func (j *jsiiProxy_Calculator) Expression() scopejsiicalclib.NumericValue { + var returns scopejsiicalclib.NumericValue + _jsii_.Get( + j, + "expression", + &returns, + ) + return returns +} + +func (j *jsiiProxy_Calculator) MaxValue() *float64 { + var returns *float64 + _jsii_.Get( + j, + "maxValue", + &returns, + ) + return returns +} + +func (j *jsiiProxy_Calculator) OperationsLog() *[]scopejsiicalclib.NumericValue { + var returns *[]scopejsiicalclib.NumericValue + _jsii_.Get( + j, + "operationsLog", + &returns, + ) + return returns +} + +func (j *jsiiProxy_Calculator) OperationsMap() *map[string]*[]scopejsiicalclib.NumericValue { + var returns *map[string]*[]scopejsiicalclib.NumericValue + _jsii_.Get( + j, + "operationsMap", + &returns, + ) + return returns +} + +func (j *jsiiProxy_Calculator) StringStyle() composition.CompositeOperation_CompositionStringStyle { + var returns composition.CompositeOperation_CompositionStringStyle + _jsii_.Get( + j, + "stringStyle", + &returns, + ) + return returns +} + +func (j *jsiiProxy_Calculator) UnionProperty() interface{} { + var returns interface{} + _jsii_.Get( + j, + "unionProperty", + &returns, + ) + return returns +} + +func (j *jsiiProxy_Calculator) Value() *float64 { + var returns *float64 + _jsii_.Get( + j, + "value", + &returns, + ) + return returns +} + + +// Creates a Calculator object. +func NewCalculator(props *CalculatorProps) Calculator { _init_.Initialize() - j := jsiiProxy_Foo{} + j := jsiiProxy_Calculator{} _jsii_.Create( - "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo", - nil, // no parameters + "jsii-calc.Calculator", + []interface{}{props}, &j, ) return &j } -func NewFoo_Override(f Foo) { +// Creates a Calculator object. +func NewCalculator_Override(c Calculator, props *CalculatorProps) { _init_.Initialize() _jsii_.Create( - "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo", - nil, // no parameters - f, + "jsii-calc.Calculator", + []interface{}{props}, + c, ) } -func (j *jsiiProxy_Foo)SetBar(val *string) { +func (j *jsiiProxy_Calculator)SetCurr(val scopejsiicalclib.NumericValue) { _jsii_.Set( j, - "bar", + "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/interfaceinnamespaceincludesclasses/interfaceinnamespaceincludesclasses_Hello.go 1`] = ` -package interfaceinnamespaceincludesclasses +func (j *jsiiProxy_Calculator)SetMaxValue(val *float64) { + _jsii_.Set( + j, + "maxValue", + val, + ) +} +func (j *jsiiProxy_Calculator)SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) { + _jsii_.Set( + j, + "stringStyle", + val, + ) +} -type Hello struct { - Foo *float64 \`field:"required" json:"foo" yaml:"foo"\` +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}, + ) +} -`; +func (c *jsiiProxy_Calculator) Mul(value *float64) { + _jsii_.InvokeVoid( + c, + "mul", + []interface{}{value}, + ) +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceonlyinterface/interfaceinnamespaceonlyinterface.go 1`] = ` -package interfaceinnamespaceonlyinterface +func (c *jsiiProxy_Calculator) Neg() { + _jsii_.InvokeVoid( + c, + "neg", + nil, // no parameters + ) +} -import ( - "reflect" +func (c *jsiiProxy_Calculator) Pow(value *float64) { + _jsii_.InvokeVoid( + c, + "pow", + []interface{}{value}, + ) +} - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) +func (c *jsiiProxy_Calculator) ReadUnionValue() *float64 { + var returns *float64 -func init() { - _jsii_.RegisterStruct( - "jsii-calc.InterfaceInNamespaceOnlyInterface.Hello", - reflect.TypeOf((*Hello)(nil)).Elem(), + _jsii_.Invoke( + c, + "readUnionValue", + nil, // no parameters + &returns, ) -} -`; + return returns +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceonlyinterface/interfaceinnamespaceonlyinterface_Hello.go 1`] = ` -package interfaceinnamespaceonlyinterface +func (c *jsiiProxy_Calculator) ToString() *string { + var returns *string + _jsii_.Invoke( + c, + "toString", + nil, // no parameters + &returns, + ) -type Hello struct { - Foo *float64 \`field:"required" json:"foo" yaml:"foo"\` + return returns } +func (c *jsiiProxy_Calculator) TypeName() interface{} { + var returns interface{} -`; + _jsii_.Invoke( + c, + "typeName", + nil, // no parameters + &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 +exports[`Generated code for "jsii-calc": /go/jsiicalc/CalculatorProps.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -import ( - _ "embed" - _jsii_ "github.com/aws/jsii-runtime-go/runtime" +// 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"\` +} - 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() +exports[`Generated code for "jsii-calc": /go/jsiicalc/ChildStruct982.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc - // Load this library into the kernel - _jsii_.Load("jsii-calc", "3.20.120", tarball) + +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/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 +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassThatImplementsTheInternalInterface.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.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{} - }, - ) +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 ClassThatImplementsTheInternalInterface +type jsiiProxy_ClassThatImplementsTheInternalInterface struct { + jsiiProxy_INonInternalInterface +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/jsii3656_ImplementMeOpts.go 1`] = ` -package jsii3656 +func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) A() *string { + var returns *string + _jsii_.Get( + j, + "a", + &returns, + ) + return returns +} +func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) B() *string { + var returns *string + _jsii_.Get( + j, + "b", + &returns, + ) + return returns +} -type ImplementMeOpts struct { - Name *string \`field:"required" json:"name" yaml:"name"\` - Count *float64 \`field:"optional" json:"count" yaml:"count"\` +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 +} -`; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/jsii3656_OverrideMe.go 1`] = ` -package jsii3656 +func NewClassThatImplementsTheInternalInterface() ClassThatImplementsTheInternalInterface { + _init_.Initialize() -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" - _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii" -) + j := jsiiProxy_ClassThatImplementsTheInternalInterface{} -type OverrideMe interface { - ImplementMe(opts *ImplementMeOpts) *bool -} + _jsii_.Create( + "jsii-calc.ClassThatImplementsTheInternalInterface", + nil, // no parameters + &j, + ) -// The jsii proxy struct for OverrideMe -type jsiiProxy_OverrideMe struct { - _ byte // padding + return &j } -func NewOverrideMe_Override(o OverrideMe) { +func NewClassThatImplementsTheInternalInterface_Override(c ClassThatImplementsTheInternalInterface) { _init_.Initialize() _jsii_.Create( - "jsii-calc.jsii3656.OverrideMe", + "jsii-calc.ClassThatImplementsTheInternalInterface", nil, // no parameters - o, + c, ) } -func OverrideMe_CallAbstract(receiver OverrideMe) *bool { - _init_.Initialize() - - var returns *bool - - _jsii_.StaticInvoke( - "jsii-calc.jsii3656.OverrideMe", - "callAbstract", - []interface{}{receiver}, - &returns, +func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetA(val *string) { + _jsii_.Set( + j, + "a", + val, ) - - return returns } -func (o *jsiiProxy_OverrideMe) ImplementMe(opts *ImplementMeOpts) *bool { - var returns *bool +func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetB(val *string) { + _jsii_.Set( + j, + "b", + val, + ) +} - _jsii_.Invoke( - o, - "implementMe", - []interface{}{opts}, - &returns, +func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetC(val *string) { + _jsii_.Set( + j, + "c", + val, ) +} - return returns +func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetD(val *string) { + _jsii_.Set( + j, + "d", + val, + ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc.go 1`] = ` +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.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 ClassThatImplementsThePrivateInterface interface { + INonInternalInterface + A() *string + SetA(val *string) + B() *string + SetB(val *string) + C() *string + SetC(val *string) + E() *string + SetE(val *string) +} + +// The jsii proxy struct for ClassThatImplementsThePrivateInterface +type jsiiProxy_ClassThatImplementsThePrivateInterface struct { + jsiiProxy_INonInternalInterface +} + +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) A() *string { + var returns *string + _jsii_.Get( + j, + "a", + &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_ClassThatImplementsThePrivateInterface) B() *string { + var returns *string + _jsii_.Get( + j, + "b", + &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_ClassThatImplementsThePrivateInterface) C() *string { + var returns *string + _jsii_.Get( + j, + "c", + &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_ClassThatImplementsThePrivateInterface) E() *string { + var returns *string + _jsii_.Get( + j, + "e", + &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 NewClassThatImplementsThePrivateInterface() ClassThatImplementsThePrivateInterface { + _init_.Initialize() + + j := jsiiProxy_ClassThatImplementsThePrivateInterface{} + + _jsii_.Create( + "jsii-calc.ClassThatImplementsThePrivateInterface", + nil, // no parameters + &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 NewClassThatImplementsThePrivateInterface_Override(c ClassThatImplementsThePrivateInterface) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ClassThatImplementsThePrivateInterface", + nil, // no parameters + 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, - }, +} + +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetA(val *string) { + _jsii_.Set( + j, + "a", + val, ) - _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{} - }, +} + +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetB(val *string) { + _jsii_.Set( + j, + "b", + val, ) - _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{} - }, +} + +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetC(val *string) { + _jsii_.Set( + j, + "c", + val, ) - _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 - }, +} + +func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetE(val *string) { + _jsii_.Set( + j, + "e", + val, ) - _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{} - }, +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithCollectionOfUnions.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{}) +} + +// 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, ) - _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{} - }, + return returns +} + + +func NewClassWithCollectionOfUnions(unionProperty *[]*map[string]interface{}) ClassWithCollectionOfUnions { + _init_.Initialize() + + j := jsiiProxy_ClassWithCollectionOfUnions{} + + _jsii_.Create( + "jsii-calc.ClassWithCollectionOfUnions", + []interface{}{unionProperty}, + &j, ) - _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 &j +} + +func NewClassWithCollectionOfUnions_Override(c ClassWithCollectionOfUnions, unionProperty *[]*map[string]interface{}) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ClassWithCollectionOfUnions", + []interface{}{unionProperty}, + c, ) - _jsii_.RegisterClass( - "jsii-calc.BaseJsii976", - reflect.TypeOf((*BaseJsii976)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_BaseJsii976{} - }, +} + +func (j *jsiiProxy_ClassWithCollectionOfUnions)SetUnionProperty(val *[]*map[string]interface{}) { + _jsii_.Set( + j, + "unionProperty", + val, ) - _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 - }, +} + + +`; + +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 ClassWithCollections interface { + Array() *[]*string + SetArray(val *[]*string) + Map() *map[string]*string + SetMap(val *map[string]*string) +} + +// The jsii proxy struct for ClassWithCollections +type jsiiProxy_ClassWithCollections struct { + _ byte // padding +} + +func (j *jsiiProxy_ClassWithCollections) Array() *[]*string { + var returns *[]*string + _jsii_.Get( + j, + "array", + &returns, ) - _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 - }, + return returns +} + +func (j *jsiiProxy_ClassWithCollections) Map() *map[string]*string { + var returns *map[string]*string + _jsii_.Get( + j, + "map", + &returns, ) - _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 NewClassWithCollections(map_ *map[string]*string, array *[]*string) ClassWithCollections { + _init_.Initialize() + + j := jsiiProxy_ClassWithCollections{} + + _jsii_.Create( + "jsii-calc.ClassWithCollections", + []interface{}{map_, array}, + &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 NewClassWithCollections_Override(c ClassWithCollections, map_ *map[string]*string, array *[]*string) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ClassWithCollections", + []interface{}{map_, array}, + c, ) - _jsii_.RegisterStruct( - "jsii-calc.CalculatorProps", - reflect.TypeOf((*CalculatorProps)(nil)).Elem(), +} + +func (j *jsiiProxy_ClassWithCollections)SetArray(val *[]*string) { + _jsii_.Set( + j, + "array", + val, ) - _jsii_.RegisterStruct( - "jsii-calc.ChildStruct982", - reflect.TypeOf((*ChildStruct982)(nil)).Elem(), +} + +func (j *jsiiProxy_ClassWithCollections)SetMap(val *map[string]*string) { + _jsii_.Set( + j, + "map", + val, ) - _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 ClassWithCollections_CreateAList() *[]*string { + _init_.Initialize() + + var returns *[]*string + + _jsii_.StaticInvoke( + "jsii-calc.ClassWithCollections", + "createAList", + nil, // no parameters + &returns, ) - _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 - }, - ) - _jsii_.RegisterClass( - "jsii-calc.ClassWithCollectionOfUnions", - reflect.TypeOf((*ClassWithCollectionOfUnions)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"}, - }, - func() interface{} { - return &jsiiProxy_ClassWithCollectionOfUnions{} - }, + + return returns +} + +func ClassWithCollections_CreateAMap() *map[string]*string { + _init_.Initialize() + + var returns *map[string]*string + + _jsii_.StaticInvoke( + "jsii-calc.ClassWithCollections", + "createAMap", + nil, // no parameters + &returns, ) - _jsii_.RegisterClass( + + return returns +} + +func ClassWithCollections_StaticArray() *[]*string { + _init_.Initialize() + var returns *[]*string + _jsii_.StaticGet( "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{} - }, + "staticArray", + &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 ClassWithCollections_SetStaticArray(val *[]*string) { + _init_.Initialize() + _jsii_.StaticSet( + "jsii-calc.ClassWithCollections", + "staticArray", + val, ) - _jsii_.RegisterClass( - "jsii-calc.ClassWithDocs", - reflect.TypeOf((*ClassWithDocs)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_ClassWithDocs{} - }, +} + +func ClassWithCollections_StaticMap() *map[string]*string { + _init_.Initialize() + var returns *map[string]*string + _jsii_.StaticGet( + "jsii-calc.ClassWithCollections", + "staticMap", + &returns, ) - _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{} - }, + return returns +} + +func ClassWithCollections_SetStaticMap(val *map[string]*string) { + _init_.Initialize() + _jsii_.StaticSet( + "jsii-calc.ClassWithCollections", + "staticMap", + val, ) - _jsii_.RegisterClass( - "jsii-calc.ClassWithMutableObjectLiteralProperty", - reflect.TypeOf((*ClassWithMutableObjectLiteralProperty)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "mutableObject", GoGetter: "MutableObject"}, - }, - func() interface{} { - return &jsiiProxy_ClassWithMutableObjectLiteralProperty{} - }, +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithContainerTypes.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 +} + +// 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.ClassWithNestedUnion", - reflect.TypeOf((*ClassWithNestedUnion)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"}, - }, - func() interface{} { - return &jsiiProxy_ClassWithNestedUnion{} - }, + return returns +} + +func (j *jsiiProxy_ClassWithContainerTypes) Obj() *map[string]*DummyObj { + var returns *map[string]*DummyObj + _jsii_.Get( + j, + "obj", + &returns, ) - _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 - }, + return returns +} + +func (j *jsiiProxy_ClassWithContainerTypes) Props() *ContainerProps { + var returns *ContainerProps + _jsii_.Get( + j, + "props", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.ConfusingToJackson", - reflect.TypeOf((*ConfusingToJackson)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"}, - }, - func() interface{} { - return &jsiiProxy_ConfusingToJackson{} - }, + return returns +} + +func (j *jsiiProxy_ClassWithContainerTypes) Record() *map[string]*DummyObj { + var returns *map[string]*DummyObj + _jsii_.Get( + j, + "record", + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.ConfusingToJacksonStruct", - reflect.TypeOf((*ConfusingToJacksonStruct)(nil)).Elem(), + 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.ConstructorPassesThisOut", - reflect.TypeOf((*ConstructorPassesThisOut)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_ConstructorPassesThisOut{} - }, + + 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_.RegisterClass( - "jsii-calc.Constructors", - reflect.TypeOf((*Constructors)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_Constructors{} - }, +} + + +`; + +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.ConsumePureInterface", - reflect.TypeOf((*ConsumePureInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "workItBaby", GoMethod: "WorkItBaby"}, - }, - func() interface{} { - return &jsiiProxy_ConsumePureInterface{} - }, + + return &j +} + +func NewClassWithDocs_Override(c ClassWithDocs) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ClassWithDocs", + nil, // no parameters + c, ) - _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{} - }, +} + + +`; + +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.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 returns +} + + +func NewClassWithJavaReservedWords(int *string) ClassWithJavaReservedWords { + _init_.Initialize() + + j := jsiiProxy_ClassWithJavaReservedWords{} + + _jsii_.Create( + "jsii-calc.ClassWithJavaReservedWords", + []interface{}{int}, + &j, ) - _jsii_.RegisterStruct( - "jsii-calc.ContainerProps", - reflect.TypeOf((*ContainerProps)(nil)).Elem(), + + return &j +} + +func NewClassWithJavaReservedWords_Override(c ClassWithJavaReservedWords, int *string) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ClassWithJavaReservedWords", + []interface{}{int}, + c, ) - _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{} - }, +} + +func (c *jsiiProxy_ClassWithJavaReservedWords) Import(assert *string) *string { + var returns *string + + _jsii_.Invoke( + c, + "import", + []interface{}{assert}, + &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 +} + + +`; + +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.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 NewClassWithMutableObjectLiteralProperty() ClassWithMutableObjectLiteralProperty { + _init_.Initialize() + + j := jsiiProxy_ClassWithMutableObjectLiteralProperty{} + + _jsii_.Create( + "jsii-calc.ClassWithMutableObjectLiteralProperty", + nil, // no parameters + &j, ) - _jsii_.RegisterClass( - "jsii-calc.Demonstrate982", - reflect.TypeOf((*Demonstrate982)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_Demonstrate982{} - }, + + return &j +} + +func NewClassWithMutableObjectLiteralProperty_Override(c ClassWithMutableObjectLiteralProperty) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ClassWithMutableObjectLiteralProperty", + nil, // no parameters + c, ) - _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{} - }, +} + +func (j *jsiiProxy_ClassWithMutableObjectLiteralProperty)SetMutableObject(val IMutableObjectLiteral) { + _jsii_.Set( + j, + "mutableObject", + val, ) - _jsii_.RegisterEnum( - "jsii-calc.DeprecatedEnum", - reflect.TypeOf((*DeprecatedEnum)(nil)).Elem(), - map[string]interface{}{ - "OPTION_A": DeprecatedEnum_OPTION_A, - "OPTION_B": DeprecatedEnum_OPTION_B, - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.DeprecatedStruct", - reflect.TypeOf((*DeprecatedStruct)(nil)).Elem(), - ) - _jsii_.RegisterStruct( - "jsii-calc.DerivedStruct", - reflect.TypeOf((*DerivedStruct)(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_.RegisterStruct( - "jsii-calc.DiamondBottom", - reflect.TypeOf((*DiamondBottom)(nil)).Elem(), + return returns +} + + +func NewClassWithNestedUnion(unionProperty *[]interface{}) ClassWithNestedUnion { + _init_.Initialize() + + j := jsiiProxy_ClassWithNestedUnion{} + + _jsii_.Create( + "jsii-calc.ClassWithNestedUnion", + []interface{}{unionProperty}, + &j, ) - _jsii_.RegisterStruct( - "jsii-calc.DiamondInheritanceBaseLevelStruct", - reflect.TypeOf((*DiamondInheritanceBaseLevelStruct)(nil)).Elem(), + + return &j +} + +func NewClassWithNestedUnion_Override(c ClassWithNestedUnion, unionProperty *[]interface{}) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ClassWithNestedUnion", + []interface{}{unionProperty}, + c, ) - _jsii_.RegisterStruct( - "jsii-calc.DiamondInheritanceFirstMidLevelStruct", - reflect.TypeOf((*DiamondInheritanceFirstMidLevelStruct)(nil)).Elem(), +} + +func (j *jsiiProxy_ClassWithNestedUnion)SetUnionProperty(val *[]interface{}) { + _jsii_.Set( + j, + "unionProperty", + val, ) - _jsii_.RegisterStruct( - "jsii-calc.DiamondInheritanceSecondMidLevelStruct", - reflect.TypeOf((*DiamondInheritanceSecondMidLevelStruct)(nil)).Elem(), +} + + +`; + +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_.RegisterStruct( - "jsii-calc.DiamondInheritanceTopLevelStruct", - reflect.TypeOf((*DiamondInheritanceTopLevelStruct)(nil)).Elem(), + return returns +} + +func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties) ReadWriteString() *string { + var returns *string + _jsii_.Get( + j, + "readWriteString", + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.DisappointingCollectionSource", - reflect.TypeOf((*DisappointingCollectionSource)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_DisappointingCollectionSource{} - }, + return returns +} + + +func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties)SetReadWriteString(val *string) { + _jsii_.Set( + j, + "readWriteString", + val, ) - _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{} - }, +} + +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.DoNotRecognizeAnyAsOptional", - reflect.TypeOf((*DoNotRecognizeAnyAsOptional)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"}, - }, - func() interface{} { - return &jsiiProxy_DoNotRecognizeAnyAsOptional{} - }, + + 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.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 (j *jsiiProxy_ConfusingToJackson)SetUnionProperty(val interface{}) { + _jsii_.Set( + j, + "unionProperty", + val, ) - _jsii_.RegisterClass( - "jsii-calc.DontComplainAboutVariadicAfterOptional", - reflect.TypeOf((*DontComplainAboutVariadicAfterOptional)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "optionalAndVariadic", GoMethod: "OptionalAndVariadic"}, - }, - func() interface{} { - return &jsiiProxy_DontComplainAboutVariadicAfterOptional{} - }, +} + +func ConfusingToJackson_MakeInstance() ConfusingToJackson { + _init_.Initialize() + + var returns ConfusingToJackson + + _jsii_.StaticInvoke( + "jsii-calc.ConfusingToJackson", + "makeInstance", + nil, // no parameters + &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 ConfusingToJackson_MakeStructInstance() *ConfusingToJacksonStruct { + _init_.Initialize() + + var returns *ConfusingToJacksonStruct + + _jsii_.StaticInvoke( + "jsii-calc.ConfusingToJackson", + "makeStructInstance", + nil, // no parameters + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.DummyObj", - reflect.TypeOf((*DummyObj)(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( - "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 NewConstructorPassesThisOut_Override(c ConstructorPassesThisOut, consumer PartiallyInitializedThisConsumer) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ConstructorPassesThisOut", + []interface{}{consumer}, + 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 - }, +} + + +`; + +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", + nil, // no parameters + &j, ) - _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 &j +} + +func NewConstructors_Override(c Constructors) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.Constructors", + nil, // no parameters + c, ) - _jsii_.RegisterClass( - "jsii-calc.EnumDispenser", - reflect.TypeOf((*EnumDispenser)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_EnumDispenser{} - }, +} + +func Constructors_HiddenInterface() IPublicInterface { + _init_.Initialize() + + var returns IPublicInterface + + _jsii_.StaticInvoke( + "jsii-calc.Constructors", + "hiddenInterface", + nil, // no parameters + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.EraseUndefinedHashValues", - reflect.TypeOf((*EraseUndefinedHashValues)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_EraseUndefinedHashValues{} - }, + + return returns +} + +func Constructors_HiddenInterfaces() *[]IPublicInterface { + _init_.Initialize() + + var returns *[]IPublicInterface + + _jsii_.StaticInvoke( + "jsii-calc.Constructors", + "hiddenInterfaces", + nil, // no parameters + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.EraseUndefinedHashValuesOptions", - reflect.TypeOf((*EraseUndefinedHashValuesOptions)(nil)).Elem(), + + 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.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 Constructors_MakeClass() PublicClass { + _init_.Initialize() + + var returns PublicClass + + _jsii_.StaticInvoke( + "jsii-calc.Constructors", + "makeClass", + nil, // no parameters + &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 Constructors_MakeInterface() IPublicInterface { + _init_.Initialize() + + var returns IPublicInterface + + _jsii_.StaticInvoke( + "jsii-calc.Constructors", + "makeInterface", + nil, // no parameters + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.ExperimentalStruct", - reflect.TypeOf((*ExperimentalStruct)(nil)).Elem(), - ) - _jsii_.RegisterClass( - "jsii-calc.ExportedBaseClass", - reflect.TypeOf((*ExportedBaseClass)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "success", GoGetter: "Success"}, - }, - func() interface{} { - return &jsiiProxy_ExportedBaseClass{} - }, - ) - _jsii_.RegisterStruct( - "jsii-calc.ExtendsInternalInterface", - reflect.TypeOf((*ExtendsInternalInterface)(nil)).Elem(), + + return returns +} + +func Constructors_MakeInterface2() IPublicInterface2 { + _init_.Initialize() + + var returns IPublicInterface2 + + _jsii_.StaticInvoke( + "jsii-calc.Constructors", + "makeInterface2", + nil, // no parameters + &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 Constructors_MakeInterfaces() *[]IPublicInterface { + _init_.Initialize() + + var returns *[]IPublicInterface + + _jsii_.StaticInvoke( + "jsii-calc.Constructors", + "makeInterfaces", + nil, // no parameters + &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 +} + + +`; + +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.ExternalStruct", - reflect.TypeOf((*ExternalStruct)(nil)).Elem(), + + return &j +} + +func NewConsumePureInterface_Override(c ConsumePureInterface, delegate IStructReturningDelegate) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ConsumePureInterface", + []interface{}{delegate}, + c, ) - _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 - }, +} + +func (c *jsiiProxy_ConsumePureInterface) WorkItBaby() *StructB { + var returns *StructB + + _jsii_.Invoke( + c, + "workItBaby", + nil, // no parameters + &returns, ) - _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 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.Greetee", - reflect.TypeOf((*Greetee)(nil)).Elem(), + + return &j +} + +func NewConsumerCanRingBell_Override(c ConsumerCanRingBell) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ConsumerCanRingBell", + nil, // no parameters + c, ) - _jsii_.RegisterClass( - "jsii-calc.GreetingAugmenter", - reflect.TypeOf((*GreetingAugmenter)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "betterGreeting", GoMethod: "BetterGreeting"}, - }, - func() interface{} { - return &jsiiProxy_GreetingAugmenter{} - }, +} + +// ...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_.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 +} + +// ...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_.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{} - }, + + 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_.RegisterInterface( - "jsii-calc.IAnotherPublicInterface", - reflect.TypeOf((*IAnotherPublicInterface)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"}, - }, - func() interface{} { - return &jsiiProxy_IAnotherPublicInterface{} - }, + + 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_.RegisterInterface( - "jsii-calc.IBell", - reflect.TypeOf((*IBell)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "ring", GoMethod: "Ring"}, - }, - func() interface{} { - return &jsiiProxy_IBell{} - }, + + return returns +} + +func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByObjectLiteral(ringer IBellRinger) *bool { + var returns *bool + + _jsii_.Invoke( + c, + "implementedByObjectLiteral", + []interface{}{ringer}, + &returns, ) - _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 (c *jsiiProxy_ConsumerCanRingBell) ImplementedByPrivateClass(ringer IBellRinger) *bool { + var returns *bool + + _jsii_.Invoke( + c, + "implementedByPrivateClass", + []interface{}{ringer}, + &returns, ) - _jsii_.RegisterInterface( - "jsii-calc.IConcreteBellRinger", - reflect.TypeOf((*IConcreteBellRinger)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberMethod{JsiiMethod: "yourTurn", GoMethod: "YourTurn"}, - }, - func() interface{} { - return &jsiiProxy_IConcreteBellRinger{} - }, + + return returns +} + +func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByPublicClass(ringer IBellRinger) *bool { + var returns *bool + + _jsii_.Invoke( + c, + "implementedByPublicClass", + []interface{}{ringer}, + &returns, ) - _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{} - }, + + return returns +} + +func (c *jsiiProxy_ConsumerCanRingBell) WhenTypedAsClass(ringer IConcreteBellRinger) *bool { + var returns *bool + + _jsii_.Invoke( + c, + "whenTypedAsClass", + []interface{}{ringer}, + &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 +} + + +`; + +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_.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 &j +} + +func NewConsumersOfThisCrazyTypeSystem_Override(c ConsumersOfThisCrazyTypeSystem) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ConsumersOfThisCrazyTypeSystem", + nil, // no parameters + c, ) - _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{} - }, +} + +func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) ConsumeAnotherPublicInterface(obj IAnotherPublicInterface) *string { + var returns *string + + _jsii_.Invoke( + c, + "consumeAnotherPublicInterface", + []interface{}{obj}, + &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 (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) ConsumeNonInternalInterface(obj INonInternalInterface) interface{} { + var returns interface{} + + _jsii_.Invoke( + c, + "consumeNonInternalInterface", + []interface{}{obj}, + &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 - }, - ) - _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{} - }, + + 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_.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 NewDataRenderer_Override(d DataRenderer) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.DataRenderer", + nil, // no parameters + d, ) - _jsii_.RegisterStruct( - "jsii-calc.StableStruct", - reflect.TypeOf((*StableStruct)(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.StaticContext", - reflect.TypeOf((*StaticContext)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_StaticContext{} - }, + + return returns +} + +func (d *jsiiProxy_DataRenderer) RenderArbitrary(data *map[string]interface{}) *string { + var returns *string + + _jsii_.Invoke( + d, + "renderArbitrary", + []interface{}{data}, + &returns, ) - _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 returns +} + +func (d *jsiiProxy_DataRenderer) RenderMap(map_ *map[string]interface{}) *string { + var returns *string + + _jsii_.Invoke( + d, + "renderMap", + []interface{}{map_}, + &returns, ) - _jsii_.RegisterClass( - "jsii-calc.StaticHelloParent", - reflect.TypeOf((*StaticHelloParent)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_StaticHelloParent{} - }, + + 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.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 &j +} + +func NewDefault_Override(d Default) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.Default", + nil, // no parameters + d, ) - _jsii_.RegisterEnum( - "jsii-calc.StringEnum", - reflect.TypeOf((*StringEnum)(nil)).Elem(), - map[string]interface{}{ - "A": StringEnum_A, - "B": StringEnum_B, - "C": StringEnum_C, - }, +} + +func (d *jsiiProxy_Default) PleaseCompile() { + _jsii_.InvokeVoid( + d, + "pleaseCompile", + nil, // no parameters ) - _jsii_.RegisterClass( - "jsii-calc.StripInternal", - reflect.TypeOf((*StripInternal)(nil)).Elem(), - []_jsii_.Member{ - _jsii_.MemberProperty{JsiiProperty: "youSeeMe", GoGetter: "YouSeeMe"}, - }, - func() interface{} { - return &jsiiProxy_StripInternal{} - }, +} + + +`; + +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_.RegisterStruct( - "jsii-calc.StructA", - reflect.TypeOf((*StructA)(nil)).Elem(), + return returns +} + +func (j *jsiiProxy_DefaultedConstructorArgument) Arg2() *string { + var returns *string + _jsii_.Get( + j, + "arg2", + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.StructB", - reflect.TypeOf((*StructB)(nil)).Elem(), + return returns +} + +func (j *jsiiProxy_DefaultedConstructorArgument) Arg3() *time.Time { + var returns *time.Time + _jsii_.Get( + j, + "arg3", + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.StructParameterType", - reflect.TypeOf((*StructParameterType)(nil)).Elem(), + 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.StructPassing", - reflect.TypeOf((*StructPassing)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_StructPassing{} - }, + + 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_.RegisterClass( - "jsii-calc.StructUnionConsumer", - reflect.TypeOf((*StructUnionConsumer)(nil)).Elem(), - nil, // no members - func() interface{} { - return &jsiiProxy_StructUnionConsumer{} - }, +} + + +`; + +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_.RegisterStruct( - "jsii-calc.StructWithCollectionOfUnionts", - reflect.TypeOf((*StructWithCollectionOfUnionts)(nil)).Elem(), + + return &j +} + +func NewDemonstrate982_Override(d Demonstrate982) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.Demonstrate982", + nil, // no parameters + d, ) - _jsii_.RegisterStruct( - "jsii-calc.StructWithEnum", - reflect.TypeOf((*StructWithEnum)(nil)).Elem(), +} + +// 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_.RegisterStruct( - "jsii-calc.StructWithJavaReservedWords", - reflect.TypeOf((*StructWithJavaReservedWords)(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_.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 +} + + +`; + +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.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 +} + +func (j *jsiiProxy_DeprecatedClass) ReadonlyProperty() *string { + var returns *string + _jsii_.Get( + j, + "readonlyProperty", + &returns, ) - _jsii_.RegisterStruct( - "jsii-calc.SupportsNiceJavaBuilderProps", - reflect.TypeOf((*SupportsNiceJavaBuilderProps)(nil)).Elem(), + 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_.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 +} + +// 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.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_DeprecatedClass)SetMutableProperty(val *float64) { + _jsii_.Set( + j, + "mutableProperty", + 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{} - }, +} + +func (d *jsiiProxy_DeprecatedClass) Method() { + _jsii_.InvokeVoid( + d, + "method", + nil, // no parameters + ) +} + + +`; + +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 +// 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() +} + +// 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 +7347,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 +7413,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 +7434,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 +7520,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 +7625,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 +7634,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 +7691,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 +7817,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 +7836,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 +8305,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 +8353,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 - &returns, ) +} +func (j *jsiiProxy_IExternalInterface) MutableProperty() *float64 { + var returns *float64 + _jsii_.Get( + j, + "mutableProperty", + &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 +8905,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 +9955,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 +9976,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() +// The jsii proxy for IPrivatelyImplemented +type jsiiProxy_IPrivatelyImplemented struct { + _ byte // padding +} - _jsii_.Create( - "jsii-calc.ClassWithContainerTypes", - []interface{}{array, record, obj, props}, - c, +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 +10143,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 +10268,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 +10337,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 +10346,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 +10411,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 +10467,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 +10491,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 +10659,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 +10709,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 +10729,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 +10889,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 +10898,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 +10926,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 +11105,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 +11140,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 +11176,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 +11259,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 +11282,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 +11308,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 +11317,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, + ) } +func (j *jsiiProxy_JavaReservedWords)SetWhile(val *string) { + _jsii_.Set( + j, + "while", + val, + ) +} -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DiamondInheritanceTopLevelStruct.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc - +func (j *jsiiProxy_JavaReservedWords) Abstract() { + _jsii_.InvokeVoid( + j, + "abstract", + nil, // no parameters + ) +} -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) Assert() { + _jsii_.InvokeVoid( + j, + "assert", + nil, // no parameters + ) } +func (j *jsiiProxy_JavaReservedWords) Boolean() { + _jsii_.InvokeVoid( + j, + "boolean", + nil, // no parameters + ) +} -`; +func (j *jsiiProxy_JavaReservedWords) Break() { + _jsii_.InvokeVoid( + j, + "break", + nil, // no parameters + ) +} -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_DisappointingCollectionSource.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc +func (j *jsiiProxy_JavaReservedWords) Byte() { + _jsii_.InvokeVoid( + j, + "byte", + 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) Case() { + _jsii_.InvokeVoid( + j, + "case", + nil, // no parameters + ) +} -// 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) Catch() { + _jsii_.InvokeVoid( + j, + "catch", + nil, // no parameters + ) } -// The jsii proxy struct for DisappointingCollectionSource -type jsiiProxy_DisappointingCollectionSource struct { - _ byte // padding +func (j *jsiiProxy_JavaReservedWords) Char() { + _jsii_.InvokeVoid( + j, + "char", + nil, // no parameters + ) } -func DisappointingCollectionSource_MaybeList() *[]*string { - _init_.Initialize() - var returns *[]*string - _jsii_.StaticGet( - "jsii-calc.DisappointingCollectionSource", - "maybeList", - &returns, +func (j *jsiiProxy_JavaReservedWords) Class() { + _jsii_.InvokeVoid( + j, + "class", + 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) Const() { + _jsii_.InvokeVoid( + j, + "const", + 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) Continue() { + _jsii_.InvokeVoid( + j, + "continue", + nil, // no parameters + ) } -// The jsii proxy struct for DoNotOverridePrivates -type jsiiProxy_DoNotOverridePrivates struct { - _ byte // padding +func (j *jsiiProxy_JavaReservedWords) Default() { + _jsii_.InvokeVoid( + j, + "default", + nil, // no parameters + ) } -func NewDoNotOverridePrivates() DoNotOverridePrivates { - _init_.Initialize() - - j := jsiiProxy_DoNotOverridePrivates{} - - _jsii_.Create( - "jsii-calc.DoNotOverridePrivates", +func (j *jsiiProxy_JavaReservedWords) Do() { + _jsii_.InvokeVoid( + j, + "do", nil, // no parameters - &j, ) - - return &j } -func NewDoNotOverridePrivates_Override(d DoNotOverridePrivates) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.DoNotOverridePrivates", +func (j *jsiiProxy_JavaReservedWords) Double() { + _jsii_.InvokeVoid( + j, + "double", nil, // no parameters - d, ) } -func (d *jsiiProxy_DoNotOverridePrivates) ChangePrivatePropertyValue(newValue *string) { +func (j *jsiiProxy_JavaReservedWords) Else() { _jsii_.InvokeVoid( - d, - "changePrivatePropertyValue", - []interface{}{newValue}, + j, + "else", + nil, // no parameters ) } -func (d *jsiiProxy_DoNotOverridePrivates) PrivateMethodValue() *string { - var returns *string - - _jsii_.Invoke( - d, - "privateMethodValue", +func (j *jsiiProxy_JavaReservedWords) Enum() { + _jsii_.InvokeVoid( + j, + "enum", nil, // no parameters - &returns, ) - - return returns } -func (d *jsiiProxy_DoNotOverridePrivates) PrivatePropertyValue() *string { - var returns *string - - _jsii_.Invoke( - d, - "privatePropertyValue", +func (j *jsiiProxy_JavaReservedWords) Extends() { + _jsii_.InvokeVoid( + j, + "extends", 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) False() { + _jsii_.InvokeVoid( + j, + "false", + nil, // no parameters + ) } -// The jsii proxy struct for DoNotRecognizeAnyAsOptional -type jsiiProxy_DoNotRecognizeAnyAsOptional struct { - _ byte // padding +func (j *jsiiProxy_JavaReservedWords) Final() { + _jsii_.InvokeVoid( + j, + "final", + nil, // no parameters + ) } -func NewDoNotRecognizeAnyAsOptional() DoNotRecognizeAnyAsOptional { - _init_.Initialize() - - j := jsiiProxy_DoNotRecognizeAnyAsOptional{} - - _jsii_.Create( - "jsii-calc.DoNotRecognizeAnyAsOptional", +func (j *jsiiProxy_JavaReservedWords) Finally() { + _jsii_.InvokeVoid( + j, + "finally", nil, // no parameters - &j, ) - - return &j } -func NewDoNotRecognizeAnyAsOptional_Override(d DoNotRecognizeAnyAsOptional) { - _init_.Initialize() - - _jsii_.Create( - "jsii-calc.DoNotRecognizeAnyAsOptional", +func (j *jsiiProxy_JavaReservedWords) Float() { + _jsii_.InvokeVoid( + j, + "float", nil, // no parameters - d, ) } -func (d *jsiiProxy_DoNotRecognizeAnyAsOptional) Method(_requiredAny interface{}, _optionalAny interface{}, _optionalString *string) { +func (j *jsiiProxy_JavaReservedWords) For() { _jsii_.InvokeVoid( - d, - "method", - []interface{}{_requiredAny, _optionalAny, _optionalString}, + j, + "for", + nil, // no parameters ) } +func (j *jsiiProxy_JavaReservedWords) Goto() { + _jsii_.InvokeVoid( + j, + "goto", + nil, // no parameters + ) +} -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/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" -) +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 +11935,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", + "jsii-calc.Jsii487Derived", nil, // no parameters - &returns, - ) - - return returns -} - - -`; + &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 +11982,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 +12027,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 +12083,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 +12124,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 +12184,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 +12199,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 +12521,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"\` +} + + +`; + +exports[`Generated code for "jsii-calc": /go/jsiicalc/LevelOneProps.go 1`] = ` +// A simple calcuator built on JSII. +package jsiicalc -const ( - // Experimental. - ExperimentalEnum_OPTION_A ExperimentalEnum = "OPTION_A" - // Experimental. - ExperimentalEnum_OPTION_B ExperimentalEnum = "OPTION_B" -) + +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 +12662,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 +12904,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 +12921,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{} -// 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"\` + _jsii_.Invoke( + n, + "typeName", + nil, // no parameters + &returns, + ) + + 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 +13067,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,1922 +13202,1814 @@ 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() -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IBell.go 1`] = ` -// A simple calcuator built on JSII. -package jsiicalc + j := jsiiProxy_NullShouldBeTreatedAsUndefined{} -import ( - _jsii_ "github.com/aws/jsii-runtime-go/runtime" -) + _jsii_.Create( + "jsii-calc.NullShouldBeTreatedAsUndefined", + []interface{}{_param1, optional}, + &j, + ) -type IBell interface { - Ring() + return &j } -// The jsii proxy for IBell -type jsiiProxy_IBell struct { - _ byte // padding -} +func NewNullShouldBeTreatedAsUndefined_Override(n NullShouldBeTreatedAsUndefined, _param1 *string, optional interface{}) { + _init_.Initialize() -func (i *jsiiProxy_IBell) Ring() { - _jsii_.InvokeVoid( - i, - "ring", - nil, // no parameters + _jsii_.Create( + "jsii-calc.NullShouldBeTreatedAsUndefined", + []interface{}{_param1, optional}, + n, ) } +func (j *jsiiProxy_NullShouldBeTreatedAsUndefined)SetChangeMeToUndefined(val *string) { + _jsii_.Set( + j, + "changeMeToUndefined", + val, + ) +} -`; - -exports[`Generated code for "jsii-calc": /go/jsiicalc/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 (n *jsiiProxy_NullShouldBeTreatedAsUndefined) GiveMeUndefined(value interface{}) { + _jsii_.InvokeVoid( + n, + "giveMeUndefined", + []interface{}{value}, + ) } -// The jsii proxy for IBellRinger -type jsiiProxy_IBellRinger struct { - _ byte // padding +func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) GiveMeUndefinedInsideAnObject(input *NullShouldBeTreatedAsUndefinedData) { + _jsii_.InvokeVoid( + n, + "giveMeUndefinedInsideAnObject", + []interface{}{input}, + ) } -func (i *jsiiProxy_IBellRinger) YourTurn(bell IBell) { +func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) VerifyPropertyIsUndefined() { _jsii_.InvokeVoid( - i, - "yourTurn", - []interface{}{bell}, + n, + "verifyPropertyIsUndefined", + nil, // no parameters ) } `; -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IConcreteBellRinger.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 a calss. -type IConcreteBellRinger interface { - YourTurn(bell Bell) -} - -// The jsii proxy for IConcreteBellRinger -type jsiiProxy_IConcreteBellRinger struct { - _ byte // padding -} -func (i *jsiiProxy_IConcreteBellRinger) YourTurn(bell Bell) { - _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_IDeprecatedInterface.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" ) -// Deprecated: useless interface. -type IDeprecatedInterface interface { - // Deprecated: services no purpose. - Method() - // Deprecated: could be better. - MutableProperty() *float64 - // Deprecated: could be better. - SetMutableProperty(m *float64) +// 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 IDeprecatedInterface -type jsiiProxy_IDeprecatedInterface struct { +// The jsii proxy struct for NumberGenerator +type jsiiProxy_NumberGenerator struct { _ byte // padding } -func (i *jsiiProxy_IDeprecatedInterface) Method() { - _jsii_.InvokeVoid( - i, - "method", - nil, // no parameters - ) -} - -func (j *jsiiProxy_IDeprecatedInterface) MutableProperty() *float64 { - var returns *float64 +func (j *jsiiProxy_NumberGenerator) Generator() IRandomNumberGenerator { + var returns IRandomNumberGenerator _jsii_.Get( j, - "mutableProperty", + "generator", &returns, ) return returns } -func (j *jsiiProxy_IDeprecatedInterface)SetMutableProperty(val *float64) { - _jsii_.Set( - j, - "mutableProperty", - val, - ) -} - -`; +func NewNumberGenerator(generator IRandomNumberGenerator) NumberGenerator { + _init_.Initialize() -exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc_IExperimentalInterface.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, + ) -// Experimental. -type IExperimentalInterface interface { - // Experimental. - Method() - // Experimental. - MutableProperty() *float64 - // Experimental. - SetMutableProperty(m *float64) + return &j } -// The jsii proxy for IExperimentalInterface -type jsiiProxy_IExperimentalInterface struct { - _ byte // padding -} +func NewNumberGenerator_Override(n NumberGenerator, generator IRandomNumberGenerator) { + _init_.Initialize() -func (i *jsiiProxy_IExperimentalInterface) Method() { - _jsii_.InvokeVoid( - i, - "method", - nil, // no parameters + _jsii_.Create( + "jsii-calc.NumberGenerator", + []interface{}{generator}, + n, ) } -func (j *jsiiProxy_IExperimentalInterface) 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_IExperimentalInterface)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_IExtendsPrivateInterface.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" ) -type IExtendsPrivateInterface interface { - MoreThings() *[]*string - Private() *string - SetPrivate(p *string) +// 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 IExtendsPrivateInterface -type jsiiProxy_IExtendsPrivateInterface struct { +// The jsii proxy struct for ObjectRefsInCollections +type jsiiProxy_ObjectRefsInCollections struct { _ byte // padding } -func (j *jsiiProxy_IExtendsPrivateInterface) MoreThings() *[]*string { - var returns *[]*string - _jsii_.Get( - j, - "moreThings", - &returns, +func NewObjectRefsInCollections() ObjectRefsInCollections { + _init_.Initialize() + + j := jsiiProxy_ObjectRefsInCollections{} + + _jsii_.Create( + "jsii-calc.ObjectRefsInCollections", + nil, // no parameters + &j, ) - return returns + + return &j } -func (j *jsiiProxy_IExtendsPrivateInterface) Private() *string { - var returns *string - _jsii_.Get( - j, - "private", +func NewObjectRefsInCollections_Override(o ObjectRefsInCollections) { + _init_.Initialize() + + _jsii_.Create( + "jsii-calc.ObjectRefsInCollections", + nil, // no parameters + o, + ) +} + +func (o *jsiiProxy_ObjectRefsInCollections) SumFromArray(values *[]scopejsiicalclib.NumericValue) *float64 { + var returns *float64 + + _jsii_.Invoke( + o, + "sumFromArray", + []interface{}{values}, &returns, ) + return returns } -func (j *jsiiProxy_IExtendsPrivateInterface)SetPrivate(val *string) { - _jsii_.Set( - j, - "private", - val, +func (o *jsiiProxy_ObjectRefsInCollections) SumFromMap(values *map[string]scopejsiicalclib.NumericValue) *float64 { + var returns *float64 + + _jsii_.Invoke( + o, + "sumFromMap", + []interface{}{values}, + &returns, ) + + 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 +15017,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 +15068,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 +15107,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 +15147,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 +15205,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 +15266,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 +15295,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 +15318,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 +15422,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 +15460,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 +15482,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 +15534,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 +15646,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 +15773,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 +15816,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 +16002,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 +16037,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 +16491,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 +16609,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 +16689,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 +16856,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 +16869,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 +16898,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 +16970,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 +17021,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 +17060,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 +17216,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 +17229,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 +17242,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 +17284,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 +17292,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 +17325,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 +17336,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 +17359,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 +17375,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 +17518,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 +17588,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 +17677,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 +17740,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 +17749,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 +17813,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 +17822,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 +17897,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 +18011,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 +18076,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 +18153,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 +18188,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 +18252,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 +18421,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 +18586,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 +18597,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 +18612,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 +18622,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 +18632,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 +18642,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 +18653,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 +18671,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 +18679,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 +18687,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 +18700,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 +18716,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 +18825,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 +19184,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 +21855,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 +21866,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 +21918,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 +21929,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 +22035,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 +22056,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 +22138,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 +22149,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 +22163,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 +22232,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 +22243,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 +22257,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 +22331,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 +22341,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 +22372,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 +22383,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 +22401,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 +22412,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 +22430,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 +22443,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 +22453,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 +22535,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 +22621,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 +22664,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 +22675,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 +22799,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 +22870,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 +22944,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 +23018,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 +23071,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 +23102,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 +23129,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 +23162,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 +23190,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 +23218,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 +23268,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 +23341,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 +23362,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 +23584,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 +23595,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 +23665,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 +23676,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 +23724,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 +23735,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 +23815,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 +23870,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 +23886,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 +24103,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 +24112,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 +24126,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 +24136,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 +24158,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 +24176,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 +24230,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 +24242,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 +24300,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 +24313,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 +24324,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 +24335,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 +24345,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 +24448,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 +24465,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 +24487,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 +24512,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 +24558,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 +24597,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 +24630,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 +24647,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 +24735,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 +24788,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 +24820,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 +24835,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 +25282,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 +25366,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 +25449,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 +25478,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 +25718,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 +26060,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 +26204,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 +26267,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 +26315,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 +26347,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 +26383,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 +26442,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 +26465,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 +26476,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 +26511,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 +26547,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 +26703,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 +26804,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 +26905,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 +26952,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 +27033,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 +27142,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 +27239,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 +27332,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 +27391,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 +27443,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 +27495,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 +27545,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 +27616,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 +27681,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 +27994,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 +28634,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 +28702,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,29 +28734,10 @@ 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 - } - - - 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/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 -@@ -0,0 +1,11 @@ +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. @@ -28861,16 +28745,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_ConfusingToJackson) validateSetUnionPropertyParameters(val interface{}) error { ++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/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/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() + ++ if err := validateNewDeprecatedClassParameters(readonlyString); err != nil { ++ panic(err) ++ } + j := jsiiProxy_DeprecatedClass{} + + _jsii_.Create( + "jsii-calc.DeprecatedClass", + []interface{}{readonlyString, mutableNumber}, +`; + +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. @@ -28878,49 +28789,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 validateNewDeprecatedClassParameters(readonlyString *string) error { ++ if readonlyString == nil { ++ return fmt.Errorf("parameter readonlyString is required, but nil was provided") + } + + return nil @@ -28928,28 +28801,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/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 + @@ -28958,15 +28812,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 validateNewDeprecatedClassParameters(readonlyString *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/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 + @@ -28977,9 +28850,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_DoNotOverridePrivates) validateChangePrivatePropertyValueParameters(newValue *string) error { ++ if newValue == nil { ++ return fmt.Errorf("parameter newValue is required, but nil was provided") + } + + return nil @@ -28987,28 +28860,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/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 + @@ -29017,15 +28871,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_DoNotOverridePrivates) validateChangePrivatePropertyValueParameters(newValue *string) 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/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 + @@ -29036,9 +28909,9 @@ exports[`Generated code for "jsii-calc": /go/jsiicalc/j + "fmt" +) + -+func validateNewConsumePureInterfaceParameters(delegate IStructReturningDelegate) error { -+ if delegate == nil { -+ return fmt.Errorf("parameter delegate 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 @@ -29046,172 +28919,249 @@ 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 +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 ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++// Building without runtime type checking enabled, so all the below just return nil ++ ++func (d *jsiiProxy_DoNotRecognizeAnyAsOptional) validateMethodParameters(_requiredAny interface{}) error { ++ return nil ++} ++ +`; + +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 @@ -62,10 +62,13 @@ - // - // Returns whether the bell was rung. - func ConsumerCanRingBell_StaticImplementedByObjectLiteral(ringer IBellRinger) *bool { - _init_.Initialize() + d, + ) + } -+ if err := validateConsumerCanRingBell_StaticImplementedByObjectLiteralParameters(ringer); err != nil { + func (d *jsiiProxy_DocumentedClass) Greet(greetee *Greetee) *float64 { ++ if err := d.validateGreetParameters(greetee); 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() + var returns *float64 -+ if err := validateConsumerCanRingBell_StaticImplementedByPrivateClassParameters(ringer); err != nil { -+ panic(err) + _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 ++ ++// A simple calcuator built on JSII. ++package jsiicalc ++ ++import ( ++ _jsii_ "github.com/aws/jsii-runtime-go/runtime" ++) ++ ++func (d *jsiiProxy_DocumentedClass) validateGreetParameters(greetee *Greetee) error { ++ if err := _jsii_.ValidateStruct(greetee, func() string { return "parameter greetee" }); err != nil { ++ return 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() ++ ++ return nil ++} ++ +`; + +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 +29171,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 +29266,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 +29284,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 +29295,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 +29337,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 +29405,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 +29415,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 +29426,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 +29464,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 +29474,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 +29485,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 +29523,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 +29533,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 +29544,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 +29660,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 +29704,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 +29826,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 +29944,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 +29954,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 +29965,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 +30001,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 +30013,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 +30024,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 +30062,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 +30072,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 +30083,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 +30121,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 +30131,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 +30142,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 +30180,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 +30190,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 +30282,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 +30322,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 +30463,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 +30501,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 +30511,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 +30522,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 +30560,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 +30570,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 +30581,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 +30630,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 +30648,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 +30722,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 +30758,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 +30775,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 +30786,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 +30822,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 +30840,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 +30851,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 +30887,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 +30901,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 +30912,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 +30962,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 +31065,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 +31081,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 +31102,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 +31160,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 +31193,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 +31235,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 +31245,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 +31256,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 +31294,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 +31308,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 +31319,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 +31416,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 +31426,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 +31437,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 +31475,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 +31485,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 +31496,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 +31536,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 +31557,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 +31568,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 +31608,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 +31618,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 +31629,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 +31665,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 +31686,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 +31697,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 +31734,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 +31994,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 +32084,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 +32122,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 +32132,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 +32143,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 +32181,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 +32191,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 +32202,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 +32237,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 +32250,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 +32261,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 +32299,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 +32309,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 +32320,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 +32400,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 +32445,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 +32493,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 +32505,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 +32516,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 +32567,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 +32612,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 +32680,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 +32810,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 +32821,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 +32843,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 +32859,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 +32867,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 +32875,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 +32893,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 +32904,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 +32955,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 +32969,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 +32980,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 +33016,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 +33037,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 +33048,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 +33239,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 +33247,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 +33257,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 +33268,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 +33354,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 +33378,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 +33389,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 +33411,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 +33653,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 +33664,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 +33699,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 +33711,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 +33722,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 +33776,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 +33851,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 +34199,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 +34256,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 +34413,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 +34584,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 +34807,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 +34902,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 +34935,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 +34985,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 +35025,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 +35078,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 +35147,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 +35174,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 +35209,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 +35231,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 +35280,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 +35321,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 +35456,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 ++} ++ +`; From 85632ae862c0b8a83bbbf23598c5c2db0bc48b85 Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Wed, 8 Feb 2023 06:37:38 -0800 Subject: [PATCH 08/14] chore: npm-check-updates && yarn upgrade (#3955) Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date. --- package.json | 8 +- packages/@jsii/python-runtime/package.json | 2 +- packages/jsii-pacmak/package.json | 2 +- yarn.lock | 906 ++++++++++----------- 4 files changed, 455 insertions(+), 463 deletions(-) diff --git a/package.json b/package.json index 62beb4182e..c1899efff2 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,8 @@ "@jest/types": "^28.1.3", "@types/jest": "^29.4.0", "@types/node": "^14.18.36", - "@typescript-eslint/eslint-plugin": "^5.50.0", - "@typescript-eslint/parser": "^5.50.0", + "@typescript-eslint/eslint-plugin": "^5.51.0", + "@typescript-eslint/parser": "^5.51.0", "all-contributors-cli": "^6.24.0", "eslint": "^8.33.0", "eslint-config-prettier": "^8.6.0", @@ -27,12 +27,12 @@ "eslint-import-resolver-typescript": "^3.5.3", "eslint-plugin-import": "2.26.0", "eslint-plugin-prettier": "^4.2.1", - "jest": "^29.4.1", + "jest": "^29.4.2", "jest-circus": "^28.1.3", "jest-config": "^28.1.3", "jest-expect-message": "^1.1.3", "lerna": "^6.4.1", - "prettier": "^2.8.3", + "prettier": "^2.8.4", "standard-version": "^9.5.0", "ts-node": "^10.9.1", "typescript": "~4.7.4" diff --git a/packages/@jsii/python-runtime/package.json b/packages/@jsii/python-runtime/package.json index 3d5575e56f..4e46d0a052 100644 --- a/packages/@jsii/python-runtime/package.json +++ b/packages/@jsii/python-runtime/package.json @@ -42,6 +42,6 @@ "jsii-build-tools": "^0.0.0", "jsii-calc": "^3.20.120", "jsii-pacmak": "^0.0.0", - "pyright": "^1.1.292" + "pyright": "^1.1.293" } } diff --git a/packages/jsii-pacmak/package.json b/packages/jsii-pacmak/package.json index 772c34384c..218dfdbfea 100644 --- a/packages/jsii-pacmak/package.json +++ b/packages/jsii-pacmak/package.json @@ -65,7 +65,7 @@ "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-calc": "^3.20.120", - "pyright": "^1.1.292" + "pyright": "^1.1.293" }, "keywords": [ "jsii", diff --git a/yarn.lock b/yarn.lock index 9047ed750d..f6bfc5aedc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -157,9 +157,9 @@ js-tokens "^4.0.0" "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.13", "@babel/parser@^7.20.7": - version "7.20.13" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.13.tgz#ddf1eb5a813588d2fb1692b70c6fce75b945c088" - integrity sha512-gFDLKMfpiXCsjt4za2JA9oTMn70CeseCehb11kRZgvd7+F67Hih3OHOK24cRrWECJ/ljfPGac6ygXAs/C8kIvw== + version "7.20.15" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.15.tgz#eec9f36d8eaf0948bb88c87a46784b5ee9fd0c89" + integrity sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -402,49 +402,49 @@ jest-util "^28.1.3" slash "^3.0.0" -"@jest/console@^29.4.1": - version "29.4.1" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.4.1.tgz#cbc31d73f6329f693b3d34b365124de797704fff" - integrity sha512-m+XpwKSi3PPM9znm5NGS8bBReeAJJpSkL1OuFCqaMaJL2YX9YXLkkI+MBchMPwu+ZuM2rynL51sgfkQteQ1CKQ== +"@jest/console@^29.4.2": + version "29.4.2" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.4.2.tgz#f78374905c2454764152904a344a2d5226b0ef09" + integrity sha512-0I/rEJwMpV9iwi9cDEnT71a5nNGK9lj8Z4+1pRAU2x/thVXCDnaTGrvxyK+cAqZTFVFCiR+hfVrP4l2m+dCmQg== dependencies: - "@jest/types" "^29.4.1" + "@jest/types" "^29.4.2" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^29.4.1" - jest-util "^29.4.1" + jest-message-util "^29.4.2" + jest-util "^29.4.2" slash "^3.0.0" -"@jest/core@^29.4.1": - version "29.4.1" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.4.1.tgz#91371179b5959951e211dfaeea4277a01dcca14f" - integrity sha512-RXFTohpBqpaTebNdg5l3I5yadnKo9zLBajMT0I38D0tDhreVBYv3fA8kywthI00sWxPztWLD3yjiUkewwu/wKA== +"@jest/core@^29.4.2": + version "29.4.2" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.4.2.tgz#6e999b67bdc2df9d96ba9b142465bda71ee472c2" + integrity sha512-KGuoQah0P3vGNlaS/l9/wQENZGNKGoWb+OPxh3gz+YzG7/XExvYu34MzikRndQCdM2S0tzExN4+FL37i6gZmCQ== dependencies: - "@jest/console" "^29.4.1" - "@jest/reporters" "^29.4.1" - "@jest/test-result" "^29.4.1" - "@jest/transform" "^29.4.1" - "@jest/types" "^29.4.1" + "@jest/console" "^29.4.2" + "@jest/reporters" "^29.4.2" + "@jest/test-result" "^29.4.2" + "@jest/transform" "^29.4.2" + "@jest/types" "^29.4.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" ci-info "^3.2.0" exit "^0.1.2" graceful-fs "^4.2.9" - jest-changed-files "^29.4.0" - jest-config "^29.4.1" - jest-haste-map "^29.4.1" - jest-message-util "^29.4.1" - jest-regex-util "^29.2.0" - jest-resolve "^29.4.1" - jest-resolve-dependencies "^29.4.1" - jest-runner "^29.4.1" - jest-runtime "^29.4.1" - jest-snapshot "^29.4.1" - jest-util "^29.4.1" - jest-validate "^29.4.1" - jest-watcher "^29.4.1" + jest-changed-files "^29.4.2" + jest-config "^29.4.2" + jest-haste-map "^29.4.2" + jest-message-util "^29.4.2" + jest-regex-util "^29.4.2" + jest-resolve "^29.4.2" + jest-resolve-dependencies "^29.4.2" + jest-runner "^29.4.2" + jest-runtime "^29.4.2" + jest-snapshot "^29.4.2" + jest-util "^29.4.2" + jest-validate "^29.4.2" + jest-watcher "^29.4.2" micromatch "^4.0.4" - pretty-format "^29.4.1" + pretty-format "^29.4.2" slash "^3.0.0" strip-ansi "^6.0.0" @@ -458,15 +458,15 @@ "@types/node" "*" jest-mock "^28.1.3" -"@jest/environment@^29.4.1": - version "29.4.1" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.4.1.tgz#52d232a85cdc995b407a940c89c86568f5a88ffe" - integrity sha512-pJ14dHGSQke7Q3mkL/UZR9ZtTOxqskZaC91NzamEH4dlKRt42W+maRBXiw/LWkdJe+P0f/zDR37+SPMplMRlPg== +"@jest/environment@^29.4.2": + version "29.4.2" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.4.2.tgz#ee92c316ee2fbdf0bcd9d2db0ef42d64fea26b56" + integrity sha512-JKs3VUtse0vQfCaFGJRX1bir9yBdtasxziSyu+pIiEllAQOe4oQhdCYIf3+Lx+nGglFktSKToBnRJfD5QKp+NQ== dependencies: - "@jest/fake-timers" "^29.4.1" - "@jest/types" "^29.4.1" + "@jest/fake-timers" "^29.4.2" + "@jest/types" "^29.4.2" "@types/node" "*" - jest-mock "^29.4.1" + jest-mock "^29.4.2" "@jest/expect-utils@^28.1.3": version "28.1.3" @@ -475,12 +475,12 @@ dependencies: jest-get-type "^28.0.2" -"@jest/expect-utils@^29.4.1": - version "29.4.1" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.4.1.tgz#105b9f3e2c48101f09cae2f0a4d79a1b3a419cbb" - integrity sha512-w6YJMn5DlzmxjO00i9wu2YSozUYRBhIoJ6nQwpMYcBMtiqMGJm1QBzOf6DDgRao8dbtpDoaqLg6iiQTvv0UHhQ== +"@jest/expect-utils@^29.4.2": + version "29.4.2" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.4.2.tgz#cd0065dfdd8e8a182aa350cc121db97b5eed7b3f" + integrity sha512-Dd3ilDJpBnqa0GiPN7QrudVs0cczMMHtehSo2CSTjm3zdHx0RcpmhFNVEltuEFeqfLIyWKFI224FsMSQ/nsJQA== dependencies: - jest-get-type "^29.2.0" + jest-get-type "^29.4.2" "@jest/expect@^28.1.3": version "28.1.3" @@ -490,13 +490,13 @@ expect "^28.1.3" jest-snapshot "^28.1.3" -"@jest/expect@^29.4.1": - version "29.4.1" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.4.1.tgz#3338fa20f547bb6e550c4be37d6f82711cc13c38" - integrity sha512-ZxKJP5DTUNF2XkpJeZIzvnzF1KkfrhEF6Rz0HGG69fHl6Bgx5/GoU3XyaeFYEjuuKSOOsbqD/k72wFvFxc3iTw== +"@jest/expect@^29.4.2": + version "29.4.2" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.4.2.tgz#2d4a6a41b29380957c5094de19259f87f194578b" + integrity sha512-NUAeZVApzyaeLjfWIV/64zXjA2SS+NuUPHpAlO7IwVMGd5Vf9szTl9KEDlxY3B4liwLO31os88tYNHl6cpjtKQ== dependencies: - expect "^29.4.1" - jest-snapshot "^29.4.1" + expect "^29.4.2" + jest-snapshot "^29.4.2" "@jest/fake-timers@^28.1.3": version "28.1.3" @@ -510,17 +510,17 @@ jest-mock "^28.1.3" jest-util "^28.1.3" -"@jest/fake-timers@^29.4.1": - version "29.4.1" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.4.1.tgz#7b673131e8ea2a2045858f08241cace5d518b42b" - integrity sha512-/1joI6rfHFmmm39JxNfmNAO3Nwm6Y0VoL5fJDy7H1AtWrD1CgRtqJbN9Ld6rhAkGO76qqp4cwhhxJ9o9kYjQMw== +"@jest/fake-timers@^29.4.2": + version "29.4.2" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.4.2.tgz#af43ee1a5720b987d0348f80df98f2cb17d45cd0" + integrity sha512-Ny1u0Wg6kCsHFWq7A/rW/tMhIedq2siiyHyLpHCmIhP7WmcAmd2cx95P+0xtTZlj5ZbJxIRQi4OPydZZUoiSQQ== dependencies: - "@jest/types" "^29.4.1" + "@jest/types" "^29.4.2" "@sinonjs/fake-timers" "^10.0.2" "@types/node" "*" - jest-message-util "^29.4.1" - jest-mock "^29.4.1" - jest-util "^29.4.1" + jest-message-util "^29.4.2" + jest-mock "^29.4.2" + jest-util "^29.4.2" "@jest/globals@^28.1.3": version "28.1.3" @@ -531,26 +531,26 @@ "@jest/expect" "^28.1.3" "@jest/types" "^28.1.3" -"@jest/globals@^29.4.1": - version "29.4.1" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.4.1.tgz#3cd78c5567ab0249f09fbd81bf9f37a7328f4713" - integrity sha512-znoK2EuFytbHH0ZSf2mQK2K1xtIgmaw4Da21R2C/NE/+NnItm5mPEFQmn8gmF3f0rfOlmZ3Y3bIf7bFj7DHxAA== +"@jest/globals@^29.4.2": + version "29.4.2" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.4.2.tgz#73f85f5db0e17642258b25fd0b9fc89ddedb50eb" + integrity sha512-zCk70YGPzKnz/I9BNFDPlK+EuJLk21ur/NozVh6JVM86/YYZtZHqxFFQ62O9MWq7uf3vIZnvNA0BzzrtxD9iyg== dependencies: - "@jest/environment" "^29.4.1" - "@jest/expect" "^29.4.1" - "@jest/types" "^29.4.1" - jest-mock "^29.4.1" + "@jest/environment" "^29.4.2" + "@jest/expect" "^29.4.2" + "@jest/types" "^29.4.2" + jest-mock "^29.4.2" -"@jest/reporters@^29.4.1": - version "29.4.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.4.1.tgz#50d509c08575c75e3cd2176d72ec3786419d5e04" - integrity sha512-AISY5xpt2Xpxj9R6y0RF1+O6GRy9JsGa8+vK23Lmzdy1AYcpQn5ItX79wJSsTmfzPKSAcsY1LNt/8Y5Xe5LOSg== +"@jest/reporters@^29.4.2": + version "29.4.2" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.4.2.tgz#6abfa923941daae0acc76a18830ee9e79a22042d" + integrity sha512-10yw6YQe75zCgYcXgEND9kw3UZZH5tJeLzWv4vTk/2mrS1aY50A37F+XT2hPO5OqQFFnUWizXD8k1BMiATNfUw== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.4.1" - "@jest/test-result" "^29.4.1" - "@jest/transform" "^29.4.1" - "@jest/types" "^29.4.1" + "@jest/console" "^29.4.2" + "@jest/test-result" "^29.4.2" + "@jest/transform" "^29.4.2" + "@jest/types" "^29.4.2" "@jridgewell/trace-mapping" "^0.3.15" "@types/node" "*" chalk "^4.0.0" @@ -563,9 +563,9 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.1.3" - jest-message-util "^29.4.1" - jest-util "^29.4.1" - jest-worker "^29.4.1" + jest-message-util "^29.4.2" + jest-util "^29.4.2" + jest-worker "^29.4.2" slash "^3.0.0" string-length "^4.0.1" strip-ansi "^6.0.0" @@ -578,10 +578,10 @@ dependencies: "@sinclair/typebox" "^0.24.1" -"@jest/schemas@^29.4.0": - version "29.4.0" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.4.0.tgz#0d6ad358f295cc1deca0b643e6b4c86ebd539f17" - integrity sha512-0E01f/gOZeNTG76i5eWWSupvSHaIINrTie7vCyjiYFKgzNdyEGd12BUv4oNBFHOqlHDbtoJi3HrQ38KCC90NsQ== +"@jest/schemas@^29.4.2": + version "29.4.2" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.4.2.tgz#cf7cfe97c5649f518452b176c47ed07486270fc1" + integrity sha512-ZrGzGfh31NtdVH8tn0mgJw4khQuNHiKqdzJAFbCaERbyCP9tHlxWuL/mnMu8P7e/+k4puWjI1NOzi/sFsjce/g== dependencies: "@sinclair/typebox" "^0.25.16" @@ -594,10 +594,10 @@ callsites "^3.0.0" graceful-fs "^4.2.9" -"@jest/source-map@^29.2.0": - version "29.2.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.2.0.tgz#ab3420c46d42508dcc3dc1c6deee0b613c235744" - integrity sha512-1NX9/7zzI0nqa6+kgpSdKPK+WU1p+SJk3TloWZf5MzPbxri9UEeXX5bWZAPCzbQcyuAzubcdUHA7hcNznmRqWQ== +"@jest/source-map@^29.4.2": + version "29.4.2" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.4.2.tgz#f9815d59e25cd3d6828e41489cd239271018d153" + integrity sha512-tIoqV5ZNgYI9XCKXMqbYe5JbumcvyTgNN+V5QW4My033lanijvCD0D4PI9tBw4pRTqWOc00/7X3KVvUh+qnF4Q== dependencies: "@jridgewell/trace-mapping" "^0.3.15" callsites "^3.0.0" @@ -613,13 +613,13 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-result@^29.4.1": - version "29.4.1" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.4.1.tgz#997f19695e13b34779ceb3c288a416bd26c3238d" - integrity sha512-WRt29Lwt+hEgfN8QDrXqXGgCTidq1rLyFqmZ4lmJOpVArC8daXrZWkWjiaijQvgd3aOUj2fM8INclKHsQW9YyQ== +"@jest/test-result@^29.4.2": + version "29.4.2" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.4.2.tgz#34b0ba069f2e3072261e4884c8fb6bd15ed6fb8d" + integrity sha512-HZsC3shhiHVvMtP+i55MGR5bPcc3obCFbA5bzIOb8pCjwBZf11cZliJncCgaVUbC5yoQNuGqCkC0Q3t6EItxZA== dependencies: - "@jest/console" "^29.4.1" - "@jest/types" "^29.4.1" + "@jest/console" "^29.4.2" + "@jest/types" "^29.4.2" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" @@ -633,14 +633,14 @@ jest-haste-map "^28.1.3" slash "^3.0.0" -"@jest/test-sequencer@^29.4.1": - version "29.4.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.4.1.tgz#f7a006ec7058b194a10cf833c88282ef86d578fd" - integrity sha512-v5qLBNSsM0eHzWLXsQ5fiB65xi49A3ILPSFQKPXzGL4Vyux0DPZAIN7NAFJa9b4BiTDP9MBF/Zqc/QA1vuiJ0w== +"@jest/test-sequencer@^29.4.2": + version "29.4.2" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.4.2.tgz#8b48e5bc4af80b42edacaf2a733d4f295edf28fb" + integrity sha512-9Z2cVsD6CcObIVrWigHp2McRJhvCxL27xHtrZFgNC1RwnoSpDx6fZo8QYjJmziFlW9/hr78/3sxF54S8B6v8rg== dependencies: - "@jest/test-result" "^29.4.1" + "@jest/test-result" "^29.4.2" graceful-fs "^4.2.9" - jest-haste-map "^29.4.1" + jest-haste-map "^29.4.2" slash "^3.0.0" "@jest/transform@^28.1.3": @@ -664,26 +664,26 @@ slash "^3.0.0" write-file-atomic "^4.0.1" -"@jest/transform@^29.4.1": - version "29.4.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.4.1.tgz#e4f517841bb795c7dcdee1ba896275e2c2d26d4a" - integrity sha512-5w6YJrVAtiAgr0phzKjYd83UPbCXsBRTeYI4BXokv9Er9CcrH9hfXL/crCvP2d2nGOcovPUnlYiLPFLZrkG5Hg== +"@jest/transform@^29.4.2": + version "29.4.2" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.4.2.tgz#b24b72dbab4c8675433a80e222d6a8ef4656fb81" + integrity sha512-kf1v5iTJHn7p9RbOsBuc/lcwyPtJaZJt5885C98omWz79NIeD3PfoiiaPSu7JyCyFzNOIzKhmMhQLUhlTL9BvQ== dependencies: "@babel/core" "^7.11.6" - "@jest/types" "^29.4.1" + "@jest/types" "^29.4.2" "@jridgewell/trace-mapping" "^0.3.15" babel-plugin-istanbul "^6.1.1" chalk "^4.0.0" convert-source-map "^2.0.0" fast-json-stable-stringify "^2.1.0" graceful-fs "^4.2.9" - jest-haste-map "^29.4.1" - jest-regex-util "^29.2.0" - jest-util "^29.4.1" + jest-haste-map "^29.4.2" + jest-regex-util "^29.4.2" + jest-util "^29.4.2" micromatch "^4.0.4" pirates "^4.0.4" slash "^3.0.0" - write-file-atomic "^5.0.0" + write-file-atomic "^4.0.2" "@jest/types@^28.1.3": version "28.1.3" @@ -697,12 +697,12 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jest/types@^29.4.1": - version "29.4.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.4.1.tgz#f9f83d0916f50696661da72766132729dcb82ecb" - integrity sha512-zbrAXDUOnpJ+FMST2rV7QZOgec8rskg2zv8g2ajeqitp4tvZiyqTCYXANrKsM+ryj5o+LI+ZN2EgU9drrkiwSA== +"@jest/types@^29.4.2": + version "29.4.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.4.2.tgz#8f724a414b1246b2bfd56ca5225d9e1f39540d82" + integrity sha512-CKlngyGP0fwlgC1BRUtPZSiWLBhyS9dKwKmyGxk8Z6M82LBEGB2aLQSg+U1MyLsU+M7UjnlLllBM2BLWKVm/Uw== dependencies: - "@jest/schemas" "^29.4.0" + "@jest/schemas" "^29.4.2" "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" @@ -2062,9 +2062,9 @@ "@types/estree" "*" "@types/eslint@*": - version "8.4.10" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.10.tgz#19731b9685c19ed1552da7052b6f668ed7eb64bb" - integrity sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw== + version "8.21.0" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.21.0.tgz#21724cfe12b96696feafab05829695d4d7bd7c48" + integrity sha512-35EhHNOXgxnUgh4XCJsGhE7zdlDhYDN/aMG6UbkByCFFNgQ7b3U+uVoqBpicFydR8JEfgdjCF7SJ7MiJfzuiTA== dependencies: "@types/estree" "*" "@types/json-schema" "*" @@ -2173,9 +2173,9 @@ "@types/node" "*" "@types/node@*": - version "18.11.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.18.tgz#8dfb97f0da23c2293e554c5a50d61ef134d7697f" - integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA== + version "18.13.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.13.0.tgz#0400d1e6ce87e9d3032c19eb6c58205b0d3f7850" + integrity sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg== "@types/node@^14.18.36": version "14.18.36" @@ -2183,9 +2183,9 @@ integrity sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ== "@types/node@^16.9.2": - version "16.18.11" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.11.tgz#cbb15c12ca7c16c85a72b6bdc4d4b01151bb3cae" - integrity sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA== + version "16.18.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.12.tgz#e3bfea80e31523fde4292a6118f19ffa24fd6f65" + integrity sha512-vzLe5NaNMjIE3mcddFVGlAXN1LEWueUsMsOJWaT6wWMJGyljHAWHznqfnKUQWGzu7TLPrGvWdNAsvQYW+C0xtw== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -2261,14 +2261,14 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^5.50.0": - version "5.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.50.0.tgz#fb48c31cadc853ffc1dc35373f56b5e2a8908fe9" - integrity sha512-vwksQWSFZiUhgq3Kv7o1Jcj0DUNylwnIlGvKvLLYsq8pAWha6/WCnXUeaSoNNha/K7QSf2+jvmkxggC1u3pIwQ== +"@typescript-eslint/eslint-plugin@^5.51.0": + version "5.51.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.51.0.tgz#da3f2819633061ced84bb82c53bba45a6fe9963a" + integrity sha512-wcAwhEWm1RgNd7dxD/o+nnLW8oH+6RK1OGnmbmkj/GGoDPV1WWMVP0FXYQBivKHdwM1pwii3bt//RC62EriIUQ== dependencies: - "@typescript-eslint/scope-manager" "5.50.0" - "@typescript-eslint/type-utils" "5.50.0" - "@typescript-eslint/utils" "5.50.0" + "@typescript-eslint/scope-manager" "5.51.0" + "@typescript-eslint/type-utils" "5.51.0" + "@typescript-eslint/utils" "5.51.0" debug "^4.3.4" grapheme-splitter "^1.0.4" ignore "^5.2.0" @@ -2277,72 +2277,72 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.50.0": - version "5.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.50.0.tgz#a33f44b2cc83d1b7176ec854fbecd55605b0b032" - integrity sha512-KCcSyNaogUDftK2G9RXfQyOCt51uB5yqC6pkUYqhYh8Kgt+DwR5M0EwEAxGPy/+DH6hnmKeGsNhiZRQxjH71uQ== +"@typescript-eslint/parser@^5.51.0": + version "5.51.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.51.0.tgz#2d74626652096d966ef107f44b9479f02f51f271" + integrity sha512-fEV0R9gGmfpDeRzJXn+fGQKcl0inIeYobmmUWijZh9zA7bxJ8clPhV9up2ZQzATxAiFAECqPQyMDB4o4B81AaA== dependencies: - "@typescript-eslint/scope-manager" "5.50.0" - "@typescript-eslint/types" "5.50.0" - "@typescript-eslint/typescript-estree" "5.50.0" + "@typescript-eslint/scope-manager" "5.51.0" + "@typescript-eslint/types" "5.51.0" + "@typescript-eslint/typescript-estree" "5.51.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.50.0": - version "5.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.50.0.tgz#90b8a3b337ad2c52bbfe4eac38f9164614e40584" - integrity sha512-rt03kaX+iZrhssaT974BCmoUikYtZI24Vp/kwTSy841XhiYShlqoshRFDvN1FKKvU2S3gK+kcBW1EA7kNUrogg== +"@typescript-eslint/scope-manager@5.51.0": + version "5.51.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.51.0.tgz#ad3e3c2ecf762d9a4196c0fbfe19b142ac498990" + integrity sha512-gNpxRdlx5qw3yaHA0SFuTjW4rxeYhpHxt491PEcKF8Z6zpq0kMhe0Tolxt0qjlojS+/wArSDlj/LtE69xUJphQ== dependencies: - "@typescript-eslint/types" "5.50.0" - "@typescript-eslint/visitor-keys" "5.50.0" + "@typescript-eslint/types" "5.51.0" + "@typescript-eslint/visitor-keys" "5.51.0" -"@typescript-eslint/type-utils@5.50.0": - version "5.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.50.0.tgz#509d5cc9728d520008f7157b116a42c5460e7341" - integrity sha512-dcnXfZ6OGrNCO7E5UY/i0ktHb7Yx1fV6fnQGGrlnfDhilcs6n19eIRcvLBqx6OQkrPaFlDPk3OJ0WlzQfrV0bQ== +"@typescript-eslint/type-utils@5.51.0": + version "5.51.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.51.0.tgz#7af48005531700b62a20963501d47dfb27095988" + integrity sha512-QHC5KKyfV8sNSyHqfNa0UbTbJ6caB8uhcx2hYcWVvJAZYJRBo5HyyZfzMdRx8nvS+GyMg56fugMzzWnojREuQQ== dependencies: - "@typescript-eslint/typescript-estree" "5.50.0" - "@typescript-eslint/utils" "5.50.0" + "@typescript-eslint/typescript-estree" "5.51.0" + "@typescript-eslint/utils" "5.51.0" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.50.0": - version "5.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.50.0.tgz#c461d3671a6bec6c2f41f38ed60bd87aa8a30093" - integrity sha512-atruOuJpir4OtyNdKahiHZobPKFvZnBnfDiyEaBf6d9vy9visE7gDjlmhl+y29uxZ2ZDgvXijcungGFjGGex7w== +"@typescript-eslint/types@5.51.0": + version "5.51.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.51.0.tgz#e7c1622f46c7eea7e12bbf1edfb496d4dec37c90" + integrity sha512-SqOn0ANn/v6hFn0kjvLwiDi4AzR++CBZz0NV5AnusT2/3y32jdc0G4woXPWHCumWtUXZKPAS27/9vziSsC9jnw== -"@typescript-eslint/typescript-estree@5.50.0": - version "5.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.50.0.tgz#0b9b82975bdfa40db9a81fdabc7f93396867ea97" - integrity sha512-Gq4zapso+OtIZlv8YNAStFtT6d05zyVCK7Fx3h5inlLBx2hWuc/0465C2mg/EQDDU2LKe52+/jN4f0g9bd+kow== +"@typescript-eslint/typescript-estree@5.51.0": + version "5.51.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.51.0.tgz#0ec8170d7247a892c2b21845b06c11eb0718f8de" + integrity sha512-TSkNupHvNRkoH9FMA3w7TazVFcBPveAAmb7Sz+kArY6sLT86PA5Vx80cKlYmd8m3Ha2SwofM1KwraF24lM9FvA== dependencies: - "@typescript-eslint/types" "5.50.0" - "@typescript-eslint/visitor-keys" "5.50.0" + "@typescript-eslint/types" "5.51.0" + "@typescript-eslint/visitor-keys" "5.51.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.50.0": - version "5.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.50.0.tgz#807105f5ffb860644d30d201eefad7017b020816" - integrity sha512-v/AnUFImmh8G4PH0NDkf6wA8hujNNcrwtecqW4vtQ1UOSNBaZl49zP1SHoZ/06e+UiwzHpgb5zP5+hwlYYWYAw== +"@typescript-eslint/utils@5.51.0": + version "5.51.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.51.0.tgz#074f4fabd5b12afe9c8aa6fdee881c050f8b4d47" + integrity sha512-76qs+5KWcaatmwtwsDJvBk4H76RJQBFe+Gext0EfJdC3Vd2kpY2Pf//OHHzHp84Ciw0/rYoGTDnIAr3uWhhJYw== dependencies: "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.50.0" - "@typescript-eslint/types" "5.50.0" - "@typescript-eslint/typescript-estree" "5.50.0" + "@typescript-eslint/scope-manager" "5.51.0" + "@typescript-eslint/types" "5.51.0" + "@typescript-eslint/typescript-estree" "5.51.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.50.0": - version "5.50.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.50.0.tgz#b752ffc143841f3d7bc57d6dd01ac5c40f8c4903" - integrity sha512-cdMeD9HGu6EXIeGOh2yVW6oGf9wq8asBgZx7nsR/D36gTfQ0odE5kcRYe5M81vjEFAcPeugXrHg78Imu55F6gg== +"@typescript-eslint/visitor-keys@5.51.0": + version "5.51.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.51.0.tgz#c0147dd9a36c0de758aaebd5b48cae1ec59eba87" + integrity sha512-Oh2+eTdjHjOFjKA27sxESlA87YPSOJafGCR0md5oeMdh1ZcCfAGCIOL216uTBAkAIptvLIfKQhl7lHxMJet4GQ== dependencies: - "@typescript-eslint/types" "5.50.0" + "@typescript-eslint/types" "5.51.0" eslint-visitor-keys "^3.3.0" "@webassemblyjs/ast@1.11.1": @@ -2502,9 +2502,9 @@ integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== "@yarnpkg/parsers@^3.0.0-rc.18": - version "3.0.0-rc.37" - resolved "https://registry.yarnpkg.com/@yarnpkg/parsers/-/parsers-3.0.0-rc.37.tgz#a00f9b6c478699b0b7a6b56000ea764cb28a8680" - integrity sha512-MPKHrD11PgNExFMCXcgA/MnfYbITbiHYQjB8TNZmE4t9Z+zRCB1RTJKOppp8K8QOf+OEo8CybufVNcZZMLt2tw== + version "3.0.0-rc.39" + resolved "https://registry.yarnpkg.com/@yarnpkg/parsers/-/parsers-3.0.0-rc.39.tgz#0301a0541312124a5bdade79708868f10f9cdfcd" + integrity sha512-BsD4zq3EVmaHqlynXTceNuEFAtrfToV4fI9GA54moKlWZL4Eb2eXrhgf1jV2nMYx18SZxYO4Jc5Kf1sCDNRjOg== dependencies: js-yaml "^3.10.0" tslib "^2.4.0" @@ -2775,9 +2775,9 @@ available-typed-arrays@^1.0.5: integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== axios@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.0.tgz#4cb0d72213989dec08d4b10129e42063bcb3dc78" - integrity sha512-oCye5nHhTypzkdLIvF9SaHfr8UAquqCn1KY3j8vsrjeol8yohAdGxIpRPbF1bOLsx33HOAatdfMX1yzsj2cHwg== + version "1.3.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.2.tgz#7ac517f0fa3ec46e0e636223fd973713a09c72b3" + integrity sha512-1M3O703bYqYuPhbHeya5bnhpYVsDDRyQSabNja04mZtboLNSuZ4YrltestrLXfHgmzua4TpUqRiVKbiQuo2epw== dependencies: follow-redirects "^1.15.0" form-data "^4.0.0" @@ -2796,15 +2796,15 @@ babel-jest@^28.1.3: graceful-fs "^4.2.9" slash "^3.0.0" -babel-jest@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.4.1.tgz#01fa167e27470b35c2d4a1b841d9586b1764da19" - integrity sha512-xBZa/pLSsF/1sNpkgsiT3CmY7zV1kAsZ9OxxtrFqYucnOuRftXAfcJqcDVyOPeN4lttWTwhLdu0T9f8uvoPEUg== +babel-jest@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.4.2.tgz#b17b9f64be288040877cbe2649f91ac3b63b2ba6" + integrity sha512-vcghSqhtowXPG84posYkkkzcZsdayFkubUgbE3/1tuGbX7AQtwCkkNA/wIbB0BMjuCPoqTkiDyKN7Ty7d3uwNQ== dependencies: - "@jest/transform" "^29.4.1" + "@jest/transform" "^29.4.2" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.4.0" + babel-preset-jest "^29.4.2" chalk "^4.0.0" graceful-fs "^4.2.9" slash "^3.0.0" @@ -2830,10 +2830,10 @@ babel-plugin-jest-hoist@^28.1.3: "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" -babel-plugin-jest-hoist@^29.4.0: - version "29.4.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.4.0.tgz#3fd3dfcedf645932df6d0c9fc3d9a704dd860248" - integrity sha512-a/sZRLQJEmsmejQ2rPEUe35nO1+C9dc9O1gplH1SXmJxveQSRUYdBk8yGZG/VOUuZs1u2aHZJusEGoRMbhhwCg== +babel-plugin-jest-hoist@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.4.2.tgz#22aa43e255230f02371ffef1cac7eedef58f60bc" + integrity sha512-5HZRCfMeWypFEonRbEkwWXtNS1sQK159LhRVyRuLzyfVBxDy/34Tr/rg4YVi0SScSJ4fqeaR/OIeceJ/LaQ0pQ== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" @@ -2866,12 +2866,12 @@ babel-preset-jest@^28.1.3: babel-plugin-jest-hoist "^28.1.3" babel-preset-current-node-syntax "^1.0.0" -babel-preset-jest@^29.4.0: - version "29.4.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.4.0.tgz#c2b03c548b02dea0a18ae21d5759c136f9251ee4" - integrity sha512-fUB9vZflUSM3dO/6M2TCAepTzvA4VkOvl67PjErcrQMGt9Eve7uazaeyCZ2th3UtI7ljpiBJES0F7A1vBRsLZA== +babel-preset-jest@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.4.2.tgz#f0b20c6a79a9f155515e72a2d4f537fe002a4e38" + integrity sha512-ecWdaLY/8JyfUDr0oELBMpj3R5I1L6ZqG+kRJmwqfHtLWuPrJStR0LUkvUhfykJWTsXXMnohsayN/twltBbDrQ== dependencies: - babel-plugin-jest-hoist "^29.4.0" + babel-plugin-jest-hoist "^29.4.2" babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: @@ -3041,9 +3041,9 @@ camelcase@^6.2.0, camelcase@^6.3.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001449: - version "1.0.30001450" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001450.tgz#022225b91200589196b814b51b1bbe45144cf74f" - integrity sha512-qMBmvmQmFXaSxexkjjfMvD5rnDL0+m+dUMZKoDYsGG8iZN29RuYh9eRoMvKsT6uMAWlyUUGDEQGJJYjzCIO9ew== + version "1.0.30001451" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001451.tgz#2e197c698fc1373d63e1406d6607ea4617c613f1" + integrity sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w== case@^1.6.3: version "1.6.3" @@ -3686,10 +3686,10 @@ diff-sequences@^28.1.1: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== -diff-sequences@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.3.1.tgz#104b5b95fe725932421a9c6e5b4bef84c3f2249e" - integrity sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ== +diff-sequences@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.4.2.tgz#711fe6bd8a5869fe2539cee4a5152425ff671fda" + integrity sha512-R6P0Y6PrsH3n4hUXxL3nns0rbRk6Q33js3ygJBeEpbzLzgcNuJ61+u0RXasFpTKISw99TxUzFnumSnRLsjhLaw== diff@^4.0.1: version "4.0.2" @@ -3767,9 +3767,9 @@ ejs@^3.1.7: jake "^10.8.5" electron-to-chromium@^1.4.284: - version "1.4.284" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592" - integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== + version "1.4.289" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.289.tgz#02b59b1096486fc0bd4871a0484d8317802c6658" + integrity sha512-relLdMfPBxqGCxy7Gyfm1HcbRPcFUJdlgnCPVgQ23sr1TvUrRJz0/QPoGP0+x41wOVSTN/Wi3w6YDgHiHJGOzg== emittery@^0.10.2: version "0.10.2" @@ -4153,16 +4153,16 @@ expect@^28.1.3: jest-message-util "^28.1.3" jest-util "^28.1.3" -expect@^29.0.0, expect@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-29.4.1.tgz#58cfeea9cbf479b64ed081fd1e074ac8beb5a1fe" - integrity sha512-OKrGESHOaMxK3b6zxIq9SOW8kEXztKff/Dvg88j4xIJxur1hspEbedVkR3GpHe5LO+WB2Qw7OWN0RMTdp6as5A== +expect@^29.0.0, expect@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.4.2.tgz#2ae34eb88de797c64a1541ad0f1e2ea8a7a7b492" + integrity sha512-+JHYg9O3hd3RlICG90OPVjRkPBoiUH7PxvDVMnRiaq1g6JUgZStX514erMl0v2Dc5SkfVbm7ztqbd6qHHPn+mQ== dependencies: - "@jest/expect-utils" "^29.4.1" - jest-get-type "^29.2.0" - jest-matcher-utils "^29.4.1" - jest-message-util "^29.4.1" - jest-util "^29.4.1" + "@jest/expect-utils" "^29.4.2" + jest-get-type "^29.4.2" + jest-matcher-utils "^29.4.2" + jest-message-util "^29.4.2" + jest-util "^29.4.2" external-editor@^3.0.3: version "3.1.0" @@ -4482,9 +4482,9 @@ get-symbol-description@^1.0.0: get-intrinsic "^1.1.1" get-tsconfig@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.3.0.tgz#4c26fae115d1050e836aea65d6fe56b507ee249b" - integrity sha512-YCcF28IqSay3fqpIu5y3Krg/utCBHBeoflkZyHj/QcqI2nrLPC3ZegS9CmIo+hJb8K7aiGsuUl7PwWVjNG2HQQ== + version "4.4.0" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.4.0.tgz#64eee64596668a81b8fce18403f94f245ee0d4e5" + integrity sha512-0Gdjo/9+FzsYhXCEFueo2aY1z1tpXrxWZzP7k8ul9qt1U5o8rYJwTJYmaeHdrVosYIVYkOy2iwCJ9FdpocJhPQ== git-raw-commits@^2.0.8: version "2.0.11" @@ -5256,10 +5256,10 @@ jake@^10.8.5: filelist "^1.0.1" minimatch "^3.0.4" -jest-changed-files@^29.4.0: - version "29.4.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.4.0.tgz#ac2498bcd394228f7eddcadcf928b3583bf2779d" - integrity sha512-rnI1oPxgFghoz32Y8eZsGJMjW54UlqT17ycQeCEktcxxwqqKdlj9afl8LNeO0Pbu+h2JQHThQP0BzS67eTRx4w== +jest-changed-files@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.4.2.tgz#bee1fafc8b620d6251423d1978a0080546bc4376" + integrity sha512-Qdd+AXdqD16PQa+VsWJpxR3kN0JyOCX1iugQfx5nUgAsI4gwsKviXkpclxOK9ZnwaY2IQVHz+771eAvqeOlfuw== dependencies: execa "^5.0.0" p-limit "^3.1.0" @@ -5289,46 +5289,46 @@ jest-circus@^28.1.3: slash "^3.0.0" stack-utils "^2.0.3" -jest-circus@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.4.1.tgz#ff1b63eb04c3b111cefea9489e8dbadd23ce49bd" - integrity sha512-v02NuL5crMNY4CGPHBEflLzl4v91NFb85a+dH9a1pUNx6Xjggrd8l9pPy4LZ1VYNRXlb+f65+7O/MSIbLir6pA== +jest-circus@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.4.2.tgz#2d00c04baefd0ee2a277014cd494d4b5970663ed" + integrity sha512-wW3ztp6a2P5c1yOc1Cfrt5ozJ7neWmqeXm/4SYiqcSriyisgq63bwFj1NuRdSR5iqS0CMEYwSZd89ZA47W9zUg== dependencies: - "@jest/environment" "^29.4.1" - "@jest/expect" "^29.4.1" - "@jest/test-result" "^29.4.1" - "@jest/types" "^29.4.1" + "@jest/environment" "^29.4.2" + "@jest/expect" "^29.4.2" + "@jest/test-result" "^29.4.2" + "@jest/types" "^29.4.2" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" is-generator-fn "^2.0.0" - jest-each "^29.4.1" - jest-matcher-utils "^29.4.1" - jest-message-util "^29.4.1" - jest-runtime "^29.4.1" - jest-snapshot "^29.4.1" - jest-util "^29.4.1" + jest-each "^29.4.2" + jest-matcher-utils "^29.4.2" + jest-message-util "^29.4.2" + jest-runtime "^29.4.2" + jest-snapshot "^29.4.2" + jest-util "^29.4.2" p-limit "^3.1.0" - pretty-format "^29.4.1" + pretty-format "^29.4.2" slash "^3.0.0" stack-utils "^2.0.3" -jest-cli@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.4.1.tgz#7abef96944f300feb9b76f68b1eb2d68774fe553" - integrity sha512-jz7GDIhtxQ37M+9dlbv5K+/FVcIo1O/b1sX3cJgzlQUf/3VG25nvuWzlDC4F1FLLzUThJeWLu8I7JF9eWpuURQ== +jest-cli@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.4.2.tgz#94a2f913a0a7a49d11bee98ad88bf48baae941f4" + integrity sha512-b+eGUtXq/K2v7SH3QcJvFvaUaCDS1/YAZBYz0m28Q/Ppyr+1qNaHmVYikOrbHVbZqYQs2IeI3p76uy6BWbXq8Q== dependencies: - "@jest/core" "^29.4.1" - "@jest/test-result" "^29.4.1" - "@jest/types" "^29.4.1" + "@jest/core" "^29.4.2" + "@jest/test-result" "^29.4.2" + "@jest/types" "^29.4.2" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.9" import-local "^3.0.2" - jest-config "^29.4.1" - jest-util "^29.4.1" - jest-validate "^29.4.1" + jest-config "^29.4.2" + jest-util "^29.4.2" + jest-validate "^29.4.2" prompts "^2.0.1" yargs "^17.3.1" @@ -5360,31 +5360,31 @@ jest-config@^28.1.3: slash "^3.0.0" strip-json-comments "^3.1.1" -jest-config@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.4.1.tgz#e62670c6c980ec21d75941806ec4d0c0c6402728" - integrity sha512-g7p3q4NuXiM4hrS4XFATTkd+2z0Ml2RhFmFPM8c3WyKwVDNszbl4E7cV7WIx1YZeqqCtqbtTtZhGZWJlJqngzg== +jest-config@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.4.2.tgz#15386dd9ed2f7059516915515f786b8836a98f07" + integrity sha512-919CtnXic52YM0zW4C1QxjG6aNueX1kBGthuMtvFtRTAxhKfJmiXC9qwHmi6o2josjbDz8QlWyY55F1SIVmCWA== dependencies: "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.4.1" - "@jest/types" "^29.4.1" - babel-jest "^29.4.1" + "@jest/test-sequencer" "^29.4.2" + "@jest/types" "^29.4.2" + babel-jest "^29.4.2" chalk "^4.0.0" ci-info "^3.2.0" deepmerge "^4.2.2" glob "^7.1.3" graceful-fs "^4.2.9" - jest-circus "^29.4.1" - jest-environment-node "^29.4.1" - jest-get-type "^29.2.0" - jest-regex-util "^29.2.0" - jest-resolve "^29.4.1" - jest-runner "^29.4.1" - jest-util "^29.4.1" - jest-validate "^29.4.1" + jest-circus "^29.4.2" + jest-environment-node "^29.4.2" + jest-get-type "^29.4.2" + jest-regex-util "^29.4.2" + jest-resolve "^29.4.2" + jest-runner "^29.4.2" + jest-util "^29.4.2" + jest-validate "^29.4.2" micromatch "^4.0.4" parse-json "^5.2.0" - pretty-format "^29.4.1" + pretty-format "^29.4.2" slash "^3.0.0" strip-json-comments "^3.1.1" @@ -5398,15 +5398,15 @@ jest-diff@^28.1.3: jest-get-type "^28.0.2" pretty-format "^28.1.3" -jest-diff@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.4.1.tgz#9a6dc715037e1fa7a8a44554e7d272088c4029bd" - integrity sha512-uazdl2g331iY56CEyfbNA0Ut7Mn2ulAG5vUaEHXycf1L6IPyuImIxSz4F0VYBKi7LYIuxOwTZzK3wh5jHzASMw== +jest-diff@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.4.2.tgz#b88502d5dc02d97f6512d73c37da8b36f49b4871" + integrity sha512-EK8DSajVtnjx9sa1BkjZq3mqChm2Cd8rIzdXkQMA8e0wuXq53ypz6s5o5V8HRZkoEt2ywJ3eeNWFKWeYr8HK4g== dependencies: chalk "^4.0.0" - diff-sequences "^29.3.1" - jest-get-type "^29.2.0" - pretty-format "^29.4.1" + diff-sequences "^29.4.2" + jest-get-type "^29.4.2" + pretty-format "^29.4.2" jest-docblock@^28.1.1: version "28.1.1" @@ -5415,10 +5415,10 @@ jest-docblock@^28.1.1: dependencies: detect-newline "^3.0.0" -jest-docblock@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.2.0.tgz#307203e20b637d97cee04809efc1d43afc641e82" - integrity sha512-bkxUsxTgWQGbXV5IENmfiIuqZhJcyvF7tU4zJ/7ioTutdz4ToB5Yx6JOFBpgI+TphRY4lhOyCWGNH/QFQh5T6A== +jest-docblock@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.4.2.tgz#c78a95eedf9a24c0a6cc16cf2abdc4b8b0f2531b" + integrity sha512-dV2JdahgClL34Y5vLrAHde3nF3yo2jKRH+GIYJuCpfqwEJZcikzeafVTGAjbOfKPG17ez9iWXwUYp7yefeCRag== dependencies: detect-newline "^3.0.0" @@ -5433,16 +5433,16 @@ jest-each@^28.1.3: jest-util "^28.1.3" pretty-format "^28.1.3" -jest-each@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.4.1.tgz#05ce9979e7486dbd0f5d41895f49ccfdd0afce01" - integrity sha512-QlYFiX3llJMWUV0BtWht/esGEz9w+0i7BHwODKCze7YzZzizgExB9MOfiivF/vVT0GSQ8wXLhvHXh3x2fVD4QQ== +jest-each@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.4.2.tgz#e1347aff1303f4c35470827a62c029d389c5d44a" + integrity sha512-trvKZb0JYiCndc55V1Yh0Luqi7AsAdDWpV+mKT/5vkpnnFQfuQACV72IoRV161aAr6kAVIBpmYzwhBzm34vQkA== dependencies: - "@jest/types" "^29.4.1" + "@jest/types" "^29.4.2" chalk "^4.0.0" - jest-get-type "^29.2.0" - jest-util "^29.4.1" - pretty-format "^29.4.1" + jest-get-type "^29.4.2" + jest-util "^29.4.2" + pretty-format "^29.4.2" jest-environment-node@^28.1.3: version "28.1.3" @@ -5456,17 +5456,17 @@ jest-environment-node@^28.1.3: jest-mock "^28.1.3" jest-util "^28.1.3" -jest-environment-node@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.4.1.tgz#22550b7d0f8f0b16228639c9f88ca04bbf3c1974" - integrity sha512-x/H2kdVgxSkxWAIlIh9MfMuBa0hZySmfsC5lCsWmWr6tZySP44ediRKDUiNggX/eHLH7Cd5ZN10Rw+XF5tXsqg== +jest-environment-node@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.4.2.tgz#0eab835b41e25fd0c1a72f62665fc8db08762ad2" + integrity sha512-MLPrqUcOnNBc8zTOfqBbxtoa8/Ee8tZ7UFW7hRDQSUT+NGsvS96wlbHGTf+EFAT9KC3VNb7fWEM6oyvmxtE/9w== dependencies: - "@jest/environment" "^29.4.1" - "@jest/fake-timers" "^29.4.1" - "@jest/types" "^29.4.1" + "@jest/environment" "^29.4.2" + "@jest/fake-timers" "^29.4.2" + "@jest/types" "^29.4.2" "@types/node" "*" - jest-mock "^29.4.1" - jest-util "^29.4.1" + jest-mock "^29.4.2" + jest-util "^29.4.2" jest-expect-message@^1.1.3: version "1.1.3" @@ -5478,10 +5478,10 @@ jest-get-type@^28.0.2: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== -jest-get-type@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.2.0.tgz#726646f927ef61d583a3b3adb1ab13f3a5036408" - integrity sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA== +jest-get-type@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.4.2.tgz#7cb63f154bca8d8f57364d01614477d466fa43fe" + integrity sha512-vERN30V5i2N6lqlFu4ljdTqQAgrkTFMC9xaIIfOPYBw04pufjXRty5RuXBiB1d72tGbURa/UgoiHB90ruOSivg== jest-haste-map@^28.1.3: version "28.1.3" @@ -5502,20 +5502,20 @@ jest-haste-map@^28.1.3: optionalDependencies: fsevents "^2.3.2" -jest-haste-map@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.4.1.tgz#b0579dc82d94b40ed9041af56ad25c2f80bedaeb" - integrity sha512-imTjcgfVVTvg02khXL11NNLTx9ZaofbAWhilrMg/G8dIkp+HYCswhxf0xxJwBkfhWb3e8dwbjuWburvxmcr58w== +jest-haste-map@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.4.2.tgz#9112df3f5121e643f1b2dcbaa86ab11b0b90b49a" + integrity sha512-WkUgo26LN5UHPknkezrBzr7lUtV1OpGsp+NfXbBwHztsFruS3gz+AMTTBcEklvi8uPzpISzYjdKXYZQJXBnfvw== dependencies: - "@jest/types" "^29.4.1" + "@jest/types" "^29.4.2" "@types/graceful-fs" "^4.1.3" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.9" - jest-regex-util "^29.2.0" - jest-util "^29.4.1" - jest-worker "^29.4.1" + jest-regex-util "^29.4.2" + jest-util "^29.4.2" + jest-worker "^29.4.2" micromatch "^4.0.4" walker "^1.0.8" optionalDependencies: @@ -5529,13 +5529,13 @@ jest-leak-detector@^28.1.3: jest-get-type "^28.0.2" pretty-format "^28.1.3" -jest-leak-detector@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.4.1.tgz#632186c546e084da2b490b7496fee1a1c9929637" - integrity sha512-akpZv7TPyGMnH2RimOCgy+hPmWZf55EyFUvymQ4LMsQP8xSPlZumCPtXGoDhFNhUE2039RApZkTQDKU79p/FiQ== +jest-leak-detector@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.4.2.tgz#8f05c6680e0cb46a1d577c0d3da9793bed3ea97b" + integrity sha512-Wa62HuRJmWXtX9F00nUpWlrbaH5axeYCdyRsOs/+Rb1Vb6+qWTlB5rKwCCRKtorM7owNwKsyJ8NRDUcZ8ghYUA== dependencies: - jest-get-type "^29.2.0" - pretty-format "^29.4.1" + jest-get-type "^29.4.2" + pretty-format "^29.4.2" jest-matcher-utils@^28.1.3: version "28.1.3" @@ -5547,15 +5547,15 @@ jest-matcher-utils@^28.1.3: jest-get-type "^28.0.2" pretty-format "^28.1.3" -jest-matcher-utils@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.4.1.tgz#73d834e305909c3b43285fbc76f78bf0ad7e1954" - integrity sha512-k5h0u8V4nAEy6lSACepxL/rw78FLDkBnXhZVgFneVpnJONhb2DhZj/Gv4eNe+1XqQ5IhgUcqj745UwH0HJmMnA== +jest-matcher-utils@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.4.2.tgz#08d0bf5abf242e3834bec92c7ef5071732839e85" + integrity sha512-EZaAQy2je6Uqkrm6frnxBIdaWtSYFoR8SVb2sNLAtldswlR/29JAgx+hy67llT3+hXBaLB0zAm5UfeqerioZyg== dependencies: chalk "^4.0.0" - jest-diff "^29.4.1" - jest-get-type "^29.2.0" - pretty-format "^29.4.1" + jest-diff "^29.4.2" + jest-get-type "^29.4.2" + pretty-format "^29.4.2" jest-message-util@^28.1.3: version "28.1.3" @@ -5572,18 +5572,18 @@ jest-message-util@^28.1.3: slash "^3.0.0" stack-utils "^2.0.3" -jest-message-util@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.4.1.tgz#522623aa1df9a36ebfdffb06495c7d9d19e8a845" - integrity sha512-H4/I0cXUaLeCw6FM+i4AwCnOwHRgitdaUFOdm49022YD5nfyr8C/DrbXOBEyJaj+w/y0gGJ57klssOaUiLLQGQ== +jest-message-util@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.4.2.tgz#309a2924eae6ca67cf7f25781a2af1902deee717" + integrity sha512-SElcuN4s6PNKpOEtTInjOAA8QvItu0iugkXqhYyguRvQoXapg5gN+9RQxLAkakChZA7Y26j6yUCsFWN+hlKD6g== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.4.1" + "@jest/types" "^29.4.2" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.9" micromatch "^4.0.4" - pretty-format "^29.4.1" + pretty-format "^29.4.2" slash "^3.0.0" stack-utils "^2.0.3" @@ -5595,14 +5595,14 @@ jest-mock@^28.1.3: "@jest/types" "^28.1.3" "@types/node" "*" -jest-mock@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.4.1.tgz#a218a2abf45c99c501d4665207748a6b9e29afbd" - integrity sha512-MwA4hQ7zBOcgVCVnsM8TzaFLVUD/pFWTfbkY953Y81L5ret3GFRZtmPmRFAjKQSdCKoJvvqOu6Bvfpqlwwb0dQ== +jest-mock@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.4.2.tgz#e1054be66fb3e975d26d4528fcde6979e4759de8" + integrity sha512-x1FSd4Gvx2yIahdaIKoBjwji6XpboDunSJ95RpntGrYulI1ByuYQCKN/P7hvk09JB74IonU3IPLdkutEWYt++g== dependencies: - "@jest/types" "^29.4.1" + "@jest/types" "^29.4.2" "@types/node" "*" - jest-util "^29.4.1" + jest-util "^29.4.2" jest-pnp-resolver@^1.2.2: version "1.2.3" @@ -5614,18 +5614,18 @@ jest-regex-util@^28.0.2: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-28.0.2.tgz#afdc377a3b25fb6e80825adcf76c854e5bf47ead" integrity sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw== -jest-regex-util@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.2.0.tgz#82ef3b587e8c303357728d0322d48bbfd2971f7b" - integrity sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA== +jest-regex-util@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.4.2.tgz#19187cca35d301f8126cf7a021dd4dcb7b58a1ca" + integrity sha512-XYZXOqUl1y31H6VLMrrUL1ZhXuiymLKPz0BO1kEeR5xER9Tv86RZrjTm74g5l9bPJQXA/hyLdaVPN/sdqfteig== -jest-resolve-dependencies@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.4.1.tgz#02420a2e055da105e5fca8218c471d8b9553c904" - integrity sha512-Y3QG3M1ncAMxfjbYgtqNXC5B595zmB6e//p/qpA/58JkQXu/IpLDoLeOa8YoYfsSglBKQQzNUqtfGJJT/qLmJg== +jest-resolve-dependencies@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.4.2.tgz#6359db606f5967b68ca8bbe9dbc07a4306c12bf7" + integrity sha512-6pL4ptFw62rjdrPk7rRpzJYgcRqRZNsZTF1VxVTZMishbO6ObyWvX57yHOaNGgKoADtAHRFYdHQUEvYMJATbDg== dependencies: - jest-regex-util "^29.2.0" - jest-snapshot "^29.4.1" + jest-regex-util "^29.4.2" + jest-snapshot "^29.4.2" jest-resolve@^28.1.3: version "28.1.3" @@ -5642,17 +5642,17 @@ jest-resolve@^28.1.3: resolve.exports "^1.1.0" slash "^3.0.0" -jest-resolve@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.4.1.tgz#4c6bf71a07b8f0b79c5fdf4f2a2cf47317694c5e" - integrity sha512-j/ZFNV2lm9IJ2wmlq1uYK0Y/1PiyDq9g4HEGsNTNr3viRbJdV+8Lf1SXIiLZXFvyiisu0qUyIXGBnw+OKWkJwQ== +jest-resolve@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.4.2.tgz#8831f449671d08d161fe493003f61dc9b55b808e" + integrity sha512-RtKWW0mbR3I4UdkOrW7552IFGLYQ5AF9YrzD0FnIOkDu0rAMlA5/Y1+r7lhCAP4nXSBTaE7ueeqj6IOwZpgoqw== dependencies: chalk "^4.0.0" graceful-fs "^4.2.9" - jest-haste-map "^29.4.1" + jest-haste-map "^29.4.2" jest-pnp-resolver "^1.2.2" - jest-util "^29.4.1" - jest-validate "^29.4.1" + jest-util "^29.4.2" + jest-validate "^29.4.2" resolve "^1.20.0" resolve.exports "^2.0.0" slash "^3.0.0" @@ -5684,30 +5684,30 @@ jest-runner@^28.1.3: p-limit "^3.1.0" source-map-support "0.5.13" -jest-runner@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.4.1.tgz#57460d9ebb0eea2e27eeddca1816cf8537469661" - integrity sha512-8d6XXXi7GtHmsHrnaqBKWxjKb166Eyj/ksSaUYdcBK09VbjPwIgWov1VwSmtupCIz8q1Xv4Qkzt/BTo3ZqiCeg== +jest-runner@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.4.2.tgz#2bcecf72303369df4ef1e6e983c22a89870d5125" + integrity sha512-wqwt0drm7JGjwdH+x1XgAl+TFPH7poowMguPQINYxaukCqlczAcNLJiK+OLxUxQAEWMdy+e6nHZlFHO5s7EuRg== dependencies: - "@jest/console" "^29.4.1" - "@jest/environment" "^29.4.1" - "@jest/test-result" "^29.4.1" - "@jest/transform" "^29.4.1" - "@jest/types" "^29.4.1" + "@jest/console" "^29.4.2" + "@jest/environment" "^29.4.2" + "@jest/test-result" "^29.4.2" + "@jest/transform" "^29.4.2" + "@jest/types" "^29.4.2" "@types/node" "*" chalk "^4.0.0" emittery "^0.13.1" graceful-fs "^4.2.9" - jest-docblock "^29.2.0" - jest-environment-node "^29.4.1" - jest-haste-map "^29.4.1" - jest-leak-detector "^29.4.1" - jest-message-util "^29.4.1" - jest-resolve "^29.4.1" - jest-runtime "^29.4.1" - jest-util "^29.4.1" - jest-watcher "^29.4.1" - jest-worker "^29.4.1" + jest-docblock "^29.4.2" + jest-environment-node "^29.4.2" + jest-haste-map "^29.4.2" + jest-leak-detector "^29.4.2" + jest-message-util "^29.4.2" + jest-resolve "^29.4.2" + jest-runtime "^29.4.2" + jest-util "^29.4.2" + jest-watcher "^29.4.2" + jest-worker "^29.4.2" p-limit "^3.1.0" source-map-support "0.5.13" @@ -5739,31 +5739,31 @@ jest-runtime@^28.1.3: slash "^3.0.0" strip-bom "^4.0.0" -jest-runtime@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.4.1.tgz#9a50f9c69d3a391690897c01b0bfa8dc5dd45808" - integrity sha512-UXTMU9uKu2GjYwTtoAw5rn4STxWw/nadOfW7v1sx6LaJYa3V/iymdCLQM6xy3+7C6mY8GfX22vKpgxY171UIoA== - dependencies: - "@jest/environment" "^29.4.1" - "@jest/fake-timers" "^29.4.1" - "@jest/globals" "^29.4.1" - "@jest/source-map" "^29.2.0" - "@jest/test-result" "^29.4.1" - "@jest/transform" "^29.4.1" - "@jest/types" "^29.4.1" +jest-runtime@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.4.2.tgz#d86b764c5b95d76cb26ed1f32644e99de5d5c134" + integrity sha512-3fque9vtpLzGuxT9eZqhxi+9EylKK/ESfhClv4P7Y9sqJPs58LjVhTt8jaMp/pRO38agll1CkSu9z9ieTQeRrw== + dependencies: + "@jest/environment" "^29.4.2" + "@jest/fake-timers" "^29.4.2" + "@jest/globals" "^29.4.2" + "@jest/source-map" "^29.4.2" + "@jest/test-result" "^29.4.2" + "@jest/transform" "^29.4.2" + "@jest/types" "^29.4.2" "@types/node" "*" chalk "^4.0.0" cjs-module-lexer "^1.0.0" collect-v8-coverage "^1.0.0" glob "^7.1.3" graceful-fs "^4.2.9" - jest-haste-map "^29.4.1" - jest-message-util "^29.4.1" - jest-mock "^29.4.1" - jest-regex-util "^29.2.0" - jest-resolve "^29.4.1" - jest-snapshot "^29.4.1" - jest-util "^29.4.1" + jest-haste-map "^29.4.2" + jest-message-util "^29.4.2" + jest-mock "^29.4.2" + jest-regex-util "^29.4.2" + jest-resolve "^29.4.2" + jest-snapshot "^29.4.2" + jest-util "^29.4.2" semver "^7.3.5" slash "^3.0.0" strip-bom "^4.0.0" @@ -5797,10 +5797,10 @@ jest-snapshot@^28.1.3: pretty-format "^28.1.3" semver "^7.3.5" -jest-snapshot@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.4.1.tgz#5692210b3690c94f19317913d4082b123bd83dd9" - integrity sha512-l4iV8EjGgQWVz3ee/LR9sULDk2pCkqb71bjvlqn+qp90lFwpnulHj4ZBT8nm1hA1C5wowXLc7MGnw321u0tsYA== +jest-snapshot@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.4.2.tgz#ba1fb9abb279fd2c85109ff1757bc56b503bbb3a" + integrity sha512-PdfubrSNN5KwroyMH158R23tWcAXJyx4pvSvWls1dHoLCaUhGul9rsL3uVjtqzRpkxlkMavQjGuWG1newPgmkw== dependencies: "@babel/core" "^7.11.6" "@babel/generator" "^7.7.2" @@ -5808,23 +5808,23 @@ jest-snapshot@^29.4.1: "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.4.1" - "@jest/transform" "^29.4.1" - "@jest/types" "^29.4.1" + "@jest/expect-utils" "^29.4.2" + "@jest/transform" "^29.4.2" + "@jest/types" "^29.4.2" "@types/babel__traverse" "^7.0.6" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^29.4.1" + expect "^29.4.2" graceful-fs "^4.2.9" - jest-diff "^29.4.1" - jest-get-type "^29.2.0" - jest-haste-map "^29.4.1" - jest-matcher-utils "^29.4.1" - jest-message-util "^29.4.1" - jest-util "^29.4.1" + jest-diff "^29.4.2" + jest-get-type "^29.4.2" + jest-haste-map "^29.4.2" + jest-matcher-utils "^29.4.2" + jest-message-util "^29.4.2" + jest-util "^29.4.2" natural-compare "^1.4.0" - pretty-format "^29.4.1" + pretty-format "^29.4.2" semver "^7.3.5" jest-util@^28.1.3: @@ -5839,12 +5839,12 @@ jest-util@^28.1.3: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-util@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.4.1.tgz#2eeed98ff4563b441b5a656ed1a786e3abc3e4c4" - integrity sha512-bQy9FPGxVutgpN4VRc0hk6w7Hx/m6L53QxpDreTZgJd9gfx/AV2MjyPde9tGyZRINAUrSv57p2inGBu2dRLmkQ== +jest-util@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.4.2.tgz#3db8580b295df453a97de4a1b42dd2578dabd2c2" + integrity sha512-wKnm6XpJgzMUSRFB7YF48CuwdzuDIHenVuoIb1PLuJ6F+uErZsuDkU+EiExkChf6473XcawBrSfDSnXl+/YG4g== dependencies: - "@jest/types" "^29.4.1" + "@jest/types" "^29.4.2" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" @@ -5863,17 +5863,17 @@ jest-validate@^28.1.3: leven "^3.1.0" pretty-format "^28.1.3" -jest-validate@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.4.1.tgz#0d5174510415083ec329d4f981bf6779211f17e9" - integrity sha512-qNZXcZQdIQx4SfUB/atWnI4/I2HUvhz8ajOSYUu40CSmf9U5emil8EDHgE7M+3j9/pavtk3knlZBDsgFvv/SWw== +jest-validate@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.4.2.tgz#3b3f8c4910ab9a3442d2512e2175df6b3f77b915" + integrity sha512-tto7YKGPJyFbhcKhIDFq8B5od+eVWD/ySZ9Tvcp/NGCvYA4RQbuzhbwYWtIjMT5W5zA2W0eBJwu4HVw34d5G6Q== dependencies: - "@jest/types" "^29.4.1" + "@jest/types" "^29.4.2" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^29.2.0" + jest-get-type "^29.4.2" leven "^3.1.0" - pretty-format "^29.4.1" + pretty-format "^29.4.2" jest-watcher@^28.1.3: version "28.1.3" @@ -5889,18 +5889,18 @@ jest-watcher@^28.1.3: jest-util "^28.1.3" string-length "^4.0.1" -jest-watcher@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.4.1.tgz#6e3e2486918bd778849d4d6e67fd77b814f3e6ed" - integrity sha512-vFOzflGFs27nU6h8dpnVRER3O2rFtL+VMEwnG0H3KLHcllLsU8y9DchSh0AL/Rg5nN1/wSiQ+P4ByMGpuybaVw== +jest-watcher@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.4.2.tgz#09c0f4c9a9c7c0807fcefb1445b821c6f7953b7c" + integrity sha512-onddLujSoGiMJt+tKutehIidABa175i/Ays+QvKxCqBwp7fvxP3ZhKsrIdOodt71dKxqk4sc0LN41mWLGIK44w== dependencies: - "@jest/test-result" "^29.4.1" - "@jest/types" "^29.4.1" + "@jest/test-result" "^29.4.2" + "@jest/types" "^29.4.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.13.1" - jest-util "^29.4.1" + jest-util "^29.4.2" string-length "^4.0.1" jest-worker@^27.4.5: @@ -5921,25 +5921,25 @@ jest-worker@^28.1.3: merge-stream "^2.0.0" supports-color "^8.0.0" -jest-worker@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.4.1.tgz#7cb4a99a38975679600305650f86f4807460aab1" - integrity sha512-O9doU/S1EBe+yp/mstQ0VpPwpv0Clgn68TkNwGxL6/usX/KUW9Arnn4ag8C3jc6qHcXznhsT5Na1liYzAsuAbQ== +jest-worker@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.4.2.tgz#d9b2c3bafc69311d84d94e7fb45677fc8976296f" + integrity sha512-VIuZA2hZmFyRbchsUCHEehoSf2HEl0YVF8SDJqtPnKorAaBuh42V8QsLnde0XP5F6TyCynGPEGgBOn3Fc+wZGw== dependencies: "@types/node" "*" - jest-util "^29.4.1" + jest-util "^29.4.2" merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-29.4.1.tgz#bb34baca8e05901b49c02c62f1183a6182ea1785" - integrity sha512-cknimw7gAXPDOmj0QqztlxVtBVCw2lYY9CeIE5N6kD+kET1H4H79HSNISJmijb1HF+qk+G+ploJgiDi5k/fRlg== +jest@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.4.2.tgz#4c2127d03a71dc187f386156ef155dbf323fb7be" + integrity sha512-+5hLd260vNIHu+7ZgMIooSpKl7Jp5pHKb51e73AJU3owd5dEo/RfVwHbA/na3C/eozrt3hJOLGf96c7EWwIAzg== dependencies: - "@jest/core" "^29.4.1" - "@jest/types" "^29.4.1" + "@jest/core" "^29.4.2" + "@jest/types" "^29.4.2" import-local "^3.0.2" - jest-cli "^29.4.1" + jest-cli "^29.4.2" js-sdsl@^4.1.4: version "4.3.0" @@ -6578,9 +6578,9 @@ minipass@^3.0.0, minipass@^3.1.1, minipass@^3.1.6, minipass@^3.3.5: yallist "^4.0.0" minipass@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.0.1.tgz#2b9408c6e81bb8b338d600fb3685e375a370a057" - integrity sha512-V9esFpNbK0arbN3fm2sxDKqMYgIp7XtVdE4Esj+PE4Qaaxdg1wIw48ITQIOn1sc8xXSmUviVL3cyjMqPlrVkiA== + version "4.0.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.0.3.tgz#00bfbaf1e16e35e804f4aa31a7c1f6b8d9f0ee72" + integrity sha512-OW2r4sQ0sI+z5ckEt5c1Tri4xTgZwYDxpE54eqWlQloQRoWtXjqt9udJ5Z4dSv7wK+nfFI7FRXyCpBSft+gpFw== minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" @@ -6711,9 +6711,9 @@ node-int64@^0.4.0: integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== node-releases@^2.0.8: - version "2.0.9" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.9.tgz#fe66405285382b0c4ac6bcfbfbe7e8a510650b4d" - integrity sha512-2xfmOrRkGogbTK9R6Leda0DGiXeY3p2NJpy4+gNCffdUvV6mdEJnaDEic1i3Ec2djAo8jWYoJMR5PB0MSMpxUA== + version "2.0.10" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f" + integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== nopt@^5.0.0: version "5.0.0" @@ -7048,9 +7048,9 @@ onetime@^5.1.0, onetime@^5.1.2: mimic-fn "^2.1.0" open@^8.4.0: - version "8.4.0" - resolved "https://registry.yarnpkg.com/open/-/open-8.4.0.tgz#345321ae18f8138f82565a910fdc6b39e8c244f8" - integrity sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q== + version "8.4.1" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.1.tgz#2ab3754c07f5d1f99a7a8d6a82737c95e3101cff" + integrity sha512-/4b7qZNhv6Uhd7jjnREh1NjnPxlTq+XNWPG88Ydkj5AILcA5m3ajvcg57pB24EQjKv0dK62XnDqk9c/hkIG5Kg== dependencies: define-lazy-prop "^2.0.0" is-docker "^2.1.1" @@ -7385,10 +7385,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.8.3: - version "2.8.3" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632" - integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw== +prettier@^2.8.4: + version "2.8.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3" + integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw== pretty-format@^28.1.3: version "28.1.3" @@ -7400,12 +7400,12 @@ pretty-format@^28.1.3: ansi-styles "^5.0.0" react-is "^18.0.0" -pretty-format@^29.0.0, pretty-format@^29.4.1: - version "29.4.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.4.1.tgz#0da99b532559097b8254298da7c75a0785b1751c" - integrity sha512-dt/Z761JUVsrIKaY215o1xQJBGlSmTx/h4cSqXqjHLnU1+Kt+mavVE7UgqJJO5ukx5HjSswHfmXz4LjS2oIJfg== +pretty-format@^29.0.0, pretty-format@^29.4.2: + version "29.4.2" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.4.2.tgz#64bf5ccc0d718c03027d94ac957bdd32b3fb2401" + integrity sha512-qKlHR8yFVCbcEWba0H0TOC8dnLlO4vPlyEjRPw31FZ2Rupy9nLa8ZLbYny8gWEl8CkEhJqAE6IzdNELTBVcBEg== dependencies: - "@jest/schemas" "^29.4.0" + "@jest/schemas" "^29.4.2" ansi-styles "^5.0.0" react-is "^18.0.0" @@ -7477,10 +7477,10 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== -pyright@^1.1.292: - version "1.1.292" - resolved "https://registry.yarnpkg.com/pyright/-/pyright-1.1.292.tgz#5f84bd925830803d0015f5e4ed47f45d57a4a4ba" - integrity sha512-qwNT2mBKiZXSzVckHkyuCoyrKa8CXh6o4xH7PL/+jeIdiv+a5ljfkxPvIEm6Stln8YEU/tnQb8xODUtgKsu5YA== +pyright@^1.1.293: + version "1.1.293" + resolved "https://registry.yarnpkg.com/pyright/-/pyright-1.1.293.tgz#d03cc3fb80e8ea8de5f0631f367c213b47d3fd5e" + integrity sha512-VFRGaYwRp5vMTdSpw+0ZwdSz0c/3BRYrBaoSttSelJ6RVYrDkKOE0VKRIyXkA7wxCCqd29zRPbbK4RJWpYoHjg== q@^1.5.1: version "1.5.1" @@ -8275,9 +8275,9 @@ terser-webpack-plugin@^5.1.3: terser "^5.14.1" terser@^5.14.1: - version "5.16.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.2.tgz#8f495819439e8b5c150e7530fc434a6e70ea18b2" - integrity sha512-JKuM+KvvWVqT7muHVyrwv7FVRPnmHDwF6XwoIxdbF5Witi0vu99RYpxDexpJndXt3jbZZmmWr2/mQa6HvSNdSg== + version "5.16.3" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.3.tgz#3266017a9b682edfe019b8ecddd2abaae7b39c6b" + integrity sha512-v8wWLaS/xt3nE9dgKEWhNUFP6q4kngO5B8eYFUuebsu7Dw/UNAnpUod6UHo04jSSkv8TzKHjZDSd7EXdDQAl8Q== dependencies: "@jridgewell/source-map" "^0.3.2" acorn "^8.5.0" @@ -8867,7 +8867,7 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -write-file-atomic@^4.0.0, write-file-atomic@^4.0.1: +write-file-atomic@^4.0.0, write-file-atomic@^4.0.1, write-file-atomic@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== @@ -8875,14 +8875,6 @@ write-file-atomic@^4.0.0, write-file-atomic@^4.0.1: imurmurhash "^0.1.4" signal-exit "^3.0.7" -write-file-atomic@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.0.tgz#54303f117e109bf3d540261125c8ea5a7320fab0" - integrity sha512-R7NYMnHSlV42K54lwY9lvW6MnSm1HSJqZL3xiSgi9E7//FYaI74r2G0rd+/X6VAMkHEdzxQaU5HUOXWUz5kA/w== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^3.0.7" - write-json-file@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" From 647b1e23d0de924e40f9ae1ad95cf9793ae20ee3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Feb 2023 15:34:42 +0000 Subject: [PATCH 09/14] chore(deps): Bump XunitXml.TestLogger from 3.0.70 to 3.0.78 in /packages/@jsii/dotnet-runtime-test/test (#3949) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [XunitXml.TestLogger](https://github.com/spekt/xunit.testlogger) from 3.0.70 to 3.0.78.
Release notes

Sourced from XunitXml.TestLogger's releases.

v3.0.78

  • Update core testlogger to 3.0.86 for xunit test adapter
  • Fix: Explicit tests should be marked as Skipped. See spekt/nunit.testlogger#86
  • Replace Test Case name parser Possible Breaking Change
Changelog

Sourced from XunitXml.TestLogger's changelog.

v3.0.78 - 2023/01/30

  • Update core testlogger to 3.0.86 for xunit test adapter
  • Fix: Explicit tests should be marked as Skipped. See spekt/nunit.testlogger#86
  • Replace Test Case name parser Possible Breaking Change
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=XunitXml.TestLogger&package-manager=nuget&previous-version=3.0.70&new-version=3.0.78)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- packages/@jsii/Directory.Build.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@jsii/Directory.Build.targets b/packages/@jsii/Directory.Build.targets index 3cbff25995..7bef24e935 100644 --- a/packages/@jsii/Directory.Build.targets +++ b/packages/@jsii/Directory.Build.targets @@ -14,7 +14,7 @@ - + From 02e57bdfc79ea54ce816261995f49ae880bb70c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Feb 2023 17:02:53 +0000 Subject: [PATCH 10/14] chore(deps-dev): Bump mypy from 0.982 to 1.0.0 in /packages/jsii-pacmak/test/generated-code (#3954) Bumps [mypy](https://github.com/python/mypy) from 0.982 to 1.0.0.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mypy&package-manager=pip&previous-version=0.982&new-version=1.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- packages/jsii-pacmak/test/generated-code/requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jsii-pacmak/test/generated-code/requirements-dev.txt b/packages/jsii-pacmak/test/generated-code/requirements-dev.txt index a364e78e23..6de1ce6feb 100644 --- a/packages/jsii-pacmak/test/generated-code/requirements-dev.txt +++ b/packages/jsii-pacmak/test/generated-code/requirements-dev.txt @@ -1,2 +1,2 @@ -mypy==0.982 +mypy==1.0.0 pip==23.0 # required to use --config-settings From d4edafa9593079b9ac86dd0865754cef0c132740 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Feb 2023 18:12:32 +0000 Subject: [PATCH 11/14] chore(deps-dev): Update mkdocs-material requirement from ~=9.0.8 to ~=9.0.11 in /gh-pages (#3952) Updates the requirements on [mkdocs-material](https://github.com/squidfunk/mkdocs-material) to permit the latest version.
Release notes

Sourced from mkdocs-material's releases.

mkdocs-material-9.0.11

  • Added Mastodon verification for social links (rel=me)
  • Updated Italian translations
Changelog

Sourced from mkdocs-material's changelog.

mkdocs-material-9.0.11 (2023-02-03)

  • Added Mastodon verification for social links (rel=me)
  • Updated Italian translations

mkdocs-material-9.0.10 (2023-02-02)

  • Updated Arabic translations
  • Updated Korean translations
  • Updated Hungarian translations
  • Updated Russian translations
  • Fixed #4977: Improved accessibility for content tabs
  • Fixed #4960: Sometimes anchor following doesn't bring last item into view

mkdocs-material-9.0.9 (2023-01-30)

  • Updated Bulgarian translations
  • Updated Chinese (Simplified) translations
  • Updated Dutch translations
  • Updated Hindi translations
  • Updated Japanese translations
  • Updated Polish translations

mkdocs-material-9.0.8 (2023-01-29)

  • Updated Croatian translations
  • Updated French translations
  • Updated Hungarian translations
  • Updated Portuguese (Brasilian) translations
  • Updated Spanish translations
  • Updated Ukrainian translations
  • Updated Urdu translations
  • Updated Vietnamese translations

mkdocs-material-9.0.7 (2023-01-28)

  • Improved accessibility of sidebar navigation
  • Moved all translations into community edition
  • Updated Polish and Portuguese (Brasilian) translations
  • Fixed info plugin terminating on subsequent reload when serving
  • Fixed #4910: Sidebar navigation labels have invalid ARIA roles
  • Fixed #4884: Search query terms can't be separated by colons

mkdocs-material-9.0.6+insiders-4.29.0 (2023-01-21)

  • Added built-in optimize plugin for automatically compressing images
  • Switched reporting in built-in privacy plugin to info level

mkdocs-material-9.0.6 (2023-01-19)

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- gh-pages/requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gh-pages/requirements-dev.txt b/gh-pages/requirements-dev.txt index 8e1941a409..3e907e16f5 100644 --- a/gh-pages/requirements-dev.txt +++ b/gh-pages/requirements-dev.txt @@ -1,4 +1,4 @@ mkdocs~=1.4.2 mkdocs-awesome-pages-plugin~=2.8.0 -mkdocs-material~=9.0.8 +mkdocs-material~=9.0.11 mkdocs-git-revision-date-plugin~=0.3.2 From 800ed0a0e4667afc34a2c86bb2e0bb1ef3f9f9a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Feb 2023 19:06:25 +0000 Subject: [PATCH 12/14] chore(deps): Update pip requirement from ~=22.3 to ~=23.0 in /packages/@jsii/python-runtime (#3950) Updates the requirements on [pip](https://github.com/pypa/pip) to permit the latest version.
Changelog

Sourced from pip's changelog.

23.0 (2023-01-30)

Features

  • Change the hashes in the installation report to be a mapping. Emit the archive_info.hashes dictionary in direct_url.json. ([#11312](https://github.com/pypa/pip/issues/11312) <https://github.com/pypa/pip/issues/11312>_)
  • Implement logic to read the EXTERNALLY-MANAGED file as specified in PEP 668. This allows a downstream Python distributor to prevent users from using pip to modify the externally managed environment. ([#11381](https://github.com/pypa/pip/issues/11381) <https://github.com/pypa/pip/issues/11381>_)
  • Enable the use of keyring found on PATH. This allows keyring installed using pipx to be used by pip. ([#11589](https://github.com/pypa/pip/issues/11589) <https://github.com/pypa/pip/issues/11589>_)
  • The inspect and installation report formats are now declared stabled, and their version has been bumped from 0 to 1. ([#11757](https://github.com/pypa/pip/issues/11757) <https://github.com/pypa/pip/issues/11757>_)

Bug Fixes

  • Wheel cache behavior is restored to match previous versions, allowing the cache to find existing entries. ([#11527](https://github.com/pypa/pip/issues/11527) <https://github.com/pypa/pip/issues/11527>_)
  • Use the "venv" scheme if available to obtain prefixed lib paths. ([#11598](https://github.com/pypa/pip/issues/11598) <https://github.com/pypa/pip/issues/11598>_)
  • Deprecated a historical ambiguity in how egg fragments in URL-style requirements are formatted and handled. egg fragments that do not look like PEP 508 names now produce a deprecation warning. ([#11617](https://github.com/pypa/pip/issues/11617) <https://github.com/pypa/pip/issues/11617>_)
  • Fix scripts path in isolated build environment on Debian. ([#11623](https://github.com/pypa/pip/issues/11623) <https://github.com/pypa/pip/issues/11623>_)
  • Make pip show show the editable location if package is editable ([#11638](https://github.com/pypa/pip/issues/11638) <https://github.com/pypa/pip/issues/11638>_)
  • Stop checking that wheel is present when build-system.requires is provided without build-system.build-backend as setuptools (which we still check for) will inject it anyway. ([#11673](https://github.com/pypa/pip/issues/11673) <https://github.com/pypa/pip/issues/11673>_)
  • Fix an issue when an already existing in-memory distribution would cause exceptions in pip install ([#11704](https://github.com/pypa/pip/issues/11704) <https://github.com/pypa/pip/issues/11704>_)

Vendored Libraries

  • Upgrade certifi to 2022.12.7
  • Upgrade chardet to 5.1.0
  • Upgrade colorama to 0.4.6
  • Upgrade distro to 1.8.0
  • Remove pep517 from vendored packages
  • Upgrade platformdirs to 2.6.2
  • Add pyproject-hooks 1.0.0
  • Upgrade requests to 2.28.2
  • Upgrade rich to 12.6.0
  • Upgrade urllib3 to 1.26.14

Improved Documentation

... (truncated)

Commits
  • 368c7b4 Bump for release
  • aa94cca Update AUTHORS.txt
  • 60ce5c0 Fix the kind of news fragment
  • e3e7bc3 Merge pull request #11766 from uranusjr/upgrade-pre-commit-isort
  • b653b12 Bump pre-commit isort to 5.12.0
  • a2a4feb Merge pull request #11761 from sbidoul/direct-url-hashes-part-3-sbi
  • ec7eb6f Add version history to inspect and install report docs
  • 169511e Update direct URL hashes examples
  • efedf09 Merge pull request #11759 from pradyunsg/fix-keyring-auth
  • 60a4598 Merge pull request #11758 from pradyunsg/vendoring-update
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- packages/@jsii/python-runtime/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@jsii/python-runtime/requirements.txt b/packages/@jsii/python-runtime/requirements.txt index 020947ef2a..7fa5a907fd 100644 --- a/packages/@jsii/python-runtime/requirements.txt +++ b/packages/@jsii/python-runtime/requirements.txt @@ -1,6 +1,6 @@ black~=22.12 mypy==0.812 -pip~=22.3 +pip~=23.0 pytest~=7.2 pytest-mypy~=0.10 setuptools~=65.5.1 From 7e18e57595317780f591d60e623c2e14794dbe7f Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Mon, 13 Feb 2023 14:56:55 +0100 Subject: [PATCH 13/14] feat(check-node): export NodeRelease class (#3959) This can be useful, for example in projen templates, to automatically test fo all "supported" Node releases without having ot modify every single repository. This can serve as a central point of truth for what releases of node are supported by the Constructs ecosystem via jsii. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 --- packages/@jsii/check-node/src/constants.ts | 4 ++-- packages/@jsii/check-node/src/index.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/@jsii/check-node/src/constants.ts b/packages/@jsii/check-node/src/constants.ts index 87e31b18ca..a9491e2a41 100644 --- a/packages/@jsii/check-node/src/constants.ts +++ b/packages/@jsii/check-node/src/constants.ts @@ -32,7 +32,7 @@ export class NodeRelease { supportedRange: '^12.7.0', }), - // Currently active releases + // Currently active releases (as of last edit to this file...) new NodeRelease(14, { endOfLife: new Date('2023-04-30'), supportedRange: '^14.6.0', @@ -46,9 +46,9 @@ export class NodeRelease { supportedRange: '^17.3.0', }), new NodeRelease(18, { endOfLife: new Date('2025-04-30') }), + new NodeRelease(19, { endOfLife: new Date('2023-06-01') }), // Future (planned releases) - new NodeRelease(19, { endOfLife: new Date('2023-06-01') }), new NodeRelease(20, { endOfLife: new Date('2026-04-30'), untested: true }), ]; diff --git a/packages/@jsii/check-node/src/index.ts b/packages/@jsii/check-node/src/index.ts index 6ecc4a27d5..ade89d6e1c 100644 --- a/packages/@jsii/check-node/src/index.ts +++ b/packages/@jsii/check-node/src/index.ts @@ -4,6 +4,8 @@ import { version } from 'process'; import { NodeRelease } from './constants'; +export { NodeRelease } from './constants'; + /** * Checks the current process' node runtime version against the release support * matrix, and issues a warning to STDERR if the current version is not fully From f86b257e3908358dec4d060631606b9e7757fd8d Mon Sep 17 00:00:00 2001 From: AWS CDK Team Date: Tue, 14 Feb 2023 17:41:36 +0000 Subject: [PATCH 14/14] chore(release): 1.75.0 --- CHANGELOG.md | 13 +++++++++++++ lerna.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c95121afb..d871b5234f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.75.0](https://github.com/aws/jsii/compare/v1.74.0...v1.75.0) (2023-02-14) + + +### Features + +* **check-node:** export NodeRelease class ([#3959](https://github.com/aws/jsii/issues/3959)) ([7e18e57](https://github.com/aws/jsii/commit/7e18e57595317780f591d60e623c2e14794dbe7f)) + + +### Bug Fixes + +* **go:** shorten file names for sub-packages ([#3927](https://github.com/aws/jsii/issues/3927)) ([7697571](https://github.com/aws/jsii/commit/7697571542df82b5d228faf85d0e637edb254519)) +* **rosetta:** submodule-qualified names produce invalid Go, Java ([#3928](https://github.com/aws/jsii/issues/3928)) ([1ff230d](https://github.com/aws/jsii/commit/1ff230d9f7bc969e888e418375e7858df2a14424)), closes [#3551](https://github.com/aws/jsii/issues/3551) + ## [1.74.0](https://github.com/aws/jsii/compare/v1.73.0...v1.74.0) (2023-01-28) diff --git a/lerna.json b/lerna.json index 06e54019fc..14fe116bbc 100644 --- a/lerna.json +++ b/lerna.json @@ -10,5 +10,5 @@ "rejectCycles": true } }, - "version": "1.74.0" + "version": "1.75.0" }