/server/app/controllers/DataTransferProtocol.java
Java | 1429 lines | 1307 code | 90 blank | 32 comment | 209 complexity | c92d64215da01c0caeec68bb87521d58 MD5 | raw file
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: data_transfer_protocol.proto
- package controllers;
- public final class DataTransferProtocol {
- private DataTransferProtocol() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- }
- public interface AppPropertyOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // optional string app_package_name = 1;
- boolean hasAppPackageName();
- String getAppPackageName();
-
- // optional string app_activity_name = 2;
- boolean hasAppActivityName();
- String getAppActivityName();
-
- // optional string app_name = 3;
- boolean hasAppName();
- String getAppName();
-
- // optional bool is_restricted = 4;
- boolean hasIsRestricted();
- boolean getIsRestricted();
- }
- public static final class AppProperty extends
- com.google.protobuf.GeneratedMessage
- implements AppPropertyOrBuilder {
- // Use AppProperty.newBuilder() to construct.
- private AppProperty(Builder builder) {
- super(builder);
- }
- private AppProperty(boolean noInit) {}
-
- private static final AppProperty defaultInstance;
- public static AppProperty getDefaultInstance() {
- return defaultInstance;
- }
-
- public AppProperty getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return DataTransferProtocol.internal_static_AppProperty_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return DataTransferProtocol.internal_static_AppProperty_fieldAccessorTable;
- }
-
- private int bitField0_;
- // optional string app_package_name = 1;
- public static final int APP_PACKAGE_NAME_FIELD_NUMBER = 1;
- private java.lang.Object appPackageName_;
- public boolean hasAppPackageName() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getAppPackageName() {
- java.lang.Object ref = appPackageName_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- appPackageName_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getAppPackageNameBytes() {
- java.lang.Object ref = appPackageName_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- appPackageName_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional string app_activity_name = 2;
- public static final int APP_ACTIVITY_NAME_FIELD_NUMBER = 2;
- private java.lang.Object appActivityName_;
- public boolean hasAppActivityName() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public String getAppActivityName() {
- java.lang.Object ref = appActivityName_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- appActivityName_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getAppActivityNameBytes() {
- java.lang.Object ref = appActivityName_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- appActivityName_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional string app_name = 3;
- public static final int APP_NAME_FIELD_NUMBER = 3;
- private java.lang.Object appName_;
- public boolean hasAppName() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- public String getAppName() {
- java.lang.Object ref = appName_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- appName_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getAppNameBytes() {
- java.lang.Object ref = appName_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- appName_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional bool is_restricted = 4;
- public static final int IS_RESTRICTED_FIELD_NUMBER = 4;
- private boolean isRestricted_;
- public boolean hasIsRestricted() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- public boolean getIsRestricted() {
- return isRestricted_;
- }
-
- private void initFields() {
- appPackageName_ = "";
- appActivityName_ = "";
- appName_ = "";
- isRestricted_ = false;
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeBytes(1, getAppPackageNameBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(2, getAppActivityNameBytes());
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeBytes(3, getAppNameBytes());
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- output.writeBool(4, isRestricted_);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, getAppPackageNameBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, getAppActivityNameBytes());
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, getAppNameBytes());
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBoolSize(4, isRestricted_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static DataTransferProtocol.AppProperty parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static DataTransferProtocol.AppProperty parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static DataTransferProtocol.AppProperty parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static DataTransferProtocol.AppProperty parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static DataTransferProtocol.AppProperty parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static DataTransferProtocol.AppProperty parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static DataTransferProtocol.AppProperty parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static DataTransferProtocol.AppProperty parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static DataTransferProtocol.AppProperty parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static DataTransferProtocol.AppProperty parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(DataTransferProtocol.AppProperty prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder>
- implements DataTransferProtocol.AppPropertyOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return DataTransferProtocol.internal_static_AppProperty_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return DataTransferProtocol.internal_static_AppProperty_fieldAccessorTable;
- }
-
- // Construct using DataTransferProtocol.AppProperty.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
- }
- }
- private static Builder create() {
- return new Builder();
- }
-
- public Builder clear() {
- super.clear();
- appPackageName_ = "";
- bitField0_ = (bitField0_ & ~0x00000001);
- appActivityName_ = "";
- bitField0_ = (bitField0_ & ~0x00000002);
- appName_ = "";
- bitField0_ = (bitField0_ & ~0x00000004);
- isRestricted_ = false;
- bitField0_ = (bitField0_ & ~0x00000008);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return DataTransferProtocol.AppProperty.getDescriptor();
- }
-
- public DataTransferProtocol.AppProperty getDefaultInstanceForType() {
- return DataTransferProtocol.AppProperty.getDefaultInstance();
- }
-
- public DataTransferProtocol.AppProperty build() {
- DataTransferProtocol.AppProperty result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- private DataTransferProtocol.AppProperty buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- DataTransferProtocol.AppProperty result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return result;
- }
-
- public DataTransferProtocol.AppProperty buildPartial() {
- DataTransferProtocol.AppProperty result = new DataTransferProtocol.AppProperty(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.appPackageName_ = appPackageName_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.appActivityName_ = appActivityName_;
- if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
- to_bitField0_ |= 0x00000004;
- }
- result.appName_ = appName_;
- if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
- to_bitField0_ |= 0x00000008;
- }
- result.isRestricted_ = isRestricted_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof DataTransferProtocol.AppProperty) {
- return mergeFrom((DataTransferProtocol.AppProperty)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(DataTransferProtocol.AppProperty other) {
- if (other == DataTransferProtocol.AppProperty.getDefaultInstance()) return this;
- if (other.hasAppPackageName()) {
- setAppPackageName(other.getAppPackageName());
- }
- if (other.hasAppActivityName()) {
- setAppActivityName(other.getAppActivityName());
- }
- if (other.hasAppName()) {
- setAppName(other.getAppName());
- }
- if (other.hasIsRestricted()) {
- setIsRestricted(other.getIsRestricted());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- onChanged();
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- onChanged();
- return this;
- }
- break;
- }
- case 10: {
- bitField0_ |= 0x00000001;
- appPackageName_ = input.readBytes();
- break;
- }
- case 18: {
- bitField0_ |= 0x00000002;
- appActivityName_ = input.readBytes();
- break;
- }
- case 26: {
- bitField0_ |= 0x00000004;
- appName_ = input.readBytes();
- break;
- }
- case 32: {
- bitField0_ |= 0x00000008;
- isRestricted_ = input.readBool();
- break;
- }
- }
- }
- }
-
- private int bitField0_;
-
- // optional string app_package_name = 1;
- private java.lang.Object appPackageName_ = "";
- public boolean hasAppPackageName() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getAppPackageName() {
- java.lang.Object ref = appPackageName_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- appPackageName_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setAppPackageName(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- appPackageName_ = value;
- onChanged();
- return this;
- }
- public Builder clearAppPackageName() {
- bitField0_ = (bitField0_ & ~0x00000001);
- appPackageName_ = getDefaultInstance().getAppPackageName();
- onChanged();
- return this;
- }
- void setAppPackageName(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000001;
- appPackageName_ = value;
- onChanged();
- }
-
- // optional string app_activity_name = 2;
- private java.lang.Object appActivityName_ = "";
- public boolean hasAppActivityName() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public String getAppActivityName() {
- java.lang.Object ref = appActivityName_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- appActivityName_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setAppActivityName(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- appActivityName_ = value;
- onChanged();
- return this;
- }
- public Builder clearAppActivityName() {
- bitField0_ = (bitField0_ & ~0x00000002);
- appActivityName_ = getDefaultInstance().getAppActivityName();
- onChanged();
- return this;
- }
- void setAppActivityName(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000002;
- appActivityName_ = value;
- onChanged();
- }
-
- // optional string app_name = 3;
- private java.lang.Object appName_ = "";
- public boolean hasAppName() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- public String getAppName() {
- java.lang.Object ref = appName_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- appName_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setAppName(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- appName_ = value;
- onChanged();
- return this;
- }
- public Builder clearAppName() {
- bitField0_ = (bitField0_ & ~0x00000004);
- appName_ = getDefaultInstance().getAppName();
- onChanged();
- return this;
- }
- void setAppName(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000004;
- appName_ = value;
- onChanged();
- }
-
- // optional bool is_restricted = 4;
- private boolean isRestricted_ ;
- public boolean hasIsRestricted() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- public boolean getIsRestricted() {
- return isRestricted_;
- }
- public Builder setIsRestricted(boolean value) {
- bitField0_ |= 0x00000008;
- isRestricted_ = value;
- onChanged();
- return this;
- }
- public Builder clearIsRestricted() {
- bitField0_ = (bitField0_ & ~0x00000008);
- isRestricted_ = false;
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:AppProperty)
- }
-
- static {
- defaultInstance = new AppProperty(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:AppProperty)
- }
-
- public interface AppRequestOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // optional string device_Id = 1 [default = "-1"];
- boolean hasDeviceId();
- String getDeviceId();
-
- // optional string child_birth = 2;
- boolean hasChildBirth();
- String getChildBirth();
-
- // repeated .AppProperty apps = 3;
- java.util.List<DataTransferProtocol.AppProperty>
- getAppsList();
- DataTransferProtocol.AppProperty getApps(int index);
- int getAppsCount();
- java.util.List<? extends DataTransferProtocol.AppPropertyOrBuilder>
- getAppsOrBuilderList();
- DataTransferProtocol.AppPropertyOrBuilder getAppsOrBuilder(
- int index);
- }
- public static final class AppRequest extends
- com.google.protobuf.GeneratedMessage
- implements AppRequestOrBuilder {
- // Use AppRequest.newBuilder() to construct.
- private AppRequest(Builder builder) {
- super(builder);
- }
- private AppRequest(boolean noInit) {}
-
- private static final AppRequest defaultInstance;
- public static AppRequest getDefaultInstance() {
- return defaultInstance;
- }
-
- public AppRequest getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return DataTransferProtocol.internal_static_AppRequest_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return DataTransferProtocol.internal_static_AppRequest_fieldAccessorTable;
- }
-
- private int bitField0_;
- // optional string device_Id = 1 [default = "-1"];
- public static final int DEVICE_ID_FIELD_NUMBER = 1;
- private java.lang.Object deviceId_;
- public boolean hasDeviceId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getDeviceId() {
- java.lang.Object ref = deviceId_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- deviceId_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getDeviceIdBytes() {
- java.lang.Object ref = deviceId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- deviceId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional string child_birth = 2;
- public static final int CHILD_BIRTH_FIELD_NUMBER = 2;
- private java.lang.Object childBirth_;
- public boolean hasChildBirth() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public String getChildBirth() {
- java.lang.Object ref = childBirth_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- childBirth_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getChildBirthBytes() {
- java.lang.Object ref = childBirth_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- childBirth_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // repeated .AppProperty apps = 3;
- public static final int APPS_FIELD_NUMBER = 3;
- private java.util.List<DataTransferProtocol.AppProperty> apps_;
- public java.util.List<DataTransferProtocol.AppProperty> getAppsList() {
- return apps_;
- }
- public java.util.List<? extends DataTransferProtocol.AppPropertyOrBuilder>
- getAppsOrBuilderList() {
- return apps_;
- }
- public int getAppsCount() {
- return apps_.size();
- }
- public DataTransferProtocol.AppProperty getApps(int index) {
- return apps_.get(index);
- }
- public DataTransferProtocol.AppPropertyOrBuilder getAppsOrBuilder(
- int index) {
- return apps_.get(index);
- }
-
- private void initFields() {
- deviceId_ = "-1";
- childBirth_ = "";
- apps_ = java.util.Collections.emptyList();
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeBytes(1, getDeviceIdBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(2, getChildBirthBytes());
- }
- for (int i = 0; i < apps_.size(); i++) {
- output.writeMessage(3, apps_.get(i));
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, getDeviceIdBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, getChildBirthBytes());
- }
- for (int i = 0; i < apps_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, apps_.get(i));
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static DataTransferProtocol.AppRequest parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static DataTransferProtocol.AppRequest parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static DataTransferProtocol.AppRequest parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static DataTransferProtocol.AppRequest parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static DataTransferProtocol.AppRequest parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static DataTransferProtocol.AppRequest parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static DataTransferProtocol.AppRequest parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static DataTransferProtocol.AppRequest parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static DataTransferProtocol.AppRequest parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static DataTransferProtocol.AppRequest parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(DataTransferProtocol.AppRequest prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder>
- implements DataTransferProtocol.AppRequestOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return DataTransferProtocol.internal_static_AppRequest_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return DataTransferProtocol.internal_static_AppRequest_fieldAccessorTable;
- }
-
- // Construct using DataTransferProtocol.AppRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
- getAppsFieldBuilder();
- }
- }
- private static Builder create() {
- return new Builder();
- }
-
- public Builder clear() {
- super.clear();
- deviceId_ = "-1";
- bitField0_ = (bitField0_ & ~0x00000001);
- childBirth_ = "";
- bitField0_ = (bitField0_ & ~0x00000002);
- if (appsBuilder_ == null) {
- apps_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- appsBuilder_.clear();
- }
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return DataTransferProtocol.AppRequest.getDescriptor();
- }
-
- public DataTransferProtocol.AppRequest getDefaultInstanceForType() {
- return DataTransferProtocol.AppRequest.getDefaultInstance();
- }
-
- public DataTransferProtocol.AppRequest build() {
- DataTransferProtocol.AppRequest result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- private DataTransferProtocol.AppRequest buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- DataTransferProtocol.AppRequest result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return result;
- }
-
- public DataTransferProtocol.AppRequest buildPartial() {
- DataTransferProtocol.AppRequest result = new DataTransferProtocol.AppRequest(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.deviceId_ = deviceId_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.childBirth_ = childBirth_;
- if (appsBuilder_ == null) {
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- apps_ = java.util.Collections.unmodifiableList(apps_);
- bitField0_ = (bitField0_ & ~0x00000004);
- }
- result.apps_ = apps_;
- } else {
- result.apps_ = appsBuilder_.build();
- }
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof DataTransferProtocol.AppRequest) {
- return mergeFrom((DataTransferProtocol.AppRequest)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(DataTransferProtocol.AppRequest other) {
- if (other == DataTransferProtocol.AppRequest.getDefaultInstance()) return this;
- if (other.hasDeviceId()) {
- setDeviceId(other.getDeviceId());
- }
- if (other.hasChildBirth()) {
- setChildBirth(other.getChildBirth());
- }
- if (appsBuilder_ == null) {
- if (!other.apps_.isEmpty()) {
- if (apps_.isEmpty()) {
- apps_ = other.apps_;
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- ensureAppsIsMutable();
- apps_.addAll(other.apps_);
- }
- onChanged();
- }
- } else {
- if (!other.apps_.isEmpty()) {
- if (appsBuilder_.isEmpty()) {
- appsBuilder_.dispose();
- appsBuilder_ = null;
- apps_ = other.apps_;
- bitField0_ = (bitField0_ & ~0x00000004);
- appsBuilder_ =
- com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
- getAppsFieldBuilder() : null;
- } else {
- appsBuilder_.addAllMessages(other.apps_);
- }
- }
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- onChanged();
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- onChanged();
- return this;
- }
- break;
- }
- case 10: {
- bitField0_ |= 0x00000001;
- deviceId_ = input.readBytes();
- break;
- }
- case 18: {
- bitField0_ |= 0x00000002;
- childBirth_ = input.readBytes();
- break;
- }
- case 26: {
- DataTransferProtocol.AppProperty.Builder subBuilder = DataTransferProtocol.AppProperty.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addApps(subBuilder.buildPartial());
- break;
- }
- }
- }
- }
-
- private int bitField0_;
-
- // optional string device_Id = 1 [default = "-1"];
- private java.lang.Object deviceId_ = "-1";
- public boolean hasDeviceId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getDeviceId() {
- java.lang.Object ref = deviceId_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- deviceId_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setDeviceId(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- deviceId_ = value;
- onChanged();
- return this;
- }
- public Builder clearDeviceId() {
- bitField0_ = (bitField0_ & ~0x00000001);
- deviceId_ = getDefaultInstance().getDeviceId();
- onChanged();
- return this;
- }
- void setDeviceId(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000001;
- deviceId_ = value;
- onChanged();
- }
-
- // optional string child_birth = 2;
- private java.lang.Object childBirth_ = "";
- public boolean hasChildBirth() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public String getChildBirth() {
- java.lang.Object ref = childBirth_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- childBirth_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setChildBirth(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- childBirth_ = value;
- onChanged();
- return this;
- }
- public Builder clearChildBirth() {
- bitField0_ = (bitField0_ & ~0x00000002);
- childBirth_ = getDefaultInstance().getChildBirth();
- onChanged();
- return this;
- }
- void setChildBirth(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000002;
- childBirth_ = value;
- onChanged();
- }
-
- // repeated .AppProperty apps = 3;
- private java.util.List<DataTransferProtocol.AppProperty> apps_ =
- java.util.Collections.emptyList();
- private void ensureAppsIsMutable() {
- if (!((bitField0_ & 0x00000004) == 0x00000004)) {
- apps_ = new java.util.ArrayList<DataTransferProtocol.AppProperty>(apps_);
- bitField0_ |= 0x00000004;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilder<
- DataTransferProtocol.AppProperty, DataTransferProtocol.AppProperty.Builder, DataTransferProtocol.AppPropertyOrBuilder> appsBuilder_;
-
- public java.util.List<DataTransferProtocol.AppProperty> getAppsList() {
- if (appsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(apps_);
- } else {
- return appsBuilder_.getMessageList();
- }
- }
- public int getAppsCount() {
- if (appsBuilder_ == null) {
- return apps_.size();
- } else {
- return appsBuilder_.getCount();
- }
- }
- public DataTransferProtocol.AppProperty getApps(int index) {
- if (appsBuilder_ == null) {
- return apps_.get(index);
- } else {
- return appsBuilder_.getMessage(index);
- }
- }
- public Builder setApps(
- int index, DataTransferProtocol.AppProperty value) {
- if (appsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureAppsIsMutable();
- apps_.set(index, value);
- onChanged();
- } else {
- appsBuilder_.setMessage(index, value);
- }
- return this;
- }
- public Builder setApps(
- int index, DataTransferProtocol.AppProperty.Builder builderForValue) {
- if (appsBuilder_ == null) {
- ensureAppsIsMutable();
- apps_.set(index, builderForValue.build());
- onChanged();
- } else {
- appsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- public Builder addApps(DataTransferProtocol.AppProperty value) {
- if (appsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureAppsIsMutable();
- apps_.add(value);
- onChanged();
- } else {
- appsBuilder_.addMessage(value);
- }
- return this;
- }
- public Builder addApps(
- int index, DataTransferProtocol.AppProperty value) {
- if (appsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureAppsIsMutable();
- apps_.add(index, value);
- onChanged();
- } else {
- appsBuilder_.addMessage(index, value);
- }
- return this;
- }
- public Builder addApps(
- DataTransferProtocol.AppProperty.Builder builderForValue) {
- if (appsBuilder_ == null) {
- ensureAppsIsMutable();
- apps_.add(builderForValue.build());
- onChanged();
- } else {
- appsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- public Builder addApps(
- int index, DataTransferProtocol.AppProperty.Builder builderForValue) {
- if (appsBuilder_ == null) {
- ensureAppsIsMutable();
- apps_.add(index, builderForValue.build());
- onChanged();
- } else {
- appsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- public Builder addAllApps(
- java.lang.Iterable<? extends DataTransferProtocol.AppProperty> values) {
- if (appsBuilder_ == null) {
- ensureAppsIsMutable();
- super.addAll(values, apps_);
- onChanged();
- } else {
- appsBuilder_.addAllMessages(values);
- }
- return this;
- }
- public Builder clearApps() {
- if (appsBuilder_ == null) {
- apps_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- } else {
- appsBuilder_.clear();
- }
- return this;
- }
- public Builder removeApps(int index) {
- if (appsBuilder_ == null) {
- ensureAppsIsMutable();
- apps_.remove(index);
- onChanged();
- } else {
- appsBuilder_.remove(index);
- }
- return this;
- }
- public DataTransferProtocol.AppProperty.Builder getAppsBuilder(
- int index) {
- return getAppsFieldBuilder().getBuilder(index);
- }
- public DataTransferProtocol.AppPropertyOrBuilder getAppsOrBuilder(
- int index) {
- if (appsBuilder_ == null) {
- return apps_.get(index); } else {
- return appsBuilder_.getMessageOrBuilder(index);
- }
- }
- public java.util.List<? extends DataTransferProtocol.AppPropertyOrBuilder>
- getAppsOrBuilderList() {
- if (appsBuilder_ != null) {
- return appsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(apps_);
- }
- }
- public DataTransferProtocol.AppProperty.Builder addAppsBuilder() {
- return getAppsFieldBuilder().addBuilder(
- DataTransferProtocol.AppProperty.getDefaultInstance());
- }
- public DataTransferProtocol.AppProperty.Builder addAppsBuilder(
- int index) {
- return getAppsFieldBuilder().addBuilder(
- index, DataTransferProtocol.AppProperty.getDefaultInstance());
- }
- public java.util.List<DataTransferProtocol.AppProperty.Builder>
- getAppsBuilderList() {
- return getAppsFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilder<
- DataTransferProtocol.AppProperty, DataTransferProtocol.AppProperty.Builder, DataTransferProtocol.AppPropertyOrBuilder>
- getAppsFieldBuilder() {
- if (appsBuilder_ == null) {
- appsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
- DataTransferProtocol.AppProperty, DataTransferProtocol.AppProperty.Builder, DataTransferProtocol.AppPropertyOrBuilder>(
- apps_,
- ((bitField0_ & 0x00000004) == 0x00000004),
- getParentForChildren(),
- isClean());
- apps_ = null;
- }
- return appsBuilder_;
- }
-
- // @@protoc_insertion_point(builder_scope:AppRequest)
- }
-
- static {
- defaultInstance = new AppRequest(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:AppRequest)
- }
-
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_AppProperty_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_AppProperty_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_AppRequest_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_AppRequest_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\034data_transfer_protocol.proto\"k\n\013AppPro" +
- "perty\022\030\n\020app_package_name\030\001 \001(\t\022\031\n\021app_a" +
- "ctivity_name\030\002 \001(\t\022\020\n\010app_name\030\003 \001(\t\022\025\n\r" +
- "is_restricted\030\004 \001(\010\"T\n\nAppRequest\022\025\n\tdev" +
- "ice_Id\030\001 \001(\t:\002-1\022\023\n\013child_birth\030\002 \001(\t\022\032\n" +
- "\004apps\030\003 \003(\0132\014.AppProperty"
- };
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- internal_static_AppProperty_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_AppProperty_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_AppProperty_descriptor,
- new java.lang.String[] { "AppPackageName", "AppActivityName", "AppName", "IsRestricted", },
- DataTransferProtocol.AppProperty.class,
- DataTransferProtocol.AppProperty.Builder.class);
- internal_static_AppRequest_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_AppRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_AppRequest_descriptor,
- new java.lang.String[] { "DeviceId", "ChildBirth", "Apps", },
- DataTransferProtocol.AppRequest.class,
- DataTransferProtocol.AppRequest.Builder.class);
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- }, assigner);
- }
-
- // @@protoc_insertion_point(outer_class_scope)
- }