com.yandex.metrica.profile
Class Attribute
java.lang.Object
com.yandex.metrica.profile.Attribute
public class Attribute
extends java.lang.Object
Класс Attribute.
Методы класса создают предопределенные и собственные атрибуты профиля.
AppMetrica позволяет создать до 100 собственных атрибутов.
Атрибуты применяются с помощью методаUserProfile.Builder.apply(UserProfileUpdate)
.Method Summary
Modifier and Type | Method and Description |
---|---|
static BirthDateAttribute | birthDate()
Создает предопределенный атрибут для даты рождения/возраста.
|
static BooleanAttribute | customBoolean(java.lang.String key)
Создает собственный атрибут типа bool.
|
static CounterAttribute | customCounter(java.lang.String key)
Создает собственный атрибут типа счетчик.
|
static NumberAttribute | customNumber(java.lang.String key)
Создает собственный атрибут типа number.
|
static StringAttribute | customString(java.lang.String key)
Создает собственный атрибут типа string
|
static GenderAttribute | gender()
Создает предопределенный атрибут для пола.
|
static NameAttribute | name()
Создает предопределенный атрибут для имени.
|
static NotificationsEnabledAttribute | notificationsEnabled()
Создает предопределенный атрибут для статуса уведомлений.
|
Method Detail
customString
@NonNull public static StringAttribute customString(@NonNull java.lang.String key)
Создает собственный атрибут типа string
- Parameters:
key
- Название атрибута. Может содержать до 200 символов.- Returns:
- Объект
StringAttribute
customNumber
@NonNull public static NumberAttribute customNumber(@NonNull java.lang.String key)
Создает собственный атрибут типа number.
- Parameters:
key
- Название атрибута. Может содержать до 200 символов.- Returns:
- Объект
NumberAttribute
customBoolean
@NonNull public static BooleanAttribute customBoolean(@NonNull java.lang.String key)
Создает собственный атрибут типа bool.
- Parameters:
key
- Название атрибута. Может содержать до 200 символов.- Returns:
- Объект
BooleanAttribute
customCounter
@NonNull public static CounterAttribute customCounter(@NonNull java.lang.String key)
Создает собственный атрибут типа счетчик.
- Parameters:
key
- Название атрибута. Может содержать до 200 символов.- Returns:
- Объект
CounterAttribute
gender
@NonNull public static GenderAttribute gender()
Создает предопределенный атрибут для пола.
- Returns:
- Объект
GenderAttribute
birthDate
@NonNull public static BirthDateAttribute birthDate()
Создает предопределенный атрибут для даты рождения/возраста.
- Returns:
- Объект
BirthDateAttribute
notificationsEnabled
@NonNull public static NotificationsEnabledAttribute notificationsEnabled()
Создает предопределенный атрибут для статуса уведомлений. Показывает, разрешил ли пользователь показ уведомлений.
- Returns:
- Объект
NotificationsEnabledAttribute
name
@NonNull public static NameAttribute name()
Создает предопределенный атрибут для имени.
- Returns:
- Объект
NameAttribute