Coverage Summary for Class: TreeTargetingDto (cloud.mindbox.mobile_sdk.models)
| Class |
Method, %
|
Branch, %
|
Line, %
|
Instruction, %
|
| TreeTargetingDto |
100%
(1/1)
|
|
100%
(1/1)
|
100%
(2/2)
|
| TreeTargetingDto$CityNodeDto |
100%
(4/4)
|
|
100%
(7/7)
|
100%
(18/18)
|
| TreeTargetingDto$CityNodeDto$Companion |
|
| TreeTargetingDto$CountryNodeDto |
100%
(4/4)
|
|
100%
(7/7)
|
100%
(18/18)
|
| TreeTargetingDto$CountryNodeDto$Companion |
|
| TreeTargetingDto$IntersectionNodeDto |
66.7%
(2/3)
|
|
80%
(4/5)
|
84.6%
(11/13)
|
| TreeTargetingDto$IntersectionNodeDto$Companion |
|
| TreeTargetingDto$OperationNodeDto |
100%
(3/3)
|
|
100%
(5/5)
|
100%
(13/13)
|
| TreeTargetingDto$OperationNodeDto$Companion |
|
| TreeTargetingDto$PushPermissionDto |
100%
(3/3)
|
|
100%
(5/5)
|
100%
(13/13)
|
| TreeTargetingDto$PushPermissionDto$Companion |
|
| TreeTargetingDto$RegionNodeDto |
100%
(4/4)
|
|
100%
(7/7)
|
100%
(18/18)
|
| TreeTargetingDto$RegionNodeDto$Companion |
|
| TreeTargetingDto$SegmentNodeDto |
100%
(6/6)
|
|
100%
(11/11)
|
100%
(28/28)
|
| TreeTargetingDto$SegmentNodeDto$Companion |
|
| TreeTargetingDto$TrueNodeDto |
100%
(2/2)
|
|
100%
(3/3)
|
100%
(8/8)
|
| TreeTargetingDto$TrueNodeDto$Companion |
|
| TreeTargetingDto$UnionNodeDto |
66.7%
(2/3)
|
|
80%
(4/5)
|
84.6%
(11/13)
|
| TreeTargetingDto$UnionNodeDto$Companion |
|
| TreeTargetingDto$ViewProductCategoryInNodeDto |
25%
(1/4)
|
|
57.1%
(4/7)
|
66.7%
(12/18)
|
| TreeTargetingDto$ViewProductCategoryInNodeDto$Companion |
|
| TreeTargetingDto$ViewProductCategoryInNodeDto$ValueDto |
25%
(1/4)
|
|
57.1%
(4/7)
|
64.7%
(11/17)
|
| TreeTargetingDto$ViewProductCategoryNodeDto |
25%
(1/4)
|
|
57.1%
(4/7)
|
66.7%
(12/18)
|
| TreeTargetingDto$ViewProductCategoryNodeDto$Companion |
|
| TreeTargetingDto$ViewProductNodeDto |
100%
(4/4)
|
|
100%
(7/7)
|
100%
(18/18)
|
| TreeTargetingDto$ViewProductNodeDto$Companion |
|
| TreeTargetingDto$ViewProductSegmentNodeDto |
100%
(6/6)
|
|
100%
(11/11)
|
100%
(28/28)
|
| TreeTargetingDto$ViewProductSegmentNodeDto$Companion |
|
| TreeTargetingDto$VisitNodeDto |
100%
(4/4)
|
|
100%
(7/7)
|
100%
(18/18)
|
| TreeTargetingDto$VisitNodeDto$Companion |
|
| Total |
81.4%
(48/59)
|
|
89.2%
(91/102)
|
91.6%
(239/261)
|
package cloud.mindbox.mobile_sdk.models
import com.google.gson.annotations.SerializedName
/**
* Тargeting types
**/
internal sealed class TreeTargetingDto {
internal data class TrueNodeDto(
@SerializedName("${"$"}type")
val type: String?,
) : TreeTargetingDto() {
companion object {
const val TRUE_JSON_NAME = "true"
}
}
internal data class IntersectionNodeDto(
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("nodes")
val nodes: List<TreeTargetingDto?>?,
) : TreeTargetingDto() {
companion object {
const val AND_JSON_NAME = "and"
}
}
internal data class UnionNodeDto(
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("nodes")
val nodes: List<TreeTargetingDto?>?,
) : TreeTargetingDto() {
companion object {
const val OR_JSON_NAME = "or"
}
}
internal data class SegmentNodeDto(
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("kind")
val kind: String?,
@SerializedName("segmentationExternalId")
val segmentationExternalId: String?,
@SerializedName("segmentationInternalId")
val segmentationInternalId: String?,
@SerializedName("segmentExternalId")
val segmentExternalId: String?,
) : TreeTargetingDto() {
companion object {
const val SEGMENT_JSON_NAME = "segment"
}
}
internal data class CountryNodeDto(
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("kind")
val kind: String?,
@SerializedName("ids")
val ids: List<Long?>?,
) : TreeTargetingDto() {
companion object {
const val COUNTRY_JSON_NAME = "country"
}
}
internal data class CityNodeDto(
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("kind")
val kind: String?,
@SerializedName("ids")
val ids: List<Long>?,
) : TreeTargetingDto() {
companion object {
const val CITY_JSON_NAME = "city"
}
}
internal data class RegionNodeDto(
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("kind")
val kind: String?,
@SerializedName("ids")
val ids: List<Long?>?,
) : TreeTargetingDto() {
companion object {
const val REGION_JSON_NAME = "region"
}
}
internal data class OperationNodeDto(
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("systemName")
val systemName: String?,
) : TreeTargetingDto() {
companion object {
const val API_METHOD_CALL_JSON_NAME = "apiMethodCall"
}
}
internal data class ViewProductCategoryNodeDto(
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("kind")
val kind: String?,
@SerializedName("value")
val value: String?,
) : TreeTargetingDto() {
companion object {
const val VIEW_PRODUCT_CATEGORY_ID_JSON_NAME = "viewProductCategoryId"
}
}
internal data class ViewProductCategoryInNodeDto(
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("kind")
val kind: String?,
@SerializedName("values")
val values: List<ValueDto>?,
) : TreeTargetingDto() {
companion object {
const val VIEW_PRODUCT_CATEGORY_ID_IN_JSON_NAME = "viewProductCategoryIdIn"
}
internal data class ValueDto(
@SerializedName("id")
val id: String?,
@SerializedName("externalId")
val externalId: String?,
@SerializedName("externalSystemName")
val externalSystemName: String?,
)
}
internal data class ViewProductNodeDto(
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("kind")
val kind: String?,
@SerializedName("value")
val value: String?,
) : TreeTargetingDto() {
companion object {
const val VIEW_PRODUCT_ID_JSON_NAME = "viewProductId"
}
}
internal data class ViewProductSegmentNodeDto(
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("kind")
val kind: String?,
@SerializedName("segmentationExternalId")
val segmentationExternalId: String?,
@SerializedName("segmentationInternalId")
val segmentationInternalId: String?,
@SerializedName("segmentExternalId")
val segmentExternalId: String?,
) : TreeTargetingDto() {
companion object {
const val VIEW_PRODUCT_SEGMENT_JSON_NAME = "viewProductSegment"
}
}
internal data class VisitNodeDto(
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("kind")
val kind: String?,
@SerializedName("value")
val value: Long?
) : TreeTargetingDto() {
companion object {
const val VISIT_JSON_NAME = "visit"
}
}
internal data class PushPermissionDto(
@SerializedName("${"$"}type")
val type: String?,
@SerializedName("value")
val value: Boolean?
) : TreeTargetingDto() {
companion object {
const val PUSH_PERMISSION_JSON_NAME = "pushEnabled"
}
}
}