com.android.emulator.control.PhysicalModelValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of adam Show documentation
Show all versions of adam Show documentation
Android Debug Bridge helper
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: emulator_controller.proto
// Protobuf Java Version: 3.25.0
package com.android.emulator.control;
/**
* Protobuf type {@code android.emulation.control.PhysicalModelValue}
*/
public final class PhysicalModelValue extends
com.google.protobuf.GeneratedMessageLite<
PhysicalModelValue, PhysicalModelValue.Builder> implements
// @@protoc_insertion_point(message_implements:android.emulation.control.PhysicalModelValue)
PhysicalModelValueOrBuilder {
private PhysicalModelValue() {
}
/**
* Protobuf enum {@code android.emulation.control.PhysicalModelValue.State}
*/
public enum State
implements com.google.protobuf.Internal.EnumLite {
/**
* OK = 0;
*/
OK(0),
/**
*
* qemud service is not available/initiated.
*
*
* NO_SERVICE = -3;
*/
NO_SERVICE(-3),
/**
*
* Sensor is disabled.
*
*
* DISABLED = -2;
*/
DISABLED(-2),
/**
*
* Unknown sensor (should not happen)
*
*
* UNKNOWN = -1;
*/
UNKNOWN(-1),
UNRECOGNIZED(-1),
;
/**
* OK = 0;
*/
public static final int OK_VALUE = 0;
/**
*
* qemud service is not available/initiated.
*
*
* NO_SERVICE = -3;
*/
public static final int NO_SERVICE_VALUE = -3;
/**
*
* Sensor is disabled.
*
*
* DISABLED = -2;
*/
public static final int DISABLED_VALUE = -2;
/**
*
* Unknown sensor (should not happen)
*
*
* UNKNOWN = -1;
*/
public static final int UNKNOWN_VALUE = -1;
@java.lang.Override
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static State valueOf(int value) {
return forNumber(value);
}
public static State forNumber(int value) {
switch (value) {
case 0: return OK;
case -3: return NO_SERVICE;
case -2: return DISABLED;
case -1: return UNKNOWN;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
State> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
@java.lang.Override
public State findValueByNumber(int number) {
return State.forNumber(number);
}
};
public static com.google.protobuf.Internal.EnumVerifier
internalGetVerifier() {
return StateVerifier.INSTANCE;
}
private static final class StateVerifier implements
com.google.protobuf.Internal.EnumVerifier {
static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new StateVerifier();
@java.lang.Override
public boolean isInRange(int number) {
return State.forNumber(number) != null;
}
};
private final int value;
private State(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:android.emulation.control.PhysicalModelValue.State)
}
/**
*
* Details on the sensors documentation can be found here:
* https://developer.android.com/reference/android/hardware/Sensor.html#TYPE_
*
*
* Protobuf enum {@code android.emulation.control.PhysicalModelValue.PhysicalType}
*/
public enum PhysicalType
implements com.google.protobuf.Internal.EnumLite {
/**
* POSITION = 0;
*/
POSITION(0),
/**
*
* All values are angles in degrees.
* values = [x,y,z]
*
*
* ROTATION = 1;
*/
ROTATION(1),
/**
* MAGNETIC_FIELD = 2;
*/
MAGNETIC_FIELD(2),
/**
*
* Temperature in °C
*
*
* TEMPERATURE = 3;
*/
TEMPERATURE(3),
/**
*
* Proximity sensor distance measured in centimeters
*
*
* PROXIMITY = 4;
*/
PROXIMITY(4),
/**
*
* Ambient light level in SI lux units
*
*
* LIGHT = 5;
*/
LIGHT(5),
/**
*
* Atmospheric pressure in hPa (millibar)
*
*
* PRESSURE = 6;
*/
PRESSURE(6),
/**
*
* Relative ambient air humidity in percent
*
*
* HUMIDITY = 7;
*/
HUMIDITY(7),
/**
* VELOCITY = 8;
*/
VELOCITY(8),
/**
* AMBIENT_MOTION = 9;
*/
AMBIENT_MOTION(9),
UNRECOGNIZED(-1),
;
/**
* POSITION = 0;
*/
public static final int POSITION_VALUE = 0;
/**
*
* All values are angles in degrees.
* values = [x,y,z]
*
*
* ROTATION = 1;
*/
public static final int ROTATION_VALUE = 1;
/**
* MAGNETIC_FIELD = 2;
*/
public static final int MAGNETIC_FIELD_VALUE = 2;
/**
*
* Temperature in °C
*
*
* TEMPERATURE = 3;
*/
public static final int TEMPERATURE_VALUE = 3;
/**
*
* Proximity sensor distance measured in centimeters
*
*
* PROXIMITY = 4;
*/
public static final int PROXIMITY_VALUE = 4;
/**
*
* Ambient light level in SI lux units
*
*
* LIGHT = 5;
*/
public static final int LIGHT_VALUE = 5;
/**
*
* Atmospheric pressure in hPa (millibar)
*
*
* PRESSURE = 6;
*/
public static final int PRESSURE_VALUE = 6;
/**
*
* Relative ambient air humidity in percent
*
*
* HUMIDITY = 7;
*/
public static final int HUMIDITY_VALUE = 7;
/**
* VELOCITY = 8;
*/
public static final int VELOCITY_VALUE = 8;
/**
* AMBIENT_MOTION = 9;
*/
public static final int AMBIENT_MOTION_VALUE = 9;
@java.lang.Override
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PhysicalType valueOf(int value) {
return forNumber(value);
}
public static PhysicalType forNumber(int value) {
switch (value) {
case 0: return POSITION;
case 1: return ROTATION;
case 2: return MAGNETIC_FIELD;
case 3: return TEMPERATURE;
case 4: return PROXIMITY;
case 5: return LIGHT;
case 6: return PRESSURE;
case 7: return HUMIDITY;
case 8: return VELOCITY;
case 9: return AMBIENT_MOTION;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
PhysicalType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
@java.lang.Override
public PhysicalType findValueByNumber(int number) {
return PhysicalType.forNumber(number);
}
};
public static com.google.protobuf.Internal.EnumVerifier
internalGetVerifier() {
return PhysicalTypeVerifier.INSTANCE;
}
private static final class PhysicalTypeVerifier implements
com.google.protobuf.Internal.EnumVerifier {
static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new PhysicalTypeVerifier();
@java.lang.Override
public boolean isInRange(int number) {
return PhysicalType.forNumber(number) != null;
}
};
private final int value;
private PhysicalType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:android.emulation.control.PhysicalModelValue.PhysicalType)
}
private int bitField0_;
public static final int TARGET_FIELD_NUMBER = 1;
private int target_;
/**
* .android.emulation.control.PhysicalModelValue.PhysicalType target = 1;
* @return The enum numeric value on the wire for target.
*/
@java.lang.Override
public int getTargetValue() {
return target_;
}
/**
* .android.emulation.control.PhysicalModelValue.PhysicalType target = 1;
* @return The target.
*/
@java.lang.Override
public com.android.emulator.control.PhysicalModelValue.PhysicalType getTarget() {
com.android.emulator.control.PhysicalModelValue.PhysicalType result = com.android.emulator.control.PhysicalModelValue.PhysicalType.forNumber(target_);
return result == null ? com.android.emulator.control.PhysicalModelValue.PhysicalType.UNRECOGNIZED : result;
}
/**
* .android.emulation.control.PhysicalModelValue.PhysicalType target = 1;
* @param value The enum numeric value on the wire for target to set.
*/
private void setTargetValue(int value) {
target_ = value;
}
/**
* .android.emulation.control.PhysicalModelValue.PhysicalType target = 1;
* @param value The target to set.
*/
private void setTarget(com.android.emulator.control.PhysicalModelValue.PhysicalType value) {
target_ = value.getNumber();
}
/**
* .android.emulation.control.PhysicalModelValue.PhysicalType target = 1;
*/
private void clearTarget() {
target_ = 0;
}
public static final int STATUS_FIELD_NUMBER = 2;
private int status_;
/**
*
* [Output Only]
*
*
* .android.emulation.control.PhysicalModelValue.State status = 2;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override
public int getStatusValue() {
return status_;
}
/**
*
* [Output Only]
*
*
* .android.emulation.control.PhysicalModelValue.State status = 2;
* @return The status.
*/
@java.lang.Override
public com.android.emulator.control.PhysicalModelValue.State getStatus() {
com.android.emulator.control.PhysicalModelValue.State result = com.android.emulator.control.PhysicalModelValue.State.forNumber(status_);
return result == null ? com.android.emulator.control.PhysicalModelValue.State.UNRECOGNIZED : result;
}
/**
*
* [Output Only]
*
*
* .android.emulation.control.PhysicalModelValue.State status = 2;
* @param value The enum numeric value on the wire for status to set.
*/
private void setStatusValue(int value) {
status_ = value;
}
/**
*
* [Output Only]
*
*
* .android.emulation.control.PhysicalModelValue.State status = 2;
* @param value The status to set.
*/
private void setStatus(com.android.emulator.control.PhysicalModelValue.State value) {
status_ = value.getNumber();
}
/**
*
* [Output Only]
*
*
* .android.emulation.control.PhysicalModelValue.State status = 2;
*/
private void clearStatus() {
status_ = 0;
}
public static final int VALUE_FIELD_NUMBER = 3;
private com.android.emulator.control.ParameterValue value_;
/**
*
* Value interpretation depends on sensor, will contain at most 3 values.
*
*
* .android.emulation.control.ParameterValue value = 3;
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Value interpretation depends on sensor, will contain at most 3 values.
*
*
* .android.emulation.control.ParameterValue value = 3;
*/
@java.lang.Override
public com.android.emulator.control.ParameterValue getValue() {
return value_ == null ? com.android.emulator.control.ParameterValue.getDefaultInstance() : value_;
}
/**
*
* Value interpretation depends on sensor, will contain at most 3 values.
*
*
* .android.emulation.control.ParameterValue value = 3;
*/
private void setValue(com.android.emulator.control.ParameterValue value) {
value.getClass();
value_ = value;
bitField0_ |= 0x00000001;
}
/**
*
* Value interpretation depends on sensor, will contain at most 3 values.
*
*
* .android.emulation.control.ParameterValue value = 3;
*/
@java.lang.SuppressWarnings({"ReferenceEquality"})
private void mergeValue(com.android.emulator.control.ParameterValue value) {
value.getClass();
if (value_ != null &&
value_ != com.android.emulator.control.ParameterValue.getDefaultInstance()) {
value_ =
com.android.emulator.control.ParameterValue.newBuilder(value_).mergeFrom(value).buildPartial();
} else {
value_ = value;
}
bitField0_ |= 0x00000001;
}
/**
*
* Value interpretation depends on sensor, will contain at most 3 values.
*
*
* .android.emulation.control.ParameterValue value = 3;
*/
private void clearValue() { value_ = null;
bitField0_ = (bitField0_ & ~0x00000001);
}
public static com.android.emulator.control.PhysicalModelValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.android.emulator.control.PhysicalModelValue parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.android.emulator.control.PhysicalModelValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.android.emulator.control.PhysicalModelValue parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.android.emulator.control.PhysicalModelValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.android.emulator.control.PhysicalModelValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.android.emulator.control.PhysicalModelValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.android.emulator.control.PhysicalModelValue parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.android.emulator.control.PhysicalModelValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.android.emulator.control.PhysicalModelValue parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.android.emulator.control.PhysicalModelValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.android.emulator.control.PhysicalModelValue parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(com.android.emulator.control.PhysicalModelValue prototype) {
return DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
* Protobuf type {@code android.emulation.control.PhysicalModelValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.android.emulator.control.PhysicalModelValue, Builder> implements
// @@protoc_insertion_point(builder_implements:android.emulation.control.PhysicalModelValue)
com.android.emulator.control.PhysicalModelValueOrBuilder {
// Construct using com.android.emulator.control.PhysicalModelValue.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* .android.emulation.control.PhysicalModelValue.PhysicalType target = 1;
* @return The enum numeric value on the wire for target.
*/
@java.lang.Override
public int getTargetValue() {
return instance.getTargetValue();
}
/**
* .android.emulation.control.PhysicalModelValue.PhysicalType target = 1;
* @param value The target to set.
* @return This builder for chaining.
*/
public Builder setTargetValue(int value) {
copyOnWrite();
instance.setTargetValue(value);
return this;
}
/**
* .android.emulation.control.PhysicalModelValue.PhysicalType target = 1;
* @return The target.
*/
@java.lang.Override
public com.android.emulator.control.PhysicalModelValue.PhysicalType getTarget() {
return instance.getTarget();
}
/**
* .android.emulation.control.PhysicalModelValue.PhysicalType target = 1;
* @param value The enum numeric value on the wire for target to set.
* @return This builder for chaining.
*/
public Builder setTarget(com.android.emulator.control.PhysicalModelValue.PhysicalType value) {
copyOnWrite();
instance.setTarget(value);
return this;
}
/**
* .android.emulation.control.PhysicalModelValue.PhysicalType target = 1;
* @return This builder for chaining.
*/
public Builder clearTarget() {
copyOnWrite();
instance.clearTarget();
return this;
}
/**
*
* [Output Only]
*
*
* .android.emulation.control.PhysicalModelValue.State status = 2;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override
public int getStatusValue() {
return instance.getStatusValue();
}
/**
*
* [Output Only]
*
*
* .android.emulation.control.PhysicalModelValue.State status = 2;
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatusValue(int value) {
copyOnWrite();
instance.setStatusValue(value);
return this;
}
/**
*
* [Output Only]
*
*
* .android.emulation.control.PhysicalModelValue.State status = 2;
* @return The status.
*/
@java.lang.Override
public com.android.emulator.control.PhysicalModelValue.State getStatus() {
return instance.getStatus();
}
/**
*
* [Output Only]
*
*
* .android.emulation.control.PhysicalModelValue.State status = 2;
* @param value The enum numeric value on the wire for status to set.
* @return This builder for chaining.
*/
public Builder setStatus(com.android.emulator.control.PhysicalModelValue.State value) {
copyOnWrite();
instance.setStatus(value);
return this;
}
/**
*
* [Output Only]
*
*
* .android.emulation.control.PhysicalModelValue.State status = 2;
* @return This builder for chaining.
*/
public Builder clearStatus() {
copyOnWrite();
instance.clearStatus();
return this;
}
/**
*
* Value interpretation depends on sensor, will contain at most 3 values.
*
*
* .android.emulation.control.ParameterValue value = 3;
*/
@java.lang.Override
public boolean hasValue() {
return instance.hasValue();
}
/**
*
* Value interpretation depends on sensor, will contain at most 3 values.
*
*
* .android.emulation.control.ParameterValue value = 3;
*/
@java.lang.Override
public com.android.emulator.control.ParameterValue getValue() {
return instance.getValue();
}
/**
*
* Value interpretation depends on sensor, will contain at most 3 values.
*
*
* .android.emulation.control.ParameterValue value = 3;
*/
public Builder setValue(com.android.emulator.control.ParameterValue value) {
copyOnWrite();
instance.setValue(value);
return this;
}
/**
*
* Value interpretation depends on sensor, will contain at most 3 values.
*
*
* .android.emulation.control.ParameterValue value = 3;
*/
public Builder setValue(
com.android.emulator.control.ParameterValue.Builder builderForValue) {
copyOnWrite();
instance.setValue(builderForValue.build());
return this;
}
/**
*
* Value interpretation depends on sensor, will contain at most 3 values.
*
*
* .android.emulation.control.ParameterValue value = 3;
*/
public Builder mergeValue(com.android.emulator.control.ParameterValue value) {
copyOnWrite();
instance.mergeValue(value);
return this;
}
/**
*
* Value interpretation depends on sensor, will contain at most 3 values.
*
*
* .android.emulation.control.ParameterValue value = 3;
*/
public Builder clearValue() { copyOnWrite();
instance.clearValue();
return this;
}
// @@protoc_insertion_point(builder_scope:android.emulation.control.PhysicalModelValue)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.android.emulator.control.PhysicalModelValue();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"bitField0_",
"target_",
"status_",
"value_",
};
java.lang.String info =
"\u0000\u0003\u0000\u0001\u0001\u0003\u0003\u0000\u0000\u0000\u0001\f\u0002\f\u0003" +
"\u1009\u0000";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (com.android.emulator.control.PhysicalModelValue.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:android.emulation.control.PhysicalModelValue)
private static final com.android.emulator.control.PhysicalModelValue DEFAULT_INSTANCE;
static {
PhysicalModelValue defaultInstance = new PhysicalModelValue();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
PhysicalModelValue.class, defaultInstance);
}
public static com.android.emulator.control.PhysicalModelValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}