commonMain.com.google.security.cryptauth.lib.securegcm.GcmDeviceInfo.kt Maven / Gradle / Ivy
// Code generated by Wire protocol buffer compiler, do not edit.
// Source: securegcm.GcmDeviceInfo in securegcm.proto
package com.google.security.cryptauth.lib.securegcm
import com.squareup.wire.FieldEncoding
import com.squareup.wire.Message
import com.squareup.wire.ProtoAdapter
import com.squareup.wire.ProtoReader
import com.squareup.wire.ProtoWriter
import com.squareup.wire.ReverseProtoWriter
import com.squareup.wire.Syntax.PROTO_2
import com.squareup.wire.WireField
import com.squareup.wire.`internal`.immutableCopyOf
import com.squareup.wire.`internal`.missingRequiredFields
import com.squareup.wire.`internal`.sanitize
import kotlin.Any
import kotlin.AssertionError
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.DeprecationLevel
import kotlin.Int
import kotlin.Long
import kotlin.Nothing
import kotlin.String
import kotlin.Unit
import kotlin.collections.List
import okio.ByteString
/**
* Message used only during enrollment
* Field numbers should be kept in sync with DeviceInfo in:
* java/com/google/security/cryptauth/backend/services/common/common.proto
*/
public class GcmDeviceInfo(
/**
* This field's name does not match the one in DeviceInfo for legacy reasons.
* Consider using long_device_id and device_type instead when enrolling
* non-android devices.
*/
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#FIXED64",
schemaIndex = 0,
)
public val android_device_id: Long? = null,
/**
* Used for device_address of DeviceInfo field 2, but for GCM capable devices.
*/
@field:WireField(
tag = 102,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
schemaIndex = 1,
)
public val gcm_registration_id: ByteString? = null,
/**
* Used for device_address of DeviceInfo field 2, but for iOS devices.
*/
@field:WireField(
tag = 202,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
schemaIndex = 2,
)
public val apn_registration_id: ByteString? = null,
/**
* Does the user have notifications enabled for the given device address.
*/
@field:WireField(
tag = 203,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
schemaIndex = 3,
)
public val notification_enabled: Boolean? = null,
/**
* Used for device_address of DeviceInfo field 2, a Bluetooth Mac address for
* the device (e.g., to be used with EasyUnlock)
*/
@field:WireField(
tag = 302,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
schemaIndex = 4,
)
public val bluetooth_mac_address: String? = null,
/**
* SHA-256 hash of the device master key (from the key exchange).
* Differs from DeviceInfo field 3, which contains the actual master key.
*/
@field:WireField(
tag = 103,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
schemaIndex = 5,
)
public val device_master_key_hash: ByteString? = null,
/**
* A SecureMessage.EcP256PublicKey
*/
@field:WireField(
tag = 4,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
label = WireField.Label.REQUIRED,
schemaIndex = 6,
)
public val user_public_key: ByteString,
/**
* device's model name
* (e.g., an android.os.Build.MODEL or UIDevice.model)
*/
@field:WireField(
tag = 7,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
schemaIndex = 7,
)
public val device_model: String? = null,
/**
* device's locale
*/
@field:WireField(
tag = 8,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
schemaIndex = 8,
)
public val locale: String? = null,
/**
* The handle for user_public_key (and implicitly, a master key)
*/
@field:WireField(
tag = 9,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
schemaIndex = 9,
)
public val key_handle: ByteString? = null,
/**
* The initial counter value for the device, sent by the device
*/
@field:WireField(
tag = 12,
adapter = "com.squareup.wire.ProtoAdapter#INT64",
schemaIndex = 10,
)
public val counter: Long? = null,
/**
* The Operating System version on the device
* (e.g., an android.os.Build.DISPLAY or UIDevice.systemVersion)
*/
@field:WireField(
tag = 13,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
schemaIndex = 11,
)
public val device_os_version: String? = null,
/**
* The Operating System version number on the device
* (e.g., an android.os.Build.VERSION.SDK_INT)
*/
@field:WireField(
tag = 14,
adapter = "com.squareup.wire.ProtoAdapter#INT64",
schemaIndex = 12,
)
public val device_os_version_code: Long? = null,
/**
* The Operating System release on the device
* (e.g., an android.os.Build.VERSION.RELEASE)
*/
@field:WireField(
tag = 15,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
schemaIndex = 13,
)
public val device_os_release: String? = null,
/**
* The Operating System codename on the device
* (e.g., an android.os.Build.VERSION.CODENAME or UIDevice.systemName)
*/
@field:WireField(
tag = 16,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
schemaIndex = 14,
)
public val device_os_codename: String? = null,
/**
* The software version running on the device
* (e.g., Authenticator app version string)
*/
@field:WireField(
tag = 17,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
schemaIndex = 15,
)
public val device_software_version: String? = null,
/**
* The software version number running on the device
* (e.g., Authenticator app version code)
*/
@field:WireField(
tag = 18,
adapter = "com.squareup.wire.ProtoAdapter#INT64",
schemaIndex = 16,
)
public val device_software_version_code: Long? = null,
/**
* Software package information if applicable
* (e.g., com.google.android.apps.authenticator2)
*/
@field:WireField(
tag = 19,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
schemaIndex = 17,
)
public val device_software_package: String? = null,
/**
* Size of the display in thousandths of an inch (e.g., 7000 mils = 7 in)
*/
@field:WireField(
tag = 22,
adapter = "com.squareup.wire.ProtoAdapter#INT32",
schemaIndex = 18,
)
public val device_display_diagonal_mils: Int? = null,
/**
* For Authzen capable devices, their Authzen protocol version
*/
@field:WireField(
tag = 24,
adapter = "com.squareup.wire.ProtoAdapter#INT32",
schemaIndex = 19,
)
public val device_authzen_version: Int? = null,
/**
* Not all devices have device identifiers that fit in 64 bits.
*/
@field:WireField(
tag = 29,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
schemaIndex = 20,
)
public val long_device_id: ByteString? = null,
/**
* The device manufacturer name
* (e.g., android.os.Build.MANUFACTURER)
*/
@field:WireField(
tag = 31,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
schemaIndex = 21,
)
public val device_manufacturer: String? = null,
/**
* Used to indicate which type of device this is.
*/
@field:WireField(
tag = 32,
adapter = "com.google.security.cryptauth.lib.securegcm.DeviceType#ADAPTER",
schemaIndex = 22,
)
public val device_type: DeviceType? = null,
/**
* Fields corresponding to screenlock type/features and hardware features
* should be numbered in the 400 range.
* Is this device using a secure screenlock (e.g., pattern or pin unlock)
*/
@field:WireField(
tag = 400,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
schemaIndex = 23,
)
public val using_secure_screenlock: Boolean? = null,
/**
* Is auto-unlocking the screenlock (e.g., when at "home") supported?
*/
@field:WireField(
tag = 401,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
schemaIndex = 24,
)
public val auto_unlock_screenlock_supported: Boolean? = null,
/**
* Is auto-unlocking the screenlock (e.g., when at "home") enabled?
*/
@field:WireField(
tag = 402,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
schemaIndex = 25,
)
public val auto_unlock_screenlock_enabled: Boolean? = null,
/**
* Does the device have a Bluetooth (classic) radio?
*/
@field:WireField(
tag = 403,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
schemaIndex = 26,
)
public val bluetooth_radio_supported: Boolean? = null,
/**
* Is the Bluetooth (classic) radio on?
*/
@field:WireField(
tag = 404,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
schemaIndex = 27,
)
public val bluetooth_radio_enabled: Boolean? = null,
/**
* Does the device hardware support a mobile data connection?
*/
@field:WireField(
tag = 405,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
schemaIndex = 28,
)
public val mobile_data_supported: Boolean? = null,
/**
* Does the device support tethering?
*/
@field:WireField(
tag = 406,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
schemaIndex = 29,
)
public val tethering_supported: Boolean? = null,
/**
* Does the device have a BLE radio?
*/
@field:WireField(
tag = 407,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
schemaIndex = 30,
)
public val ble_radio_supported: Boolean? = null,
/**
* Is the device a "Pixel Experience" Android device?
*/
@field:WireField(
tag = 408,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
schemaIndex = 31,
)
public val pixel_experience: Boolean? = null,
/**
* Is the device running in the ARC++ container on a chromebook?
*/
@field:WireField(
tag = 409,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
schemaIndex = 32,
)
public val arc_plus_plus: Boolean? = null,
/**
* Is the value set in |using_secure_screenlock| reliable? On some Android
* devices, the platform API to get the screenlock state is not trustworthy.
* See b/32212161.
*/
@field:WireField(
tag = 410,
adapter = "com.squareup.wire.ProtoAdapter#BOOL",
schemaIndex = 33,
)
public val is_screenlock_state_flaky: Boolean? = null,
supported_software_features: List = emptyList(),
enabled_software_features: List = emptyList(),
/**
* The enrollment session id this is sent with
*/
@field:WireField(
tag = 1000,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
schemaIndex = 36,
)
public val enrollment_session_id: ByteString? = null,
/**
* A copy of the user's OAuth token
*/
@field:WireField(
tag = 1001,
adapter = "com.squareup.wire.ProtoAdapter#STRING",
schemaIndex = 37,
)
public val oauth_token: String? = null,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
/**
* A list of multi-device software features supported by the device.
*/
@field:WireField(
tag = 411,
adapter = "com.google.security.cryptauth.lib.securegcm.SoftwareFeature#ADAPTER",
label = WireField.Label.REPEATED,
schemaIndex = 34,
)
public val supported_software_features: List =
immutableCopyOf("supported_software_features", supported_software_features)
/**
* A list of multi-device software features currently enabled (active) on the
* device.
*/
@field:WireField(
tag = 412,
adapter = "com.google.security.cryptauth.lib.securegcm.SoftwareFeature#ADAPTER",
label = WireField.Label.REPEATED,
schemaIndex = 35,
)
public val enabled_software_features: List =
immutableCopyOf("enabled_software_features", enabled_software_features)
@Deprecated(
message = "Shouldn't be used in Kotlin",
level = DeprecationLevel.HIDDEN,
)
public override fun newBuilder(): Nothing = throw
AssertionError("Builders are deprecated and only available in a javaInterop build; see https://square.github.io/wire/wire_compiler/#kotlin")
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is GcmDeviceInfo) return false
if (unknownFields != other.unknownFields) return false
if (android_device_id != other.android_device_id) return false
if (gcm_registration_id != other.gcm_registration_id) return false
if (apn_registration_id != other.apn_registration_id) return false
if (notification_enabled != other.notification_enabled) return false
if (bluetooth_mac_address != other.bluetooth_mac_address) return false
if (device_master_key_hash != other.device_master_key_hash) return false
if (user_public_key != other.user_public_key) return false
if (device_model != other.device_model) return false
if (locale != other.locale) return false
if (key_handle != other.key_handle) return false
if (counter != other.counter) return false
if (device_os_version != other.device_os_version) return false
if (device_os_version_code != other.device_os_version_code) return false
if (device_os_release != other.device_os_release) return false
if (device_os_codename != other.device_os_codename) return false
if (device_software_version != other.device_software_version) return false
if (device_software_version_code != other.device_software_version_code) return false
if (device_software_package != other.device_software_package) return false
if (device_display_diagonal_mils != other.device_display_diagonal_mils) return false
if (device_authzen_version != other.device_authzen_version) return false
if (long_device_id != other.long_device_id) return false
if (device_manufacturer != other.device_manufacturer) return false
if (device_type != other.device_type) return false
if (using_secure_screenlock != other.using_secure_screenlock) return false
if (auto_unlock_screenlock_supported != other.auto_unlock_screenlock_supported) return false
if (auto_unlock_screenlock_enabled != other.auto_unlock_screenlock_enabled) return false
if (bluetooth_radio_supported != other.bluetooth_radio_supported) return false
if (bluetooth_radio_enabled != other.bluetooth_radio_enabled) return false
if (mobile_data_supported != other.mobile_data_supported) return false
if (tethering_supported != other.tethering_supported) return false
if (ble_radio_supported != other.ble_radio_supported) return false
if (pixel_experience != other.pixel_experience) return false
if (arc_plus_plus != other.arc_plus_plus) return false
if (is_screenlock_state_flaky != other.is_screenlock_state_flaky) return false
if (supported_software_features != other.supported_software_features) return false
if (enabled_software_features != other.enabled_software_features) return false
if (enrollment_session_id != other.enrollment_session_id) return false
if (oauth_token != other.oauth_token) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + (android_device_id?.hashCode() ?: 0)
result = result * 37 + (gcm_registration_id?.hashCode() ?: 0)
result = result * 37 + (apn_registration_id?.hashCode() ?: 0)
result = result * 37 + (notification_enabled?.hashCode() ?: 0)
result = result * 37 + (bluetooth_mac_address?.hashCode() ?: 0)
result = result * 37 + (device_master_key_hash?.hashCode() ?: 0)
result = result * 37 + user_public_key.hashCode()
result = result * 37 + (device_model?.hashCode() ?: 0)
result = result * 37 + (locale?.hashCode() ?: 0)
result = result * 37 + (key_handle?.hashCode() ?: 0)
result = result * 37 + (counter?.hashCode() ?: 0)
result = result * 37 + (device_os_version?.hashCode() ?: 0)
result = result * 37 + (device_os_version_code?.hashCode() ?: 0)
result = result * 37 + (device_os_release?.hashCode() ?: 0)
result = result * 37 + (device_os_codename?.hashCode() ?: 0)
result = result * 37 + (device_software_version?.hashCode() ?: 0)
result = result * 37 + (device_software_version_code?.hashCode() ?: 0)
result = result * 37 + (device_software_package?.hashCode() ?: 0)
result = result * 37 + (device_display_diagonal_mils?.hashCode() ?: 0)
result = result * 37 + (device_authzen_version?.hashCode() ?: 0)
result = result * 37 + (long_device_id?.hashCode() ?: 0)
result = result * 37 + (device_manufacturer?.hashCode() ?: 0)
result = result * 37 + (device_type?.hashCode() ?: 0)
result = result * 37 + (using_secure_screenlock?.hashCode() ?: 0)
result = result * 37 + (auto_unlock_screenlock_supported?.hashCode() ?: 0)
result = result * 37 + (auto_unlock_screenlock_enabled?.hashCode() ?: 0)
result = result * 37 + (bluetooth_radio_supported?.hashCode() ?: 0)
result = result * 37 + (bluetooth_radio_enabled?.hashCode() ?: 0)
result = result * 37 + (mobile_data_supported?.hashCode() ?: 0)
result = result * 37 + (tethering_supported?.hashCode() ?: 0)
result = result * 37 + (ble_radio_supported?.hashCode() ?: 0)
result = result * 37 + (pixel_experience?.hashCode() ?: 0)
result = result * 37 + (arc_plus_plus?.hashCode() ?: 0)
result = result * 37 + (is_screenlock_state_flaky?.hashCode() ?: 0)
result = result * 37 + supported_software_features.hashCode()
result = result * 37 + enabled_software_features.hashCode()
result = result * 37 + (enrollment_session_id?.hashCode() ?: 0)
result = result * 37 + (oauth_token?.hashCode() ?: 0)
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
if (android_device_id != null) result += """android_device_id=$android_device_id"""
if (gcm_registration_id != null) result += """gcm_registration_id=$gcm_registration_id"""
if (apn_registration_id != null) result += """apn_registration_id=$apn_registration_id"""
if (notification_enabled != null) result += """notification_enabled=$notification_enabled"""
if (bluetooth_mac_address != null) result +=
"""bluetooth_mac_address=${sanitize(bluetooth_mac_address)}"""
if (device_master_key_hash != null) result +=
"""device_master_key_hash=$device_master_key_hash"""
result += """user_public_key=$user_public_key"""
if (device_model != null) result += """device_model=${sanitize(device_model)}"""
if (locale != null) result += """locale=${sanitize(locale)}"""
if (key_handle != null) result += """key_handle=$key_handle"""
if (counter != null) result += """counter=$counter"""
if (device_os_version != null) result += """device_os_version=${sanitize(device_os_version)}"""
if (device_os_version_code != null) result +=
"""device_os_version_code=$device_os_version_code"""
if (device_os_release != null) result += """device_os_release=${sanitize(device_os_release)}"""
if (device_os_codename != null) result +=
"""device_os_codename=${sanitize(device_os_codename)}"""
if (device_software_version != null) result +=
"""device_software_version=${sanitize(device_software_version)}"""
if (device_software_version_code != null) result +=
"""device_software_version_code=$device_software_version_code"""
if (device_software_package != null) result +=
"""device_software_package=${sanitize(device_software_package)}"""
if (device_display_diagonal_mils != null) result +=
"""device_display_diagonal_mils=$device_display_diagonal_mils"""
if (device_authzen_version != null) result +=
"""device_authzen_version=$device_authzen_version"""
if (long_device_id != null) result += """long_device_id=$long_device_id"""
if (device_manufacturer != null) result +=
"""device_manufacturer=${sanitize(device_manufacturer)}"""
if (device_type != null) result += """device_type=$device_type"""
if (using_secure_screenlock != null) result +=
"""using_secure_screenlock=$using_secure_screenlock"""
if (auto_unlock_screenlock_supported != null) result +=
"""auto_unlock_screenlock_supported=$auto_unlock_screenlock_supported"""
if (auto_unlock_screenlock_enabled != null) result +=
"""auto_unlock_screenlock_enabled=$auto_unlock_screenlock_enabled"""
if (bluetooth_radio_supported != null) result +=
"""bluetooth_radio_supported=$bluetooth_radio_supported"""
if (bluetooth_radio_enabled != null) result +=
"""bluetooth_radio_enabled=$bluetooth_radio_enabled"""
if (mobile_data_supported != null) result += """mobile_data_supported=$mobile_data_supported"""
if (tethering_supported != null) result += """tethering_supported=$tethering_supported"""
if (ble_radio_supported != null) result += """ble_radio_supported=$ble_radio_supported"""
if (pixel_experience != null) result += """pixel_experience=$pixel_experience"""
if (arc_plus_plus != null) result += """arc_plus_plus=$arc_plus_plus"""
if (is_screenlock_state_flaky != null) result +=
"""is_screenlock_state_flaky=$is_screenlock_state_flaky"""
if (supported_software_features.isNotEmpty()) result +=
"""supported_software_features=$supported_software_features"""
if (enabled_software_features.isNotEmpty()) result +=
"""enabled_software_features=$enabled_software_features"""
if (enrollment_session_id != null) result += """enrollment_session_id=$enrollment_session_id"""
if (oauth_token != null) result += """oauth_token=${sanitize(oauth_token)}"""
return result.joinToString(prefix = "GcmDeviceInfo{", separator = ", ", postfix = "}")
}
public fun copy(
android_device_id: Long? = this.android_device_id,
gcm_registration_id: ByteString? = this.gcm_registration_id,
apn_registration_id: ByteString? = this.apn_registration_id,
notification_enabled: Boolean? = this.notification_enabled,
bluetooth_mac_address: String? = this.bluetooth_mac_address,
device_master_key_hash: ByteString? = this.device_master_key_hash,
user_public_key: ByteString = this.user_public_key,
device_model: String? = this.device_model,
locale: String? = this.locale,
key_handle: ByteString? = this.key_handle,
counter: Long? = this.counter,
device_os_version: String? = this.device_os_version,
device_os_version_code: Long? = this.device_os_version_code,
device_os_release: String? = this.device_os_release,
device_os_codename: String? = this.device_os_codename,
device_software_version: String? = this.device_software_version,
device_software_version_code: Long? = this.device_software_version_code,
device_software_package: String? = this.device_software_package,
device_display_diagonal_mils: Int? = this.device_display_diagonal_mils,
device_authzen_version: Int? = this.device_authzen_version,
long_device_id: ByteString? = this.long_device_id,
device_manufacturer: String? = this.device_manufacturer,
device_type: DeviceType? = this.device_type,
using_secure_screenlock: Boolean? = this.using_secure_screenlock,
auto_unlock_screenlock_supported: Boolean? = this.auto_unlock_screenlock_supported,
auto_unlock_screenlock_enabled: Boolean? = this.auto_unlock_screenlock_enabled,
bluetooth_radio_supported: Boolean? = this.bluetooth_radio_supported,
bluetooth_radio_enabled: Boolean? = this.bluetooth_radio_enabled,
mobile_data_supported: Boolean? = this.mobile_data_supported,
tethering_supported: Boolean? = this.tethering_supported,
ble_radio_supported: Boolean? = this.ble_radio_supported,
pixel_experience: Boolean? = this.pixel_experience,
arc_plus_plus: Boolean? = this.arc_plus_plus,
is_screenlock_state_flaky: Boolean? = this.is_screenlock_state_flaky,
supported_software_features: List = this.supported_software_features,
enabled_software_features: List = this.enabled_software_features,
enrollment_session_id: ByteString? = this.enrollment_session_id,
oauth_token: String? = this.oauth_token,
unknownFields: ByteString = this.unknownFields,
): GcmDeviceInfo = GcmDeviceInfo(android_device_id, gcm_registration_id, apn_registration_id,
notification_enabled, bluetooth_mac_address, device_master_key_hash, user_public_key,
device_model, locale, key_handle, counter, device_os_version, device_os_version_code,
device_os_release, device_os_codename, device_software_version, device_software_version_code,
device_software_package, device_display_diagonal_mils, device_authzen_version, long_device_id,
device_manufacturer, device_type, using_secure_screenlock, auto_unlock_screenlock_supported,
auto_unlock_screenlock_enabled, bluetooth_radio_supported, bluetooth_radio_enabled,
mobile_data_supported, tethering_supported, ble_radio_supported, pixel_experience,
arc_plus_plus, is_screenlock_state_flaky, supported_software_features,
enabled_software_features, enrollment_session_id, oauth_token, unknownFields)
public companion object {
public const val DEFAULT_NOTIFICATION_ENABLED: Boolean = true
public const val DEFAULT_COUNTER: Long = 0L
public val DEFAULT_DEVICE_TYPE: DeviceType = DeviceType.ANDROID
public const val DEFAULT_USING_SECURE_SCREENLOCK: Boolean = false
public const val DEFAULT_AUTO_UNLOCK_SCREENLOCK_SUPPORTED: Boolean = false
public const val DEFAULT_AUTO_UNLOCK_SCREENLOCK_ENABLED: Boolean = false
public const val DEFAULT_BLUETOOTH_RADIO_SUPPORTED: Boolean = false
public const val DEFAULT_BLUETOOTH_RADIO_ENABLED: Boolean = false
public const val DEFAULT_MOBILE_DATA_SUPPORTED: Boolean = false
public const val DEFAULT_TETHERING_SUPPORTED: Boolean = false
public const val DEFAULT_BLE_RADIO_SUPPORTED: Boolean = false
public const val DEFAULT_PIXEL_EXPERIENCE: Boolean = false
public const val DEFAULT_ARC_PLUS_PLUS: Boolean = false
public const val DEFAULT_IS_SCREENLOCK_STATE_FLAKY: Boolean = false
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
GcmDeviceInfo::class,
"type.googleapis.com/securegcm.GcmDeviceInfo",
PROTO_2,
null,
"securegcm.proto"
) {
public override fun encodedSize(`value`: GcmDeviceInfo): Int {
var size = value.unknownFields.size
size += ProtoAdapter.FIXED64.encodedSizeWithTag(1, value.android_device_id)
size += ProtoAdapter.BYTES.encodedSizeWithTag(102, value.gcm_registration_id)
size += ProtoAdapter.BYTES.encodedSizeWithTag(202, value.apn_registration_id)
size += ProtoAdapter.BOOL.encodedSizeWithTag(203, value.notification_enabled)
size += ProtoAdapter.STRING.encodedSizeWithTag(302, value.bluetooth_mac_address)
size += ProtoAdapter.BYTES.encodedSizeWithTag(103, value.device_master_key_hash)
size += ProtoAdapter.BYTES.encodedSizeWithTag(4, value.user_public_key)
size += ProtoAdapter.STRING.encodedSizeWithTag(7, value.device_model)
size += ProtoAdapter.STRING.encodedSizeWithTag(8, value.locale)
size += ProtoAdapter.BYTES.encodedSizeWithTag(9, value.key_handle)
size += ProtoAdapter.INT64.encodedSizeWithTag(12, value.counter)
size += ProtoAdapter.STRING.encodedSizeWithTag(13, value.device_os_version)
size += ProtoAdapter.INT64.encodedSizeWithTag(14, value.device_os_version_code)
size += ProtoAdapter.STRING.encodedSizeWithTag(15, value.device_os_release)
size += ProtoAdapter.STRING.encodedSizeWithTag(16, value.device_os_codename)
size += ProtoAdapter.STRING.encodedSizeWithTag(17, value.device_software_version)
size += ProtoAdapter.INT64.encodedSizeWithTag(18, value.device_software_version_code)
size += ProtoAdapter.STRING.encodedSizeWithTag(19, value.device_software_package)
size += ProtoAdapter.INT32.encodedSizeWithTag(22, value.device_display_diagonal_mils)
size += ProtoAdapter.INT32.encodedSizeWithTag(24, value.device_authzen_version)
size += ProtoAdapter.BYTES.encodedSizeWithTag(29, value.long_device_id)
size += ProtoAdapter.STRING.encodedSizeWithTag(31, value.device_manufacturer)
size += DeviceType.ADAPTER.encodedSizeWithTag(32, value.device_type)
size += ProtoAdapter.BOOL.encodedSizeWithTag(400, value.using_secure_screenlock)
size += ProtoAdapter.BOOL.encodedSizeWithTag(401, value.auto_unlock_screenlock_supported)
size += ProtoAdapter.BOOL.encodedSizeWithTag(402, value.auto_unlock_screenlock_enabled)
size += ProtoAdapter.BOOL.encodedSizeWithTag(403, value.bluetooth_radio_supported)
size += ProtoAdapter.BOOL.encodedSizeWithTag(404, value.bluetooth_radio_enabled)
size += ProtoAdapter.BOOL.encodedSizeWithTag(405, value.mobile_data_supported)
size += ProtoAdapter.BOOL.encodedSizeWithTag(406, value.tethering_supported)
size += ProtoAdapter.BOOL.encodedSizeWithTag(407, value.ble_radio_supported)
size += ProtoAdapter.BOOL.encodedSizeWithTag(408, value.pixel_experience)
size += ProtoAdapter.BOOL.encodedSizeWithTag(409, value.arc_plus_plus)
size += ProtoAdapter.BOOL.encodedSizeWithTag(410, value.is_screenlock_state_flaky)
size += SoftwareFeature.ADAPTER.asRepeated().encodedSizeWithTag(411,
value.supported_software_features)
size += SoftwareFeature.ADAPTER.asRepeated().encodedSizeWithTag(412,
value.enabled_software_features)
size += ProtoAdapter.BYTES.encodedSizeWithTag(1000, value.enrollment_session_id)
size += ProtoAdapter.STRING.encodedSizeWithTag(1001, value.oauth_token)
return size
}
public override fun encode(writer: ProtoWriter, `value`: GcmDeviceInfo): Unit {
ProtoAdapter.FIXED64.encodeWithTag(writer, 1, value.android_device_id)
ProtoAdapter.BYTES.encodeWithTag(writer, 102, value.gcm_registration_id)
ProtoAdapter.BYTES.encodeWithTag(writer, 202, value.apn_registration_id)
ProtoAdapter.BOOL.encodeWithTag(writer, 203, value.notification_enabled)
ProtoAdapter.STRING.encodeWithTag(writer, 302, value.bluetooth_mac_address)
ProtoAdapter.BYTES.encodeWithTag(writer, 103, value.device_master_key_hash)
ProtoAdapter.BYTES.encodeWithTag(writer, 4, value.user_public_key)
ProtoAdapter.STRING.encodeWithTag(writer, 7, value.device_model)
ProtoAdapter.STRING.encodeWithTag(writer, 8, value.locale)
ProtoAdapter.BYTES.encodeWithTag(writer, 9, value.key_handle)
ProtoAdapter.INT64.encodeWithTag(writer, 12, value.counter)
ProtoAdapter.STRING.encodeWithTag(writer, 13, value.device_os_version)
ProtoAdapter.INT64.encodeWithTag(writer, 14, value.device_os_version_code)
ProtoAdapter.STRING.encodeWithTag(writer, 15, value.device_os_release)
ProtoAdapter.STRING.encodeWithTag(writer, 16, value.device_os_codename)
ProtoAdapter.STRING.encodeWithTag(writer, 17, value.device_software_version)
ProtoAdapter.INT64.encodeWithTag(writer, 18, value.device_software_version_code)
ProtoAdapter.STRING.encodeWithTag(writer, 19, value.device_software_package)
ProtoAdapter.INT32.encodeWithTag(writer, 22, value.device_display_diagonal_mils)
ProtoAdapter.INT32.encodeWithTag(writer, 24, value.device_authzen_version)
ProtoAdapter.BYTES.encodeWithTag(writer, 29, value.long_device_id)
ProtoAdapter.STRING.encodeWithTag(writer, 31, value.device_manufacturer)
DeviceType.ADAPTER.encodeWithTag(writer, 32, value.device_type)
ProtoAdapter.BOOL.encodeWithTag(writer, 400, value.using_secure_screenlock)
ProtoAdapter.BOOL.encodeWithTag(writer, 401, value.auto_unlock_screenlock_supported)
ProtoAdapter.BOOL.encodeWithTag(writer, 402, value.auto_unlock_screenlock_enabled)
ProtoAdapter.BOOL.encodeWithTag(writer, 403, value.bluetooth_radio_supported)
ProtoAdapter.BOOL.encodeWithTag(writer, 404, value.bluetooth_radio_enabled)
ProtoAdapter.BOOL.encodeWithTag(writer, 405, value.mobile_data_supported)
ProtoAdapter.BOOL.encodeWithTag(writer, 406, value.tethering_supported)
ProtoAdapter.BOOL.encodeWithTag(writer, 407, value.ble_radio_supported)
ProtoAdapter.BOOL.encodeWithTag(writer, 408, value.pixel_experience)
ProtoAdapter.BOOL.encodeWithTag(writer, 409, value.arc_plus_plus)
ProtoAdapter.BOOL.encodeWithTag(writer, 410, value.is_screenlock_state_flaky)
SoftwareFeature.ADAPTER.asRepeated().encodeWithTag(writer, 411,
value.supported_software_features)
SoftwareFeature.ADAPTER.asRepeated().encodeWithTag(writer, 412,
value.enabled_software_features)
ProtoAdapter.BYTES.encodeWithTag(writer, 1000, value.enrollment_session_id)
ProtoAdapter.STRING.encodeWithTag(writer, 1001, value.oauth_token)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: GcmDeviceInfo): Unit {
writer.writeBytes(value.unknownFields)
ProtoAdapter.STRING.encodeWithTag(writer, 1001, value.oauth_token)
ProtoAdapter.BYTES.encodeWithTag(writer, 1000, value.enrollment_session_id)
SoftwareFeature.ADAPTER.asRepeated().encodeWithTag(writer, 412,
value.enabled_software_features)
SoftwareFeature.ADAPTER.asRepeated().encodeWithTag(writer, 411,
value.supported_software_features)
ProtoAdapter.BOOL.encodeWithTag(writer, 410, value.is_screenlock_state_flaky)
ProtoAdapter.BOOL.encodeWithTag(writer, 409, value.arc_plus_plus)
ProtoAdapter.BOOL.encodeWithTag(writer, 408, value.pixel_experience)
ProtoAdapter.BOOL.encodeWithTag(writer, 407, value.ble_radio_supported)
ProtoAdapter.BOOL.encodeWithTag(writer, 406, value.tethering_supported)
ProtoAdapter.BOOL.encodeWithTag(writer, 405, value.mobile_data_supported)
ProtoAdapter.BOOL.encodeWithTag(writer, 404, value.bluetooth_radio_enabled)
ProtoAdapter.BOOL.encodeWithTag(writer, 403, value.bluetooth_radio_supported)
ProtoAdapter.BOOL.encodeWithTag(writer, 402, value.auto_unlock_screenlock_enabled)
ProtoAdapter.BOOL.encodeWithTag(writer, 401, value.auto_unlock_screenlock_supported)
ProtoAdapter.BOOL.encodeWithTag(writer, 400, value.using_secure_screenlock)
DeviceType.ADAPTER.encodeWithTag(writer, 32, value.device_type)
ProtoAdapter.STRING.encodeWithTag(writer, 31, value.device_manufacturer)
ProtoAdapter.BYTES.encodeWithTag(writer, 29, value.long_device_id)
ProtoAdapter.INT32.encodeWithTag(writer, 24, value.device_authzen_version)
ProtoAdapter.INT32.encodeWithTag(writer, 22, value.device_display_diagonal_mils)
ProtoAdapter.STRING.encodeWithTag(writer, 19, value.device_software_package)
ProtoAdapter.INT64.encodeWithTag(writer, 18, value.device_software_version_code)
ProtoAdapter.STRING.encodeWithTag(writer, 17, value.device_software_version)
ProtoAdapter.STRING.encodeWithTag(writer, 16, value.device_os_codename)
ProtoAdapter.STRING.encodeWithTag(writer, 15, value.device_os_release)
ProtoAdapter.INT64.encodeWithTag(writer, 14, value.device_os_version_code)
ProtoAdapter.STRING.encodeWithTag(writer, 13, value.device_os_version)
ProtoAdapter.INT64.encodeWithTag(writer, 12, value.counter)
ProtoAdapter.BYTES.encodeWithTag(writer, 9, value.key_handle)
ProtoAdapter.STRING.encodeWithTag(writer, 8, value.locale)
ProtoAdapter.STRING.encodeWithTag(writer, 7, value.device_model)
ProtoAdapter.BYTES.encodeWithTag(writer, 4, value.user_public_key)
ProtoAdapter.BYTES.encodeWithTag(writer, 103, value.device_master_key_hash)
ProtoAdapter.STRING.encodeWithTag(writer, 302, value.bluetooth_mac_address)
ProtoAdapter.BOOL.encodeWithTag(writer, 203, value.notification_enabled)
ProtoAdapter.BYTES.encodeWithTag(writer, 202, value.apn_registration_id)
ProtoAdapter.BYTES.encodeWithTag(writer, 102, value.gcm_registration_id)
ProtoAdapter.FIXED64.encodeWithTag(writer, 1, value.android_device_id)
}
public override fun decode(reader: ProtoReader): GcmDeviceInfo {
var android_device_id: Long? = null
var gcm_registration_id: ByteString? = null
var apn_registration_id: ByteString? = null
var notification_enabled: Boolean? = null
var bluetooth_mac_address: String? = null
var device_master_key_hash: ByteString? = null
var user_public_key: ByteString? = null
var device_model: String? = null
var locale: String? = null
var key_handle: ByteString? = null
var counter: Long? = null
var device_os_version: String? = null
var device_os_version_code: Long? = null
var device_os_release: String? = null
var device_os_codename: String? = null
var device_software_version: String? = null
var device_software_version_code: Long? = null
var device_software_package: String? = null
var device_display_diagonal_mils: Int? = null
var device_authzen_version: Int? = null
var long_device_id: ByteString? = null
var device_manufacturer: String? = null
var device_type: DeviceType? = null
var using_secure_screenlock: Boolean? = null
var auto_unlock_screenlock_supported: Boolean? = null
var auto_unlock_screenlock_enabled: Boolean? = null
var bluetooth_radio_supported: Boolean? = null
var bluetooth_radio_enabled: Boolean? = null
var mobile_data_supported: Boolean? = null
var tethering_supported: Boolean? = null
var ble_radio_supported: Boolean? = null
var pixel_experience: Boolean? = null
var arc_plus_plus: Boolean? = null
var is_screenlock_state_flaky: Boolean? = null
val supported_software_features = mutableListOf()
val enabled_software_features = mutableListOf()
var enrollment_session_id: ByteString? = null
var oauth_token: String? = null
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> android_device_id = ProtoAdapter.FIXED64.decode(reader)
102 -> gcm_registration_id = ProtoAdapter.BYTES.decode(reader)
202 -> apn_registration_id = ProtoAdapter.BYTES.decode(reader)
203 -> notification_enabled = ProtoAdapter.BOOL.decode(reader)
302 -> bluetooth_mac_address = ProtoAdapter.STRING.decode(reader)
103 -> device_master_key_hash = ProtoAdapter.BYTES.decode(reader)
4 -> user_public_key = ProtoAdapter.BYTES.decode(reader)
7 -> device_model = ProtoAdapter.STRING.decode(reader)
8 -> locale = ProtoAdapter.STRING.decode(reader)
9 -> key_handle = ProtoAdapter.BYTES.decode(reader)
12 -> counter = ProtoAdapter.INT64.decode(reader)
13 -> device_os_version = ProtoAdapter.STRING.decode(reader)
14 -> device_os_version_code = ProtoAdapter.INT64.decode(reader)
15 -> device_os_release = ProtoAdapter.STRING.decode(reader)
16 -> device_os_codename = ProtoAdapter.STRING.decode(reader)
17 -> device_software_version = ProtoAdapter.STRING.decode(reader)
18 -> device_software_version_code = ProtoAdapter.INT64.decode(reader)
19 -> device_software_package = ProtoAdapter.STRING.decode(reader)
22 -> device_display_diagonal_mils = ProtoAdapter.INT32.decode(reader)
24 -> device_authzen_version = ProtoAdapter.INT32.decode(reader)
29 -> long_device_id = ProtoAdapter.BYTES.decode(reader)
31 -> device_manufacturer = ProtoAdapter.STRING.decode(reader)
32 -> try {
device_type = DeviceType.ADAPTER.decode(reader)
} catch (e: ProtoAdapter.EnumConstantNotFoundException) {
reader.addUnknownField(tag, FieldEncoding.VARINT, e.value.toLong())
}
400 -> using_secure_screenlock = ProtoAdapter.BOOL.decode(reader)
401 -> auto_unlock_screenlock_supported = ProtoAdapter.BOOL.decode(reader)
402 -> auto_unlock_screenlock_enabled = ProtoAdapter.BOOL.decode(reader)
403 -> bluetooth_radio_supported = ProtoAdapter.BOOL.decode(reader)
404 -> bluetooth_radio_enabled = ProtoAdapter.BOOL.decode(reader)
405 -> mobile_data_supported = ProtoAdapter.BOOL.decode(reader)
406 -> tethering_supported = ProtoAdapter.BOOL.decode(reader)
407 -> ble_radio_supported = ProtoAdapter.BOOL.decode(reader)
408 -> pixel_experience = ProtoAdapter.BOOL.decode(reader)
409 -> arc_plus_plus = ProtoAdapter.BOOL.decode(reader)
410 -> is_screenlock_state_flaky = ProtoAdapter.BOOL.decode(reader)
411 -> try {
SoftwareFeature.ADAPTER.tryDecode(reader, supported_software_features)
} catch (e: ProtoAdapter.EnumConstantNotFoundException) {
reader.addUnknownField(tag, FieldEncoding.VARINT, e.value.toLong())
}
412 -> try {
SoftwareFeature.ADAPTER.tryDecode(reader, enabled_software_features)
} catch (e: ProtoAdapter.EnumConstantNotFoundException) {
reader.addUnknownField(tag, FieldEncoding.VARINT, e.value.toLong())
}
1000 -> enrollment_session_id = ProtoAdapter.BYTES.decode(reader)
1001 -> oauth_token = ProtoAdapter.STRING.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return GcmDeviceInfo(
android_device_id = android_device_id,
gcm_registration_id = gcm_registration_id,
apn_registration_id = apn_registration_id,
notification_enabled = notification_enabled,
bluetooth_mac_address = bluetooth_mac_address,
device_master_key_hash = device_master_key_hash,
user_public_key = user_public_key ?: throw missingRequiredFields(user_public_key,
"user_public_key"),
device_model = device_model,
locale = locale,
key_handle = key_handle,
counter = counter,
device_os_version = device_os_version,
device_os_version_code = device_os_version_code,
device_os_release = device_os_release,
device_os_codename = device_os_codename,
device_software_version = device_software_version,
device_software_version_code = device_software_version_code,
device_software_package = device_software_package,
device_display_diagonal_mils = device_display_diagonal_mils,
device_authzen_version = device_authzen_version,
long_device_id = long_device_id,
device_manufacturer = device_manufacturer,
device_type = device_type,
using_secure_screenlock = using_secure_screenlock,
auto_unlock_screenlock_supported = auto_unlock_screenlock_supported,
auto_unlock_screenlock_enabled = auto_unlock_screenlock_enabled,
bluetooth_radio_supported = bluetooth_radio_supported,
bluetooth_radio_enabled = bluetooth_radio_enabled,
mobile_data_supported = mobile_data_supported,
tethering_supported = tethering_supported,
ble_radio_supported = ble_radio_supported,
pixel_experience = pixel_experience,
arc_plus_plus = arc_plus_plus,
is_screenlock_state_flaky = is_screenlock_state_flaky,
supported_software_features = supported_software_features,
enabled_software_features = enabled_software_features,
enrollment_session_id = enrollment_session_id,
oauth_token = oauth_token,
unknownFields = unknownFields
)
}
public override fun redact(`value`: GcmDeviceInfo): GcmDeviceInfo = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy