mirror of
https://github.com/YTVanced/VancedMicroG
synced 2024-12-01 07:33:02 +00:00
1548 lines
47 KiB
Java
1548 lines
47 KiB
Java
|
// Code generated by Wire protocol buffer compiler, do not edit.
|
||
|
// Source file: protos-repo/checkin.proto
|
||
|
package org.microg.gms.checkin;
|
||
|
|
||
|
import com.squareup.wire.Message;
|
||
|
import com.squareup.wire.ProtoField;
|
||
|
import java.util.Collections;
|
||
|
import java.util.List;
|
||
|
|
||
|
import static com.squareup.wire.Message.Datatype.BOOL;
|
||
|
import static com.squareup.wire.Message.Datatype.FIXED64;
|
||
|
import static com.squareup.wire.Message.Datatype.FLOAT;
|
||
|
import static com.squareup.wire.Message.Datatype.INT32;
|
||
|
import static com.squareup.wire.Message.Datatype.INT64;
|
||
|
import static com.squareup.wire.Message.Datatype.STRING;
|
||
|
import static com.squareup.wire.Message.Label.REPEATED;
|
||
|
|
||
|
public final class CheckinRequest extends Message {
|
||
|
|
||
|
public static final String DEFAULT_IMEI = "";
|
||
|
public static final Long DEFAULT_ANDROIDID = 0L;
|
||
|
public static final String DEFAULT_DIGEST = "";
|
||
|
public static final String DEFAULT_DESIREDBUILD = "";
|
||
|
public static final String DEFAULT_LOCALE = "";
|
||
|
public static final Long DEFAULT_LOGGINGID = 0L;
|
||
|
public static final String DEFAULT_MARKETCHECKIN = "";
|
||
|
public static final List<String> DEFAULT_MACADDRESS = Collections.emptyList();
|
||
|
public static final String DEFAULT_MEID = "";
|
||
|
public static final List<String> DEFAULT_ACCOUNTCOOKIE = Collections.emptyList();
|
||
|
public static final String DEFAULT_TIMEZONE = "";
|
||
|
public static final Long DEFAULT_SECURITYTOKEN = 0L;
|
||
|
public static final Integer DEFAULT_VERSION = 0;
|
||
|
public static final List<String> DEFAULT_OTACERT = Collections.emptyList();
|
||
|
public static final String DEFAULT_SERIAL = "";
|
||
|
public static final String DEFAULT_ESN = "";
|
||
|
public static final List<String> DEFAULT_MACADDRESSTYPE = Collections.emptyList();
|
||
|
public static final Integer DEFAULT_FRAGMENT = 0;
|
||
|
public static final String DEFAULT_USERNAME = "";
|
||
|
public static final Integer DEFAULT_USERSERIALNUMBER = 0;
|
||
|
|
||
|
@ProtoField(tag = 1, type = STRING)
|
||
|
public final String imei;
|
||
|
|
||
|
/**
|
||
|
* unused
|
||
|
*/
|
||
|
@ProtoField(tag = 2, type = INT64)
|
||
|
public final Long androidId;
|
||
|
|
||
|
/**
|
||
|
* Gservices["android_id"] or 0
|
||
|
*/
|
||
|
@ProtoField(tag = 3, type = STRING)
|
||
|
public final String digest;
|
||
|
|
||
|
/**
|
||
|
* Gservices["digest"] or ""
|
||
|
*/
|
||
|
@ProtoField(tag = 4)
|
||
|
public final Checkin checkin;
|
||
|
|
||
|
@ProtoField(tag = 5, type = STRING)
|
||
|
public final String desiredBuild;
|
||
|
|
||
|
/**
|
||
|
* unused
|
||
|
*/
|
||
|
@ProtoField(tag = 6, type = STRING)
|
||
|
public final String locale;
|
||
|
|
||
|
/**
|
||
|
* Locale.toString
|
||
|
*/
|
||
|
@ProtoField(tag = 7, type = INT64)
|
||
|
public final Long loggingId;
|
||
|
|
||
|
/**
|
||
|
* GoogleSettingsContract.Partner["logging_id2"]
|
||
|
*/
|
||
|
@ProtoField(tag = 8, type = STRING)
|
||
|
public final String marketCheckin;
|
||
|
|
||
|
/**
|
||
|
* unused
|
||
|
*/
|
||
|
@ProtoField(tag = 9, type = STRING, label = REPEATED)
|
||
|
public final List<String> macAddress;
|
||
|
|
||
|
/**
|
||
|
* NetworkInfo.getExtraInfo, WifiInfo.getMacAddress (12 hex-digits)
|
||
|
*/
|
||
|
@ProtoField(tag = 10, type = STRING)
|
||
|
public final String meid;
|
||
|
|
||
|
/**
|
||
|
* TelephonyManager.getDeviceId (14 hex-digits)
|
||
|
*/
|
||
|
@ProtoField(tag = 11, type = STRING, label = REPEATED)
|
||
|
public final List<String> accountCookie;
|
||
|
|
||
|
/**
|
||
|
* "[<email>]" followed by "<authToken>"
|
||
|
*/
|
||
|
@ProtoField(tag = 12, type = STRING)
|
||
|
public final String timeZone;
|
||
|
|
||
|
/**
|
||
|
* TimeZone.getId
|
||
|
*/
|
||
|
@ProtoField(tag = 13, type = FIXED64)
|
||
|
public final Long securityToken;
|
||
|
|
||
|
@ProtoField(tag = 14, type = INT32)
|
||
|
public final Integer version;
|
||
|
|
||
|
/**
|
||
|
* 3 if securityToken != 0 OR androidId == 0
|
||
|
*/
|
||
|
@ProtoField(tag = 15, type = STRING, label = REPEATED)
|
||
|
public final List<String> otaCert;
|
||
|
|
||
|
/**
|
||
|
* SHA-1 of each in /system/etc/security/otacerts.zip or "--IOException--" or "--no-output--"
|
||
|
*/
|
||
|
@ProtoField(tag = 16, type = STRING)
|
||
|
public final String serial;
|
||
|
|
||
|
/**
|
||
|
* Build.SERIAL != "unknown"
|
||
|
*/
|
||
|
@ProtoField(tag = 17, type = STRING)
|
||
|
public final String esn;
|
||
|
|
||
|
/**
|
||
|
* TelephonyManager.getDeviceId (8 hex-digits)
|
||
|
*/
|
||
|
@ProtoField(tag = 18)
|
||
|
public final DeviceConfig deviceConfiguration;
|
||
|
|
||
|
@ProtoField(tag = 19, type = STRING, label = REPEATED)
|
||
|
public final List<String> macAddressType;
|
||
|
|
||
|
/**
|
||
|
* "ethernet", "wifi"
|
||
|
*/
|
||
|
@ProtoField(tag = 20, type = INT32)
|
||
|
public final Integer fragment;
|
||
|
|
||
|
/**
|
||
|
* unknown (use 0)
|
||
|
*/
|
||
|
@ProtoField(tag = 21, type = STRING)
|
||
|
public final String userName;
|
||
|
|
||
|
/**
|
||
|
* unused
|
||
|
*/
|
||
|
@ProtoField(tag = 22, type = INT32)
|
||
|
public final Integer userSerialNumber;
|
||
|
|
||
|
public CheckinRequest(String imei, Long androidId, String digest, Checkin checkin, String desiredBuild, String locale, Long loggingId, String marketCheckin, List<String> macAddress, String meid, List<String> accountCookie, String timeZone, Long securityToken, Integer version, List<String> otaCert, String serial, String esn, DeviceConfig deviceConfiguration, List<String> macAddressType, Integer fragment, String userName, Integer userSerialNumber) {
|
||
|
this.imei = imei;
|
||
|
this.androidId = androidId;
|
||
|
this.digest = digest;
|
||
|
this.checkin = checkin;
|
||
|
this.desiredBuild = desiredBuild;
|
||
|
this.locale = locale;
|
||
|
this.loggingId = loggingId;
|
||
|
this.marketCheckin = marketCheckin;
|
||
|
this.macAddress = immutableCopyOf(macAddress);
|
||
|
this.meid = meid;
|
||
|
this.accountCookie = immutableCopyOf(accountCookie);
|
||
|
this.timeZone = timeZone;
|
||
|
this.securityToken = securityToken;
|
||
|
this.version = version;
|
||
|
this.otaCert = immutableCopyOf(otaCert);
|
||
|
this.serial = serial;
|
||
|
this.esn = esn;
|
||
|
this.deviceConfiguration = deviceConfiguration;
|
||
|
this.macAddressType = immutableCopyOf(macAddressType);
|
||
|
this.fragment = fragment;
|
||
|
this.userName = userName;
|
||
|
this.userSerialNumber = userSerialNumber;
|
||
|
}
|
||
|
|
||
|
private CheckinRequest(Builder builder) {
|
||
|
this(builder.imei, builder.androidId, builder.digest, builder.checkin, builder.desiredBuild, builder.locale, builder.loggingId, builder.marketCheckin, builder.macAddress, builder.meid, builder.accountCookie, builder.timeZone, builder.securityToken, builder.version, builder.otaCert, builder.serial, builder.esn, builder.deviceConfiguration, builder.macAddressType, builder.fragment, builder.userName, builder.userSerialNumber);
|
||
|
setBuilder(builder);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean equals(Object other) {
|
||
|
if (other == this) return true;
|
||
|
if (!(other instanceof CheckinRequest)) return false;
|
||
|
CheckinRequest o = (CheckinRequest) other;
|
||
|
return equals(imei, o.imei)
|
||
|
&& equals(androidId, o.androidId)
|
||
|
&& equals(digest, o.digest)
|
||
|
&& equals(checkin, o.checkin)
|
||
|
&& equals(desiredBuild, o.desiredBuild)
|
||
|
&& equals(locale, o.locale)
|
||
|
&& equals(loggingId, o.loggingId)
|
||
|
&& equals(marketCheckin, o.marketCheckin)
|
||
|
&& equals(macAddress, o.macAddress)
|
||
|
&& equals(meid, o.meid)
|
||
|
&& equals(accountCookie, o.accountCookie)
|
||
|
&& equals(timeZone, o.timeZone)
|
||
|
&& equals(securityToken, o.securityToken)
|
||
|
&& equals(version, o.version)
|
||
|
&& equals(otaCert, o.otaCert)
|
||
|
&& equals(serial, o.serial)
|
||
|
&& equals(esn, o.esn)
|
||
|
&& equals(deviceConfiguration, o.deviceConfiguration)
|
||
|
&& equals(macAddressType, o.macAddressType)
|
||
|
&& equals(fragment, o.fragment)
|
||
|
&& equals(userName, o.userName)
|
||
|
&& equals(userSerialNumber, o.userSerialNumber);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public int hashCode() {
|
||
|
int result = hashCode;
|
||
|
if (result == 0) {
|
||
|
result = imei != null ? imei.hashCode() : 0;
|
||
|
result = result * 37 + (androidId != null ? androidId.hashCode() : 0);
|
||
|
result = result * 37 + (digest != null ? digest.hashCode() : 0);
|
||
|
result = result * 37 + (checkin != null ? checkin.hashCode() : 0);
|
||
|
result = result * 37 + (desiredBuild != null ? desiredBuild.hashCode() : 0);
|
||
|
result = result * 37 + (locale != null ? locale.hashCode() : 0);
|
||
|
result = result * 37 + (loggingId != null ? loggingId.hashCode() : 0);
|
||
|
result = result * 37 + (marketCheckin != null ? marketCheckin.hashCode() : 0);
|
||
|
result = result * 37 + (macAddress != null ? macAddress.hashCode() : 1);
|
||
|
result = result * 37 + (meid != null ? meid.hashCode() : 0);
|
||
|
result = result * 37 + (accountCookie != null ? accountCookie.hashCode() : 1);
|
||
|
result = result * 37 + (timeZone != null ? timeZone.hashCode() : 0);
|
||
|
result = result * 37 + (securityToken != null ? securityToken.hashCode() : 0);
|
||
|
result = result * 37 + (version != null ? version.hashCode() : 0);
|
||
|
result = result * 37 + (otaCert != null ? otaCert.hashCode() : 1);
|
||
|
result = result * 37 + (serial != null ? serial.hashCode() : 0);
|
||
|
result = result * 37 + (esn != null ? esn.hashCode() : 0);
|
||
|
result = result * 37 + (deviceConfiguration != null ? deviceConfiguration.hashCode() : 0);
|
||
|
result = result * 37 + (macAddressType != null ? macAddressType.hashCode() : 1);
|
||
|
result = result * 37 + (fragment != null ? fragment.hashCode() : 0);
|
||
|
result = result * 37 + (userName != null ? userName.hashCode() : 0);
|
||
|
result = result * 37 + (userSerialNumber != null ? userSerialNumber.hashCode() : 0);
|
||
|
hashCode = result;
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
public static final class Builder extends Message.Builder<CheckinRequest> {
|
||
|
|
||
|
public String imei;
|
||
|
public Long androidId;
|
||
|
public String digest;
|
||
|
public Checkin checkin;
|
||
|
public String desiredBuild;
|
||
|
public String locale;
|
||
|
public Long loggingId;
|
||
|
public String marketCheckin;
|
||
|
public List<String> macAddress;
|
||
|
public String meid;
|
||
|
public List<String> accountCookie;
|
||
|
public String timeZone;
|
||
|
public Long securityToken;
|
||
|
public Integer version;
|
||
|
public List<String> otaCert;
|
||
|
public String serial;
|
||
|
public String esn;
|
||
|
public DeviceConfig deviceConfiguration;
|
||
|
public List<String> macAddressType;
|
||
|
public Integer fragment;
|
||
|
public String userName;
|
||
|
public Integer userSerialNumber;
|
||
|
|
||
|
public Builder() {
|
||
|
}
|
||
|
|
||
|
public Builder(CheckinRequest message) {
|
||
|
super(message);
|
||
|
if (message == null) return;
|
||
|
this.imei = message.imei;
|
||
|
this.androidId = message.androidId;
|
||
|
this.digest = message.digest;
|
||
|
this.checkin = message.checkin;
|
||
|
this.desiredBuild = message.desiredBuild;
|
||
|
this.locale = message.locale;
|
||
|
this.loggingId = message.loggingId;
|
||
|
this.marketCheckin = message.marketCheckin;
|
||
|
this.macAddress = copyOf(message.macAddress);
|
||
|
this.meid = message.meid;
|
||
|
this.accountCookie = copyOf(message.accountCookie);
|
||
|
this.timeZone = message.timeZone;
|
||
|
this.securityToken = message.securityToken;
|
||
|
this.version = message.version;
|
||
|
this.otaCert = copyOf(message.otaCert);
|
||
|
this.serial = message.serial;
|
||
|
this.esn = message.esn;
|
||
|
this.deviceConfiguration = message.deviceConfiguration;
|
||
|
this.macAddressType = copyOf(message.macAddressType);
|
||
|
this.fragment = message.fragment;
|
||
|
this.userName = message.userName;
|
||
|
this.userSerialNumber = message.userSerialNumber;
|
||
|
}
|
||
|
|
||
|
public Builder imei(String imei) {
|
||
|
this.imei = imei;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* unused
|
||
|
*/
|
||
|
public Builder androidId(Long androidId) {
|
||
|
this.androidId = androidId;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Gservices["android_id"] or 0
|
||
|
*/
|
||
|
public Builder digest(String digest) {
|
||
|
this.digest = digest;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Gservices["digest"] or ""
|
||
|
*/
|
||
|
public Builder checkin(Checkin checkin) {
|
||
|
this.checkin = checkin;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public Builder desiredBuild(String desiredBuild) {
|
||
|
this.desiredBuild = desiredBuild;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* unused
|
||
|
*/
|
||
|
public Builder locale(String locale) {
|
||
|
this.locale = locale;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Locale.toString
|
||
|
*/
|
||
|
public Builder loggingId(Long loggingId) {
|
||
|
this.loggingId = loggingId;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* GoogleSettingsContract.Partner["logging_id2"]
|
||
|
*/
|
||
|
public Builder marketCheckin(String marketCheckin) {
|
||
|
this.marketCheckin = marketCheckin;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* unused
|
||
|
*/
|
||
|
public Builder macAddress(List<String> macAddress) {
|
||
|
this.macAddress = checkForNulls(macAddress);
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* NetworkInfo.getExtraInfo, WifiInfo.getMacAddress (12 hex-digits)
|
||
|
*/
|
||
|
public Builder meid(String meid) {
|
||
|
this.meid = meid;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* TelephonyManager.getDeviceId (14 hex-digits)
|
||
|
*/
|
||
|
public Builder accountCookie(List<String> accountCookie) {
|
||
|
this.accountCookie = checkForNulls(accountCookie);
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* "[<email>]" followed by "<authToken>"
|
||
|
*/
|
||
|
public Builder timeZone(String timeZone) {
|
||
|
this.timeZone = timeZone;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* TimeZone.getId
|
||
|
*/
|
||
|
public Builder securityToken(Long securityToken) {
|
||
|
this.securityToken = securityToken;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public Builder version(Integer version) {
|
||
|
this.version = version;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 3 if securityToken != 0 OR androidId == 0
|
||
|
*/
|
||
|
public Builder otaCert(List<String> otaCert) {
|
||
|
this.otaCert = checkForNulls(otaCert);
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* SHA-1 of each in /system/etc/security/otacerts.zip or "--IOException--" or "--no-output--"
|
||
|
*/
|
||
|
public Builder serial(String serial) {
|
||
|
this.serial = serial;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Build.SERIAL != "unknown"
|
||
|
*/
|
||
|
public Builder esn(String esn) {
|
||
|
this.esn = esn;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* TelephonyManager.getDeviceId (8 hex-digits)
|
||
|
*/
|
||
|
public Builder deviceConfiguration(DeviceConfig deviceConfiguration) {
|
||
|
this.deviceConfiguration = deviceConfiguration;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public Builder macAddressType(List<String> macAddressType) {
|
||
|
this.macAddressType = checkForNulls(macAddressType);
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* "ethernet", "wifi"
|
||
|
*/
|
||
|
public Builder fragment(Integer fragment) {
|
||
|
this.fragment = fragment;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* unknown (use 0)
|
||
|
*/
|
||
|
public Builder userName(String userName) {
|
||
|
this.userName = userName;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* unused
|
||
|
*/
|
||
|
public Builder userSerialNumber(Integer userSerialNumber) {
|
||
|
this.userSerialNumber = userSerialNumber;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public CheckinRequest build() {
|
||
|
return new CheckinRequest(this);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static final class DeviceConfig extends Message {
|
||
|
|
||
|
public static final Integer DEFAULT_TOUCHSCREEN = 0;
|
||
|
public static final Integer DEFAULT_KEYBOARDTYPE = 0;
|
||
|
public static final Integer DEFAULT_NAVIGATION = 0;
|
||
|
public static final Integer DEFAULT_SCREENLAYOUT = 0;
|
||
|
public static final Boolean DEFAULT_HASHARDKEYBOARD = false;
|
||
|
public static final Boolean DEFAULT_HASFIVEWAYNAVIGATION = false;
|
||
|
public static final Integer DEFAULT_DENSITYDPI = 0;
|
||
|
public static final Integer DEFAULT_GLESVERSION = 0;
|
||
|
public static final List<String> DEFAULT_SHAREDLIBRARY = Collections.emptyList();
|
||
|
public static final List<String> DEFAULT_AVAILABLEFEATURE = Collections.emptyList();
|
||
|
public static final List<String> DEFAULT_NATIVEPLATFORM = Collections.emptyList();
|
||
|
public static final Integer DEFAULT_WIDTHPIXELS = 0;
|
||
|
public static final Integer DEFAULT_HEIGHTPIXELS = 0;
|
||
|
public static final List<String> DEFAULT_LOCALE = Collections.emptyList();
|
||
|
public static final List<String> DEFAULT_GLEXTENSION = Collections.emptyList();
|
||
|
public static final Integer DEFAULT_DEVICECLASS = 0;
|
||
|
public static final Integer DEFAULT_MAXAPKDOWNLOADSIZEMB = 0;
|
||
|
|
||
|
@ProtoField(tag = 1, type = INT32)
|
||
|
public final Integer touchScreen;
|
||
|
|
||
|
/**
|
||
|
* ConfigurationInfo.reqTouchScreen
|
||
|
*/
|
||
|
@ProtoField(tag = 2, type = INT32)
|
||
|
public final Integer keyboardType;
|
||
|
|
||
|
/**
|
||
|
* ConfigurationInfo.reqKeyboardType
|
||
|
*/
|
||
|
@ProtoField(tag = 3, type = INT32)
|
||
|
public final Integer navigation;
|
||
|
|
||
|
/**
|
||
|
* ConfigurationInfo.reqNavigation
|
||
|
*/
|
||
|
@ProtoField(tag = 4, type = INT32)
|
||
|
public final Integer screenLayout;
|
||
|
|
||
|
/**
|
||
|
* ConfigurationInfo.screenLayout
|
||
|
*/
|
||
|
@ProtoField(tag = 5, type = BOOL)
|
||
|
public final Boolean hasHardKeyboard;
|
||
|
|
||
|
/**
|
||
|
* ConfigurationInfo.reqInputFeatures & ConfigurationInfo.INPUT_FEATURE_HARD_KEYBOARD
|
||
|
*/
|
||
|
@ProtoField(tag = 6, type = BOOL)
|
||
|
public final Boolean hasFiveWayNavigation;
|
||
|
|
||
|
/**
|
||
|
* ConfigurationInfo.reqInputFeatures & ConfigurationInfo.INPUT_FEATURE_FIVE_WAY_NAV
|
||
|
*/
|
||
|
@ProtoField(tag = 7, type = INT32)
|
||
|
public final Integer densityDpi;
|
||
|
|
||
|
/**
|
||
|
* DisplayMetrics.densityDpi
|
||
|
*/
|
||
|
@ProtoField(tag = 8, type = INT32)
|
||
|
public final Integer glEsVersion;
|
||
|
|
||
|
/**
|
||
|
* ConfigurationInfo.reqGlEsVersion
|
||
|
*/
|
||
|
@ProtoField(tag = 9, type = STRING, label = REPEATED)
|
||
|
public final List<String> sharedLibrary;
|
||
|
|
||
|
/**
|
||
|
* PackageManager.getSystemSharedLibraryNames
|
||
|
*/
|
||
|
@ProtoField(tag = 10, type = STRING, label = REPEATED)
|
||
|
public final List<String> availableFeature;
|
||
|
|
||
|
/**
|
||
|
* PackageManager.getSystemAvailableFeatures
|
||
|
*/
|
||
|
@ProtoField(tag = 11, type = STRING, label = REPEATED)
|
||
|
public final List<String> nativePlatform;
|
||
|
|
||
|
/**
|
||
|
* Build.CPU_ABI (and Build.CPU_ABI2 != "unknown")
|
||
|
*/
|
||
|
@ProtoField(tag = 12, type = INT32)
|
||
|
public final Integer widthPixels;
|
||
|
|
||
|
/**
|
||
|
* DisplayMetrics.widthPixels
|
||
|
*/
|
||
|
@ProtoField(tag = 13, type = INT32)
|
||
|
public final Integer heightPixels;
|
||
|
|
||
|
/**
|
||
|
* DisplayMetrics.heightPixels
|
||
|
*/
|
||
|
@ProtoField(tag = 14, type = STRING, label = REPEATED)
|
||
|
public final List<String> locale;
|
||
|
|
||
|
/**
|
||
|
* Context.getAssets.getLocales
|
||
|
*/
|
||
|
@ProtoField(tag = 15, type = STRING, label = REPEATED)
|
||
|
public final List<String> glExtension;
|
||
|
|
||
|
/**
|
||
|
* GLES10.glGetString(GLES10.GL_EXTENSIONS)
|
||
|
*/
|
||
|
@ProtoField(tag = 16, type = INT32)
|
||
|
public final Integer deviceClass;
|
||
|
|
||
|
/**
|
||
|
* unused
|
||
|
*/
|
||
|
@ProtoField(tag = 17, type = INT32)
|
||
|
public final Integer maxApkDownloadSizeMb;
|
||
|
|
||
|
public DeviceConfig(Integer touchScreen, Integer keyboardType, Integer navigation, Integer screenLayout, Boolean hasHardKeyboard, Boolean hasFiveWayNavigation, Integer densityDpi, Integer glEsVersion, List<String> sharedLibrary, List<String> availableFeature, List<String> nativePlatform, Integer widthPixels, Integer heightPixels, List<String> locale, List<String> glExtension, Integer deviceClass, Integer maxApkDownloadSizeMb) {
|
||
|
this.touchScreen = touchScreen;
|
||
|
this.keyboardType = keyboardType;
|
||
|
this.navigation = navigation;
|
||
|
this.screenLayout = screenLayout;
|
||
|
this.hasHardKeyboard = hasHardKeyboard;
|
||
|
this.hasFiveWayNavigation = hasFiveWayNavigation;
|
||
|
this.densityDpi = densityDpi;
|
||
|
this.glEsVersion = glEsVersion;
|
||
|
this.sharedLibrary = immutableCopyOf(sharedLibrary);
|
||
|
this.availableFeature = immutableCopyOf(availableFeature);
|
||
|
this.nativePlatform = immutableCopyOf(nativePlatform);
|
||
|
this.widthPixels = widthPixels;
|
||
|
this.heightPixels = heightPixels;
|
||
|
this.locale = immutableCopyOf(locale);
|
||
|
this.glExtension = immutableCopyOf(glExtension);
|
||
|
this.deviceClass = deviceClass;
|
||
|
this.maxApkDownloadSizeMb = maxApkDownloadSizeMb;
|
||
|
}
|
||
|
|
||
|
private DeviceConfig(Builder builder) {
|
||
|
this(builder.touchScreen, builder.keyboardType, builder.navigation, builder.screenLayout, builder.hasHardKeyboard, builder.hasFiveWayNavigation, builder.densityDpi, builder.glEsVersion, builder.sharedLibrary, builder.availableFeature, builder.nativePlatform, builder.widthPixels, builder.heightPixels, builder.locale, builder.glExtension, builder.deviceClass, builder.maxApkDownloadSizeMb);
|
||
|
setBuilder(builder);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean equals(Object other) {
|
||
|
if (other == this) return true;
|
||
|
if (!(other instanceof DeviceConfig)) return false;
|
||
|
DeviceConfig o = (DeviceConfig) other;
|
||
|
return equals(touchScreen, o.touchScreen)
|
||
|
&& equals(keyboardType, o.keyboardType)
|
||
|
&& equals(navigation, o.navigation)
|
||
|
&& equals(screenLayout, o.screenLayout)
|
||
|
&& equals(hasHardKeyboard, o.hasHardKeyboard)
|
||
|
&& equals(hasFiveWayNavigation, o.hasFiveWayNavigation)
|
||
|
&& equals(densityDpi, o.densityDpi)
|
||
|
&& equals(glEsVersion, o.glEsVersion)
|
||
|
&& equals(sharedLibrary, o.sharedLibrary)
|
||
|
&& equals(availableFeature, o.availableFeature)
|
||
|
&& equals(nativePlatform, o.nativePlatform)
|
||
|
&& equals(widthPixels, o.widthPixels)
|
||
|
&& equals(heightPixels, o.heightPixels)
|
||
|
&& equals(locale, o.locale)
|
||
|
&& equals(glExtension, o.glExtension)
|
||
|
&& equals(deviceClass, o.deviceClass)
|
||
|
&& equals(maxApkDownloadSizeMb, o.maxApkDownloadSizeMb);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public int hashCode() {
|
||
|
int result = hashCode;
|
||
|
if (result == 0) {
|
||
|
result = touchScreen != null ? touchScreen.hashCode() : 0;
|
||
|
result = result * 37 + (keyboardType != null ? keyboardType.hashCode() : 0);
|
||
|
result = result * 37 + (navigation != null ? navigation.hashCode() : 0);
|
||
|
result = result * 37 + (screenLayout != null ? screenLayout.hashCode() : 0);
|
||
|
result = result * 37 + (hasHardKeyboard != null ? hasHardKeyboard.hashCode() : 0);
|
||
|
result = result * 37 + (hasFiveWayNavigation != null ? hasFiveWayNavigation.hashCode() : 0);
|
||
|
result = result * 37 + (densityDpi != null ? densityDpi.hashCode() : 0);
|
||
|
result = result * 37 + (glEsVersion != null ? glEsVersion.hashCode() : 0);
|
||
|
result = result * 37 + (sharedLibrary != null ? sharedLibrary.hashCode() : 1);
|
||
|
result = result * 37 + (availableFeature != null ? availableFeature.hashCode() : 1);
|
||
|
result = result * 37 + (nativePlatform != null ? nativePlatform.hashCode() : 1);
|
||
|
result = result * 37 + (widthPixels != null ? widthPixels.hashCode() : 0);
|
||
|
result = result * 37 + (heightPixels != null ? heightPixels.hashCode() : 0);
|
||
|
result = result * 37 + (locale != null ? locale.hashCode() : 1);
|
||
|
result = result * 37 + (glExtension != null ? glExtension.hashCode() : 1);
|
||
|
result = result * 37 + (deviceClass != null ? deviceClass.hashCode() : 0);
|
||
|
result = result * 37 + (maxApkDownloadSizeMb != null ? maxApkDownloadSizeMb.hashCode() : 0);
|
||
|
hashCode = result;
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
public static final class Builder extends Message.Builder<DeviceConfig> {
|
||
|
|
||
|
public Integer touchScreen;
|
||
|
public Integer keyboardType;
|
||
|
public Integer navigation;
|
||
|
public Integer screenLayout;
|
||
|
public Boolean hasHardKeyboard;
|
||
|
public Boolean hasFiveWayNavigation;
|
||
|
public Integer densityDpi;
|
||
|
public Integer glEsVersion;
|
||
|
public List<String> sharedLibrary;
|
||
|
public List<String> availableFeature;
|
||
|
public List<String> nativePlatform;
|
||
|
public Integer widthPixels;
|
||
|
public Integer heightPixels;
|
||
|
public List<String> locale;
|
||
|
public List<String> glExtension;
|
||
|
public Integer deviceClass;
|
||
|
public Integer maxApkDownloadSizeMb;
|
||
|
|
||
|
public Builder() {
|
||
|
}
|
||
|
|
||
|
public Builder(DeviceConfig message) {
|
||
|
super(message);
|
||
|
if (message == null) return;
|
||
|
this.touchScreen = message.touchScreen;
|
||
|
this.keyboardType = message.keyboardType;
|
||
|
this.navigation = message.navigation;
|
||
|
this.screenLayout = message.screenLayout;
|
||
|
this.hasHardKeyboard = message.hasHardKeyboard;
|
||
|
this.hasFiveWayNavigation = message.hasFiveWayNavigation;
|
||
|
this.densityDpi = message.densityDpi;
|
||
|
this.glEsVersion = message.glEsVersion;
|
||
|
this.sharedLibrary = copyOf(message.sharedLibrary);
|
||
|
this.availableFeature = copyOf(message.availableFeature);
|
||
|
this.nativePlatform = copyOf(message.nativePlatform);
|
||
|
this.widthPixels = message.widthPixels;
|
||
|
this.heightPixels = message.heightPixels;
|
||
|
this.locale = copyOf(message.locale);
|
||
|
this.glExtension = copyOf(message.glExtension);
|
||
|
this.deviceClass = message.deviceClass;
|
||
|
this.maxApkDownloadSizeMb = message.maxApkDownloadSizeMb;
|
||
|
}
|
||
|
|
||
|
public Builder touchScreen(Integer touchScreen) {
|
||
|
this.touchScreen = touchScreen;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* ConfigurationInfo.reqTouchScreen
|
||
|
*/
|
||
|
public Builder keyboardType(Integer keyboardType) {
|
||
|
this.keyboardType = keyboardType;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* ConfigurationInfo.reqKeyboardType
|
||
|
*/
|
||
|
public Builder navigation(Integer navigation) {
|
||
|
this.navigation = navigation;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* ConfigurationInfo.reqNavigation
|
||
|
*/
|
||
|
public Builder screenLayout(Integer screenLayout) {
|
||
|
this.screenLayout = screenLayout;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* ConfigurationInfo.screenLayout
|
||
|
*/
|
||
|
public Builder hasHardKeyboard(Boolean hasHardKeyboard) {
|
||
|
this.hasHardKeyboard = hasHardKeyboard;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* ConfigurationInfo.reqInputFeatures & ConfigurationInfo.INPUT_FEATURE_HARD_KEYBOARD
|
||
|
*/
|
||
|
public Builder hasFiveWayNavigation(Boolean hasFiveWayNavigation) {
|
||
|
this.hasFiveWayNavigation = hasFiveWayNavigation;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* ConfigurationInfo.reqInputFeatures & ConfigurationInfo.INPUT_FEATURE_FIVE_WAY_NAV
|
||
|
*/
|
||
|
public Builder densityDpi(Integer densityDpi) {
|
||
|
this.densityDpi = densityDpi;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* DisplayMetrics.densityDpi
|
||
|
*/
|
||
|
public Builder glEsVersion(Integer glEsVersion) {
|
||
|
this.glEsVersion = glEsVersion;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* ConfigurationInfo.reqGlEsVersion
|
||
|
*/
|
||
|
public Builder sharedLibrary(List<String> sharedLibrary) {
|
||
|
this.sharedLibrary = checkForNulls(sharedLibrary);
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* PackageManager.getSystemSharedLibraryNames
|
||
|
*/
|
||
|
public Builder availableFeature(List<String> availableFeature) {
|
||
|
this.availableFeature = checkForNulls(availableFeature);
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* PackageManager.getSystemAvailableFeatures
|
||
|
*/
|
||
|
public Builder nativePlatform(List<String> nativePlatform) {
|
||
|
this.nativePlatform = checkForNulls(nativePlatform);
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Build.CPU_ABI (and Build.CPU_ABI2 != "unknown")
|
||
|
*/
|
||
|
public Builder widthPixels(Integer widthPixels) {
|
||
|
this.widthPixels = widthPixels;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* DisplayMetrics.widthPixels
|
||
|
*/
|
||
|
public Builder heightPixels(Integer heightPixels) {
|
||
|
this.heightPixels = heightPixels;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* DisplayMetrics.heightPixels
|
||
|
*/
|
||
|
public Builder locale(List<String> locale) {
|
||
|
this.locale = checkForNulls(locale);
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Context.getAssets.getLocales
|
||
|
*/
|
||
|
public Builder glExtension(List<String> glExtension) {
|
||
|
this.glExtension = checkForNulls(glExtension);
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* GLES10.glGetString(GLES10.GL_EXTENSIONS)
|
||
|
*/
|
||
|
public Builder deviceClass(Integer deviceClass) {
|
||
|
this.deviceClass = deviceClass;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* unused
|
||
|
*/
|
||
|
public Builder maxApkDownloadSizeMb(Integer maxApkDownloadSizeMb) {
|
||
|
this.maxApkDownloadSizeMb = maxApkDownloadSizeMb;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public DeviceConfig build() {
|
||
|
return new DeviceConfig(this);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static final class Checkin extends Message {
|
||
|
|
||
|
public static final Long DEFAULT_LASTCHECKINMS = 0L;
|
||
|
public static final List<Checkin.Event> DEFAULT_EVENT = Collections.emptyList();
|
||
|
public static final List<Checkin.Statistic> DEFAULT_STAT = Collections.emptyList();
|
||
|
public static final List<String> DEFAULT_REQUESTEDGROUP = Collections.emptyList();
|
||
|
public static final String DEFAULT_CELLOPERATOR = "";
|
||
|
public static final String DEFAULT_SIMOPERATOR = "";
|
||
|
public static final String DEFAULT_ROAMING = "";
|
||
|
public static final Integer DEFAULT_USERNUMBER = 0;
|
||
|
|
||
|
@ProtoField(tag = 1)
|
||
|
public final Checkin.Build build;
|
||
|
|
||
|
@ProtoField(tag = 2, type = INT64)
|
||
|
public final Long lastCheckinMs;
|
||
|
|
||
|
/**
|
||
|
* or 0
|
||
|
*/
|
||
|
@ProtoField(tag = 3, label = REPEATED, messageType = Checkin.Event.class)
|
||
|
public final List<Checkin.Event> event;
|
||
|
|
||
|
@ProtoField(tag = 4, label = REPEATED, messageType = Checkin.Statistic.class)
|
||
|
public final List<Checkin.Statistic> stat;
|
||
|
|
||
|
@ProtoField(tag = 5, type = STRING, label = REPEATED)
|
||
|
public final List<String> requestedGroup;
|
||
|
|
||
|
/**
|
||
|
* unused
|
||
|
*/
|
||
|
@ProtoField(tag = 6, type = STRING)
|
||
|
public final String cellOperator;
|
||
|
|
||
|
/**
|
||
|
* TelephonyManager.getNetworkOperator != null|empty
|
||
|
*/
|
||
|
@ProtoField(tag = 7, type = STRING)
|
||
|
public final String simOperator;
|
||
|
|
||
|
/**
|
||
|
* TelephonyManager.getSimOperator != null|empty
|
||
|
*/
|
||
|
@ProtoField(tag = 8, type = STRING)
|
||
|
public final String roaming;
|
||
|
|
||
|
/**
|
||
|
* "mobile/notmobile/unknown-roaming/notroaming/unknown"
|
||
|
*/
|
||
|
@ProtoField(tag = 9, type = INT32)
|
||
|
public final Integer userNumber;
|
||
|
|
||
|
public Checkin(Checkin.Build build, Long lastCheckinMs, List<Checkin.Event> event, List<Checkin.Statistic> stat, List<String> requestedGroup, String cellOperator, String simOperator, String roaming, Integer userNumber) {
|
||
|
this.build = build;
|
||
|
this.lastCheckinMs = lastCheckinMs;
|
||
|
this.event = immutableCopyOf(event);
|
||
|
this.stat = immutableCopyOf(stat);
|
||
|
this.requestedGroup = immutableCopyOf(requestedGroup);
|
||
|
this.cellOperator = cellOperator;
|
||
|
this.simOperator = simOperator;
|
||
|
this.roaming = roaming;
|
||
|
this.userNumber = userNumber;
|
||
|
}
|
||
|
|
||
|
private Checkin(Builder builder) {
|
||
|
this(builder.build, builder.lastCheckinMs, builder.event, builder.stat, builder.requestedGroup, builder.cellOperator, builder.simOperator, builder.roaming, builder.userNumber);
|
||
|
setBuilder(builder);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean equals(Object other) {
|
||
|
if (other == this) return true;
|
||
|
if (!(other instanceof Checkin)) return false;
|
||
|
Checkin o = (Checkin) other;
|
||
|
return equals(build, o.build)
|
||
|
&& equals(lastCheckinMs, o.lastCheckinMs)
|
||
|
&& equals(event, o.event)
|
||
|
&& equals(stat, o.stat)
|
||
|
&& equals(requestedGroup, o.requestedGroup)
|
||
|
&& equals(cellOperator, o.cellOperator)
|
||
|
&& equals(simOperator, o.simOperator)
|
||
|
&& equals(roaming, o.roaming)
|
||
|
&& equals(userNumber, o.userNumber);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public int hashCode() {
|
||
|
int result = hashCode;
|
||
|
if (result == 0) {
|
||
|
result = build != null ? build.hashCode() : 0;
|
||
|
result = result * 37 + (lastCheckinMs != null ? lastCheckinMs.hashCode() : 0);
|
||
|
result = result * 37 + (event != null ? event.hashCode() : 1);
|
||
|
result = result * 37 + (stat != null ? stat.hashCode() : 1);
|
||
|
result = result * 37 + (requestedGroup != null ? requestedGroup.hashCode() : 1);
|
||
|
result = result * 37 + (cellOperator != null ? cellOperator.hashCode() : 0);
|
||
|
result = result * 37 + (simOperator != null ? simOperator.hashCode() : 0);
|
||
|
result = result * 37 + (roaming != null ? roaming.hashCode() : 0);
|
||
|
result = result * 37 + (userNumber != null ? userNumber.hashCode() : 0);
|
||
|
hashCode = result;
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
public static final class Builder extends Message.Builder<Checkin> {
|
||
|
|
||
|
public Checkin.Build build;
|
||
|
public Long lastCheckinMs;
|
||
|
public List<Checkin.Event> event;
|
||
|
public List<Checkin.Statistic> stat;
|
||
|
public List<String> requestedGroup;
|
||
|
public String cellOperator;
|
||
|
public String simOperator;
|
||
|
public String roaming;
|
||
|
public Integer userNumber;
|
||
|
|
||
|
public Builder() {
|
||
|
}
|
||
|
|
||
|
public Builder(Checkin message) {
|
||
|
super(message);
|
||
|
if (message == null) return;
|
||
|
this.build = message.build;
|
||
|
this.lastCheckinMs = message.lastCheckinMs;
|
||
|
this.event = copyOf(message.event);
|
||
|
this.stat = copyOf(message.stat);
|
||
|
this.requestedGroup = copyOf(message.requestedGroup);
|
||
|
this.cellOperator = message.cellOperator;
|
||
|
this.simOperator = message.simOperator;
|
||
|
this.roaming = message.roaming;
|
||
|
this.userNumber = message.userNumber;
|
||
|
}
|
||
|
|
||
|
public Builder build(Checkin.Build build) {
|
||
|
this.build = build;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public Builder lastCheckinMs(Long lastCheckinMs) {
|
||
|
this.lastCheckinMs = lastCheckinMs;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* or 0
|
||
|
*/
|
||
|
public Builder event(List<Checkin.Event> event) {
|
||
|
this.event = checkForNulls(event);
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public Builder stat(List<Checkin.Statistic> stat) {
|
||
|
this.stat = checkForNulls(stat);
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public Builder requestedGroup(List<String> requestedGroup) {
|
||
|
this.requestedGroup = checkForNulls(requestedGroup);
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* unused
|
||
|
*/
|
||
|
public Builder cellOperator(String cellOperator) {
|
||
|
this.cellOperator = cellOperator;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* TelephonyManager.getNetworkOperator != null|empty
|
||
|
*/
|
||
|
public Builder simOperator(String simOperator) {
|
||
|
this.simOperator = simOperator;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* TelephonyManager.getSimOperator != null|empty
|
||
|
*/
|
||
|
public Builder roaming(String roaming) {
|
||
|
this.roaming = roaming;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* "mobile/notmobile/unknown-roaming/notroaming/unknown"
|
||
|
*/
|
||
|
public Builder userNumber(Integer userNumber) {
|
||
|
this.userNumber = userNumber;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public Checkin build() {
|
||
|
return new Checkin(this);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static final class Event extends Message {
|
||
|
|
||
|
public static final String DEFAULT_TAG = "";
|
||
|
public static final String DEFAULT_VALUE = "";
|
||
|
public static final Long DEFAULT_TIMEMS = 0L;
|
||
|
|
||
|
@ProtoField(tag = 1, type = STRING)
|
||
|
public final String tag;
|
||
|
|
||
|
@ProtoField(tag = 2, type = STRING)
|
||
|
public final String value;
|
||
|
|
||
|
@ProtoField(tag = 3, type = INT64)
|
||
|
public final Long timeMs;
|
||
|
|
||
|
public Event(String tag, String value, Long timeMs) {
|
||
|
this.tag = tag;
|
||
|
this.value = value;
|
||
|
this.timeMs = timeMs;
|
||
|
}
|
||
|
|
||
|
private Event(Builder builder) {
|
||
|
this(builder.tag, builder.value, builder.timeMs);
|
||
|
setBuilder(builder);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean equals(Object other) {
|
||
|
if (other == this) return true;
|
||
|
if (!(other instanceof Event)) return false;
|
||
|
Event o = (Event) other;
|
||
|
return equals(tag, o.tag)
|
||
|
&& equals(value, o.value)
|
||
|
&& equals(timeMs, o.timeMs);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public int hashCode() {
|
||
|
int result = hashCode;
|
||
|
if (result == 0) {
|
||
|
result = tag != null ? tag.hashCode() : 0;
|
||
|
result = result * 37 + (value != null ? value.hashCode() : 0);
|
||
|
result = result * 37 + (timeMs != null ? timeMs.hashCode() : 0);
|
||
|
hashCode = result;
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
public static final class Builder extends Message.Builder<Event> {
|
||
|
|
||
|
public String tag;
|
||
|
public String value;
|
||
|
public Long timeMs;
|
||
|
|
||
|
public Builder() {
|
||
|
}
|
||
|
|
||
|
public Builder(Event message) {
|
||
|
super(message);
|
||
|
if (message == null) return;
|
||
|
this.tag = message.tag;
|
||
|
this.value = message.value;
|
||
|
this.timeMs = message.timeMs;
|
||
|
}
|
||
|
|
||
|
public Builder tag(String tag) {
|
||
|
this.tag = tag;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public Builder value(String value) {
|
||
|
this.value = value;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public Builder timeMs(Long timeMs) {
|
||
|
this.timeMs = timeMs;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public Event build() {
|
||
|
return new Event(this);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static final class Statistic extends Message {
|
||
|
|
||
|
public static final String DEFAULT_TAG = "";
|
||
|
public static final Integer DEFAULT_COUNT = 0;
|
||
|
public static final Float DEFAULT_SUM = 0F;
|
||
|
|
||
|
@ProtoField(tag = 1, type = STRING)
|
||
|
public final String tag;
|
||
|
|
||
|
@ProtoField(tag = 2, type = INT32)
|
||
|
public final Integer count;
|
||
|
|
||
|
@ProtoField(tag = 3, type = FLOAT)
|
||
|
public final Float sum;
|
||
|
|
||
|
public Statistic(String tag, Integer count, Float sum) {
|
||
|
this.tag = tag;
|
||
|
this.count = count;
|
||
|
this.sum = sum;
|
||
|
}
|
||
|
|
||
|
private Statistic(Builder builder) {
|
||
|
this(builder.tag, builder.count, builder.sum);
|
||
|
setBuilder(builder);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean equals(Object other) {
|
||
|
if (other == this) return true;
|
||
|
if (!(other instanceof Statistic)) return false;
|
||
|
Statistic o = (Statistic) other;
|
||
|
return equals(tag, o.tag)
|
||
|
&& equals(count, o.count)
|
||
|
&& equals(sum, o.sum);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public int hashCode() {
|
||
|
int result = hashCode;
|
||
|
if (result == 0) {
|
||
|
result = tag != null ? tag.hashCode() : 0;
|
||
|
result = result * 37 + (count != null ? count.hashCode() : 0);
|
||
|
result = result * 37 + (sum != null ? sum.hashCode() : 0);
|
||
|
hashCode = result;
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
public static final class Builder extends Message.Builder<Statistic> {
|
||
|
|
||
|
public String tag;
|
||
|
public Integer count;
|
||
|
public Float sum;
|
||
|
|
||
|
public Builder() {
|
||
|
}
|
||
|
|
||
|
public Builder(Statistic message) {
|
||
|
super(message);
|
||
|
if (message == null) return;
|
||
|
this.tag = message.tag;
|
||
|
this.count = message.count;
|
||
|
this.sum = message.sum;
|
||
|
}
|
||
|
|
||
|
public Builder tag(String tag) {
|
||
|
this.tag = tag;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public Builder count(Integer count) {
|
||
|
this.count = count;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
public Builder sum(Float sum) {
|
||
|
this.sum = sum;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public Statistic build() {
|
||
|
return new Statistic(this);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static final class Build extends Message {
|
||
|
|
||
|
public static final String DEFAULT_FINGERPRINT = "";
|
||
|
public static final String DEFAULT_HARDWARE = "";
|
||
|
public static final String DEFAULT_BRAND = "";
|
||
|
public static final String DEFAULT_RADIO = "";
|
||
|
public static final String DEFAULT_BOOTLOADER = "";
|
||
|
public static final String DEFAULT_CLIENTID = "";
|
||
|
public static final Long DEFAULT_TIME = 0L;
|
||
|
public static final Integer DEFAULT_PACKAGEVERSIONCODE = 0;
|
||
|
public static final String DEFAULT_DEVICE = "";
|
||
|
public static final Integer DEFAULT_SDKVERSION = 0;
|
||
|
public static final String DEFAULT_MODEL = "";
|
||
|
public static final String DEFAULT_MANUFACTURER = "";
|
||
|
public static final String DEFAULT_PRODUCT = "";
|
||
|
public static final Boolean DEFAULT_OTAINSTALLED = false;
|
||
|
|
||
|
@ProtoField(tag = 1, type = STRING)
|
||
|
public final String fingerprint;
|
||
|
|
||
|
/**
|
||
|
* Build.FINGERPRINT
|
||
|
*/
|
||
|
@ProtoField(tag = 2, type = STRING)
|
||
|
public final String hardware;
|
||
|
|
||
|
/**
|
||
|
* Build.HARDWARE
|
||
|
*/
|
||
|
@ProtoField(tag = 3, type = STRING)
|
||
|
public final String brand;
|
||
|
|
||
|
/**
|
||
|
* Build.BRAND
|
||
|
*/
|
||
|
@ProtoField(tag = 4, type = STRING)
|
||
|
public final String radio;
|
||
|
|
||
|
/**
|
||
|
* Build.getRadioVersion()
|
||
|
*/
|
||
|
@ProtoField(tag = 5, type = STRING)
|
||
|
public final String bootloader;
|
||
|
|
||
|
/**
|
||
|
* Build.BOOTLOADER
|
||
|
*/
|
||
|
@ProtoField(tag = 6, type = STRING)
|
||
|
public final String clientId;
|
||
|
|
||
|
/**
|
||
|
* GoogleSettingsContract.Partner["client_id"]
|
||
|
*/
|
||
|
@ProtoField(tag = 7, type = INT64)
|
||
|
public final Long time;
|
||
|
|
||
|
/**
|
||
|
* Build.TIME / 1000L
|
||
|
*/
|
||
|
@ProtoField(tag = 8, type = INT32)
|
||
|
public final Integer packageVersionCode;
|
||
|
|
||
|
/**
|
||
|
* PackageInfo.versionCode
|
||
|
*/
|
||
|
@ProtoField(tag = 9, type = STRING)
|
||
|
public final String device;
|
||
|
|
||
|
/**
|
||
|
* Build.DEVICE
|
||
|
*/
|
||
|
@ProtoField(tag = 10, type = INT32)
|
||
|
public final Integer sdkVersion;
|
||
|
|
||
|
/**
|
||
|
* Build.VERSION.SDK_INT
|
||
|
*/
|
||
|
@ProtoField(tag = 11, type = STRING)
|
||
|
public final String model;
|
||
|
|
||
|
/**
|
||
|
* Build.MODEL
|
||
|
*/
|
||
|
@ProtoField(tag = 12, type = STRING)
|
||
|
public final String manufacturer;
|
||
|
|
||
|
/**
|
||
|
* Build.MANUFACTURER
|
||
|
*/
|
||
|
@ProtoField(tag = 13, type = STRING)
|
||
|
public final String product;
|
||
|
|
||
|
/**
|
||
|
* Build.PRODUCT
|
||
|
*/
|
||
|
@ProtoField(tag = 14, type = BOOL)
|
||
|
public final Boolean otaInstalled;
|
||
|
|
||
|
public Build(String fingerprint, String hardware, String brand, String radio, String bootloader, String clientId, Long time, Integer packageVersionCode, String device, Integer sdkVersion, String model, String manufacturer, String product, Boolean otaInstalled) {
|
||
|
this.fingerprint = fingerprint;
|
||
|
this.hardware = hardware;
|
||
|
this.brand = brand;
|
||
|
this.radio = radio;
|
||
|
this.bootloader = bootloader;
|
||
|
this.clientId = clientId;
|
||
|
this.time = time;
|
||
|
this.packageVersionCode = packageVersionCode;
|
||
|
this.device = device;
|
||
|
this.sdkVersion = sdkVersion;
|
||
|
this.model = model;
|
||
|
this.manufacturer = manufacturer;
|
||
|
this.product = product;
|
||
|
this.otaInstalled = otaInstalled;
|
||
|
}
|
||
|
|
||
|
private Build(Builder builder) {
|
||
|
this(builder.fingerprint, builder.hardware, builder.brand, builder.radio, builder.bootloader, builder.clientId, builder.time, builder.packageVersionCode, builder.device, builder.sdkVersion, builder.model, builder.manufacturer, builder.product, builder.otaInstalled);
|
||
|
setBuilder(builder);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean equals(Object other) {
|
||
|
if (other == this) return true;
|
||
|
if (!(other instanceof Build)) return false;
|
||
|
Build o = (Build) other;
|
||
|
return equals(fingerprint, o.fingerprint)
|
||
|
&& equals(hardware, o.hardware)
|
||
|
&& equals(brand, o.brand)
|
||
|
&& equals(radio, o.radio)
|
||
|
&& equals(bootloader, o.bootloader)
|
||
|
&& equals(clientId, o.clientId)
|
||
|
&& equals(time, o.time)
|
||
|
&& equals(packageVersionCode, o.packageVersionCode)
|
||
|
&& equals(device, o.device)
|
||
|
&& equals(sdkVersion, o.sdkVersion)
|
||
|
&& equals(model, o.model)
|
||
|
&& equals(manufacturer, o.manufacturer)
|
||
|
&& equals(product, o.product)
|
||
|
&& equals(otaInstalled, o.otaInstalled);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public int hashCode() {
|
||
|
int result = hashCode;
|
||
|
if (result == 0) {
|
||
|
result = fingerprint != null ? fingerprint.hashCode() : 0;
|
||
|
result = result * 37 + (hardware != null ? hardware.hashCode() : 0);
|
||
|
result = result * 37 + (brand != null ? brand.hashCode() : 0);
|
||
|
result = result * 37 + (radio != null ? radio.hashCode() : 0);
|
||
|
result = result * 37 + (bootloader != null ? bootloader.hashCode() : 0);
|
||
|
result = result * 37 + (clientId != null ? clientId.hashCode() : 0);
|
||
|
result = result * 37 + (time != null ? time.hashCode() : 0);
|
||
|
result = result * 37 + (packageVersionCode != null ? packageVersionCode.hashCode() : 0);
|
||
|
result = result * 37 + (device != null ? device.hashCode() : 0);
|
||
|
result = result * 37 + (sdkVersion != null ? sdkVersion.hashCode() : 0);
|
||
|
result = result * 37 + (model != null ? model.hashCode() : 0);
|
||
|
result = result * 37 + (manufacturer != null ? manufacturer.hashCode() : 0);
|
||
|
result = result * 37 + (product != null ? product.hashCode() : 0);
|
||
|
result = result * 37 + (otaInstalled != null ? otaInstalled.hashCode() : 0);
|
||
|
hashCode = result;
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
public static final class Builder extends Message.Builder<Build> {
|
||
|
|
||
|
public String fingerprint;
|
||
|
public String hardware;
|
||
|
public String brand;
|
||
|
public String radio;
|
||
|
public String bootloader;
|
||
|
public String clientId;
|
||
|
public Long time;
|
||
|
public Integer packageVersionCode;
|
||
|
public String device;
|
||
|
public Integer sdkVersion;
|
||
|
public String model;
|
||
|
public String manufacturer;
|
||
|
public String product;
|
||
|
public Boolean otaInstalled;
|
||
|
|
||
|
public Builder() {
|
||
|
}
|
||
|
|
||
|
public Builder(Build message) {
|
||
|
super(message);
|
||
|
if (message == null) return;
|
||
|
this.fingerprint = message.fingerprint;
|
||
|
this.hardware = message.hardware;
|
||
|
this.brand = message.brand;
|
||
|
this.radio = message.radio;
|
||
|
this.bootloader = message.bootloader;
|
||
|
this.clientId = message.clientId;
|
||
|
this.time = message.time;
|
||
|
this.packageVersionCode = message.packageVersionCode;
|
||
|
this.device = message.device;
|
||
|
this.sdkVersion = message.sdkVersion;
|
||
|
this.model = message.model;
|
||
|
this.manufacturer = message.manufacturer;
|
||
|
this.product = message.product;
|
||
|
this.otaInstalled = message.otaInstalled;
|
||
|
}
|
||
|
|
||
|
public Builder fingerprint(String fingerprint) {
|
||
|
this.fingerprint = fingerprint;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Build.FINGERPRINT
|
||
|
*/
|
||
|
public Builder hardware(String hardware) {
|
||
|
this.hardware = hardware;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Build.HARDWARE
|
||
|
*/
|
||
|
public Builder brand(String brand) {
|
||
|
this.brand = brand;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Build.BRAND
|
||
|
*/
|
||
|
public Builder radio(String radio) {
|
||
|
this.radio = radio;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Build.getRadioVersion()
|
||
|
*/
|
||
|
public Builder bootloader(String bootloader) {
|
||
|
this.bootloader = bootloader;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Build.BOOTLOADER
|
||
|
*/
|
||
|
public Builder clientId(String clientId) {
|
||
|
this.clientId = clientId;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* GoogleSettingsContract.Partner["client_id"]
|
||
|
*/
|
||
|
public Builder time(Long time) {
|
||
|
this.time = time;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Build.TIME / 1000L
|
||
|
*/
|
||
|
public Builder packageVersionCode(Integer packageVersionCode) {
|
||
|
this.packageVersionCode = packageVersionCode;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* PackageInfo.versionCode
|
||
|
*/
|
||
|
public Builder device(String device) {
|
||
|
this.device = device;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Build.DEVICE
|
||
|
*/
|
||
|
public Builder sdkVersion(Integer sdkVersion) {
|
||
|
this.sdkVersion = sdkVersion;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Build.VERSION.SDK_INT
|
||
|
*/
|
||
|
public Builder model(String model) {
|
||
|
this.model = model;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Build.MODEL
|
||
|
*/
|
||
|
public Builder manufacturer(String manufacturer) {
|
||
|
this.manufacturer = manufacturer;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Build.MANUFACTURER
|
||
|
*/
|
||
|
public Builder product(String product) {
|
||
|
this.product = product;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Build.PRODUCT
|
||
|
*/
|
||
|
public Builder otaInstalled(Boolean otaInstalled) {
|
||
|
this.otaInstalled = otaInstalled;
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public Build build() {
|
||
|
return new Build(this);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|