Skip to content

Commit ebd73e0

Browse files
committed
feat(rule): improve kdoc
1 parent 02972fc commit ebd73e0

File tree

1 file changed

+17
-5
lines changed
  • src/commonMain/kotlin/com/algolia/search/model/rule

1 file changed

+17
-5
lines changed

src/commonMain/kotlin/com/algolia/search/model/rule/Promotion.kt

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,28 @@ public sealed class Promotion {
3030
@Serializable
3131
data class Multiple(
3232
/**
33-
* Unique identifier of the object to promote.
33+
* List of unique identifiers of the objects to promote.
3434
*/
3535
@SerialName(KeyObjectIDs) val objectIDs: List<ObjectID>,
3636
/**
37-
* Promoted rank for the object.
37+
* Promoted rank for the objects.
3838
*/
3939
@SerialName(KeyPosition) override val position: Int
4040
) : Promotion()
4141
}
4242

43-
fun Promotion(objectID: ObjectID, position: Int): Promotion.Single = Promotion.Single(objectID, position)
44-
45-
fun Promotion(objectIDs: List<ObjectID>, position: Int): Promotion.Multiple = Promotion.Multiple(objectIDs, position)
43+
/**
44+
* Creates an instance of [Promotion.Single].
45+
*
46+
* @param objectID unique identifier of the object to promote
47+
* @param position promoted rank for the object.
48+
*/
49+
public fun Promotion(objectID: ObjectID, position: Int): Promotion.Single = Promotion.Single(objectID, position)
50+
51+
/**
52+
* Creates an instance of [Promotion.Multiple].
53+
*
54+
* @param objectIDs list of unique identifiers of the objects to promote.
55+
* @param position promoted rank for the objects.
56+
*/
57+
public fun Promotion(objectIDs: List<ObjectID>, position: Int): Promotion.Multiple = Promotion.Multiple(objectIDs, position)

0 commit comments

Comments
 (0)