@@ -27,23 +27,26 @@ import kotlin.collections.toTypedArray
2727 *
2828 * This is a test description that should be put in the KDoc comment for a class
2929 *
30- * [Action on GitHub](https://github.com/john-smith/action-with-non-string -inputs)
30+ * [Action on GitHub](https://github.com/john-smith/action-with-all-types-of -inputs)
3131 *
3232 * @param fooBar Short description
3333 * @param bazGoo First boolean input!
3434 * @param binKin Boolean and nullable
3535 * @param intPint Integer
3636 * @param floPint Float
37- * @param booZoo List of strings
3837 * @param finBin Enumeration
3938 * @param gooZen Integer with special value
4039 * @param bahEnum Enum with custom naming
40+ * @param listStrings List of strings
41+ * @param listInts List of integers
42+ * @param listEnums List of enums
43+ * @param listIntSpecial List of integer with special values
4144 * @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by
4245 * the binding
4346 * @param _customVersion Allows overriding action's version, for example to use a specific minor
4447 * version, or a newer version that the binding doesn't yet know about
4548 */
46- public data class ActionWithNonStringInputsV3 private constructor(
49+ public data class ActionWithAllTypesOfInputsV3 private constructor(
4750 /* *
4851 * Short description
4952 */
@@ -64,22 +67,34 @@ public data class ActionWithNonStringInputsV3 private constructor(
6467 * Float
6568 */
6669 public val floPint : Float ,
67- /* *
68- * List of strings
69- */
70- public val booZoo : List <String >,
7170 /* *
7271 * Enumeration
7372 */
74- public val finBin : ActionWithNonStringInputsV3 .Bin ,
73+ public val finBin : ActionWithAllTypesOfInputsV3 .Bin ,
7574 /* *
7675 * Integer with special value
7776 */
78- public val gooZen : ActionWithNonStringInputsV3 .Zen ,
77+ public val gooZen : ActionWithAllTypesOfInputsV3 .Zen ,
7978 /* *
8079 * Enum with custom naming
8180 */
82- public val bahEnum : ActionWithNonStringInputsV3 .BahEnum ,
81+ public val bahEnum : ActionWithAllTypesOfInputsV3 .BahEnum ,
82+ /* *
83+ * List of strings
84+ */
85+ public val listStrings : List <String >? = null ,
86+ /* *
87+ * List of integers
88+ */
89+ public val listInts : List <Int >? = null ,
90+ /* *
91+ * List of enums
92+ */
93+ public val listEnums : List <ActionWithAllTypesOfInputsV3 .MyEnum >? = null ,
94+ /* *
95+ * List of integer with special values
96+ */
97+ public val listIntSpecial : List <ActionWithAllTypesOfInputsV3 .MyInt >? = null ,
8398 /* *
8499 * Type-unsafe map where you can put any inputs that are not yet supported by the binding
85100 */
@@ -89,7 +104,7 @@ public data class ActionWithNonStringInputsV3 private constructor(
89104 * version that the binding doesn't yet know about
90105 */
91106 public val _customVersion : String? = null ,
92- ) : RegularAction<Action.Outputs>(" john-smith" , " action-with-non-string -inputs" , _customVersion ? :
107+ ) : RegularAction<Action.Outputs>(" john-smith" , " action-with-all-types-of -inputs" , _customVersion ? :
93108 " v3" ) {
94109 public constructor (
95110 vararg pleaseUseNamedArguments: Unit ,
@@ -98,14 +113,18 @@ public data class ActionWithNonStringInputsV3 private constructor(
98113 binKin: Boolean? = null ,
99114 intPint: Int ,
100115 floPint: Float ,
101- booZoo: List <String >,
102- finBin: ActionWithNonStringInputsV3 .Bin ,
103- gooZen: ActionWithNonStringInputsV3 .Zen ,
104- bahEnum: ActionWithNonStringInputsV3 .BahEnum ,
116+ finBin: ActionWithAllTypesOfInputsV3 .Bin ,
117+ gooZen: ActionWithAllTypesOfInputsV3 .Zen ,
118+ bahEnum: ActionWithAllTypesOfInputsV3 .BahEnum ,
119+ listStrings: List <String >? = null ,
120+ listInts: List <Int >? = null ,
121+ listEnums: List <ActionWithAllTypesOfInputsV3 .MyEnum >? = null ,
122+ listIntSpecial: List <ActionWithAllTypesOfInputsV3 .MyInt >? = null ,
105123 _customInputs : Map <String , String > = mapOf (),
106124 _customVersion : String? = null ,
107125 ) : this (fooBar= fooBar, bazGoo= bazGoo, binKin= binKin, intPint= intPint, floPint= floPint,
108- booZoo= booZoo, finBin= finBin, gooZen= gooZen, bahEnum= bahEnum,
126+ finBin= finBin, gooZen= gooZen, bahEnum= bahEnum, listStrings= listStrings,
127+ listInts= listInts, listEnums= listEnums, listIntSpecial= listIntSpecial,
109128 _customInputs = _customInputs , _customVersion = _customVersion )
110129
111130 @Suppress(" SpreadOperator" )
@@ -116,10 +135,14 @@ public data class ActionWithNonStringInputsV3 private constructor(
116135 binKin?.let { " bin-kin" to it.toString() },
117136 " int-pint" to intPint.toString(),
118137 " flo-pint" to floPint.toString(),
119- " boo-zoo" to booZoo.joinToString(" ," ),
120138 " fin-bin" to finBin.stringValue,
121139 " goo-zen" to gooZen.integerValue.toString(),
122140 " bah-enum" to bahEnum.stringValue,
141+ listStrings?.let { " list-strings" to it.joinToString(" ," ) },
142+ listInts?.let { " list-ints" to it.joinToString(" ," ) { it.toString() } },
143+ listEnums?.let { " list-enums" to it.joinToString(" ," ) { it.stringValue } },
144+ listIntSpecial?.let { " list-int-special" to it.joinToString(" ," ) {
145+ it.integerValue.toString() } },
123146 * _customInputs .toList().toTypedArray(),
124147 ).toTypedArray()
125148 )
@@ -129,36 +152,60 @@ public data class ActionWithNonStringInputsV3 private constructor(
129152 public sealed class Bin (
130153 public val stringValue : String ,
131154 ) {
132- public object Foo : ActionWithNonStringInputsV3 .Bin(" foo" )
155+ public object Foo : ActionWithAllTypesOfInputsV3 .Bin(" foo" )
133156
134- public object BooBar : ActionWithNonStringInputsV3 .Bin(" boo-bar" )
157+ public object BooBar : ActionWithAllTypesOfInputsV3 .Bin(" boo-bar" )
135158
136- public object Baz123 : ActionWithNonStringInputsV3 .Bin(" baz123" )
159+ public object Baz123 : ActionWithAllTypesOfInputsV3 .Bin(" baz123" )
137160
138161 public class Custom (
139162 customStringValue : String ,
140- ) : ActionWithNonStringInputsV3 .Bin(customStringValue)
163+ ) : ActionWithAllTypesOfInputsV3 .Bin(customStringValue)
141164 }
142165
143166 public sealed class Zen (
144167 public val integerValue : Int ,
145168 ) {
146169 public class Value (
147170 requestedValue : Int ,
148- ) : ActionWithNonStringInputsV3 .Zen(requestedValue)
171+ ) : ActionWithAllTypesOfInputsV3 .Zen(requestedValue)
149172
150- public object Special1 : ActionWithNonStringInputsV3 .Zen(3 )
173+ public object Special1 : ActionWithAllTypesOfInputsV3 .Zen(3 )
151174
152- public object Special2 : ActionWithNonStringInputsV3 .Zen(-1 )
175+ public object Special2 : ActionWithAllTypesOfInputsV3 .Zen(-1 )
153176 }
154177
155178 public sealed class BahEnum (
156179 public val stringValue : String ,
157180 ) {
158- public object HelloWorld : ActionWithNonStringInputsV3.BahEnum(" helloworld" )
181+ public object HelloWorld : ActionWithAllTypesOfInputsV3.BahEnum(" helloworld" )
182+
183+ public class Custom (
184+ customStringValue : String ,
185+ ) : ActionWithAllTypesOfInputsV3.BahEnum(customStringValue)
186+ }
187+
188+ public sealed class MyEnum (
189+ public val stringValue : String ,
190+ ) {
191+ public object One : ActionWithAllTypesOfInputsV3.MyEnum(" one" )
192+
193+ public object Two : ActionWithAllTypesOfInputsV3.MyEnum(" two" )
194+
195+ public object Three : ActionWithAllTypesOfInputsV3.MyEnum(" three" )
159196
160197 public class Custom (
161198 customStringValue : String ,
162- ) : ActionWithNonStringInputsV3.BahEnum(customStringValue)
199+ ) : ActionWithAllTypesOfInputsV3.MyEnum(customStringValue)
200+ }
201+
202+ public sealed class MyInt (
203+ public val integerValue : Int ,
204+ ) {
205+ public class Value (
206+ requestedValue : Int ,
207+ ) : ActionWithAllTypesOfInputsV3.MyInt(requestedValue)
208+
209+ public object TheAnswer : ActionWithAllTypesOfInputsV3.MyInt(42 )
163210 }
164211}
0 commit comments