@@ -26,6 +26,7 @@ private constructor(
2626 private val description: JsonField <String >,
2727 private val selector: JsonField <String >,
2828 private val arguments: JsonField <List <String >>,
29+ private val backendNodeId: JsonField <Double >,
2930 private val method: JsonField <String >,
3031 private val additionalProperties: MutableMap <String , JsonValue >,
3132) {
@@ -39,8 +40,11 @@ private constructor(
3940 @JsonProperty(" arguments" )
4041 @ExcludeMissing
4142 arguments: JsonField <List <String >> = JsonMissing .of(),
43+ @JsonProperty(" backendNodeId" )
44+ @ExcludeMissing
45+ backendNodeId: JsonField <Double > = JsonMissing .of(),
4246 @JsonProperty(" method" ) @ExcludeMissing method: JsonField <String > = JsonMissing .of(),
43- ) : this (description, selector, arguments, method, mutableMapOf ())
47+ ) : this (description, selector, arguments, backendNodeId, method, mutableMapOf ())
4448
4549 /* *
4650 * Human-readable description of the action
@@ -66,6 +70,14 @@ private constructor(
6670 */
6771 fun arguments (): Optional <List <String >> = arguments.getOptional(" arguments" )
6872
73+ /* *
74+ * Backend node ID for the element
75+ *
76+ * @throws StagehandInvalidDataException if the JSON field has an unexpected type (e.g. if the
77+ * server responded with an unexpected value).
78+ */
79+ fun backendNodeId (): Optional <Double > = backendNodeId.getOptional(" backendNodeId" )
80+
6981 /* *
7082 * The method to execute (click, fill, etc.)
7183 *
@@ -95,6 +107,15 @@ private constructor(
95107 */
96108 @JsonProperty(" arguments" ) @ExcludeMissing fun _arguments (): JsonField <List <String >> = arguments
97109
110+ /* *
111+ * Returns the raw JSON value of [backendNodeId].
112+ *
113+ * Unlike [backendNodeId], this method doesn't throw if the JSON field has an unexpected type.
114+ */
115+ @JsonProperty(" backendNodeId" )
116+ @ExcludeMissing
117+ fun _backendNodeId (): JsonField <Double > = backendNodeId
118+
98119 /* *
99120 * Returns the raw JSON value of [method].
100121 *
@@ -134,6 +155,7 @@ private constructor(
134155 private var description: JsonField <String >? = null
135156 private var selector: JsonField <String >? = null
136157 private var arguments: JsonField <MutableList <String >>? = null
158+ private var backendNodeId: JsonField <Double > = JsonMissing .of()
137159 private var method: JsonField <String > = JsonMissing .of()
138160 private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
139161
@@ -142,6 +164,7 @@ private constructor(
142164 description = action.description
143165 selector = action.selector
144166 arguments = action.arguments.map { it.toMutableList() }
167+ backendNodeId = action.backendNodeId
145168 method = action.method
146169 additionalProperties = action.additionalProperties.toMutableMap()
147170 }
@@ -195,6 +218,20 @@ private constructor(
195218 }
196219 }
197220
221+ /* * Backend node ID for the element */
222+ fun backendNodeId (backendNodeId : Double ) = backendNodeId(JsonField .of(backendNodeId))
223+
224+ /* *
225+ * Sets [Builder.backendNodeId] to an arbitrary JSON value.
226+ *
227+ * You should usually call [Builder.backendNodeId] with a well-typed [Double] value instead.
228+ * This method is primarily for setting the field to an undocumented or not yet supported
229+ * value.
230+ */
231+ fun backendNodeId (backendNodeId : JsonField <Double >) = apply {
232+ this .backendNodeId = backendNodeId
233+ }
234+
198235 /* * The method to execute (click, fill, etc.) */
199236 fun method (method : String ) = method(JsonField .of(method))
200237
@@ -243,6 +280,7 @@ private constructor(
243280 checkRequired(" description" , description),
244281 checkRequired(" selector" , selector),
245282 (arguments ? : JsonMissing .of()).map { it.toImmutable() },
283+ backendNodeId,
246284 method,
247285 additionalProperties.toMutableMap(),
248286 )
@@ -258,6 +296,7 @@ private constructor(
258296 description()
259297 selector()
260298 arguments()
299+ backendNodeId()
261300 method()
262301 validated = true
263302 }
@@ -280,6 +319,7 @@ private constructor(
280319 (if (description.asKnown().isPresent) 1 else 0 ) +
281320 (if (selector.asKnown().isPresent) 1 else 0 ) +
282321 (arguments.asKnown().getOrNull()?.size ? : 0 ) +
322+ (if (backendNodeId.asKnown().isPresent) 1 else 0 ) +
283323 (if (method.asKnown().isPresent) 1 else 0 )
284324
285325 override fun equals (other : Any? ): Boolean {
@@ -291,16 +331,17 @@ private constructor(
291331 description == other.description &&
292332 selector == other.selector &&
293333 arguments == other.arguments &&
334+ backendNodeId == other.backendNodeId &&
294335 method == other.method &&
295336 additionalProperties == other.additionalProperties
296337 }
297338
298339 private val hashCode: Int by lazy {
299- Objects .hash(description, selector, arguments, method, additionalProperties)
340+ Objects .hash(description, selector, arguments, backendNodeId, method, additionalProperties)
300341 }
301342
302343 override fun hashCode (): Int = hashCode
303344
304345 override fun toString () =
305- " Action{description=$description , selector=$selector , arguments=$arguments , method=$method , additionalProperties=$additionalProperties }"
346+ " Action{description=$description , selector=$selector , arguments=$arguments , backendNodeId= $backendNodeId , method=$method , additionalProperties=$additionalProperties }"
306347}
0 commit comments