/NotifierLib/src/org/damazio/notifier/protocol/Commands.java
Java | 770 lines | 669 code | 81 blank | 20 comment | 92 complexity | 06e22d31f058ef92b3b107d1a28f3204 MD5 | raw file
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: commands.proto
- package org.damazio.notifier.protocol;
- public final class Commands {
- private Commands() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
- public interface CallCommandOrBuilder
- extends com.google.protobuf.MessageLiteOrBuilder {
-
- // required string number = 1;
- boolean hasNumber();
- String getNumber();
- }
- public static final class CallCommand extends
- com.google.protobuf.GeneratedMessageLite
- implements CallCommandOrBuilder {
- // Use CallCommand.newBuilder() to construct.
- private CallCommand(Builder builder) {
- super(builder);
- }
- private CallCommand(boolean noInit) {}
-
- private static final CallCommand defaultInstance;
- public static CallCommand getDefaultInstance() {
- return defaultInstance;
- }
-
- public CallCommand getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private int bitField0_;
- // required string number = 1;
- public static final int NUMBER_FIELD_NUMBER = 1;
- private Object number_;
- public boolean hasNumber() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getNumber() {
- Object ref = number_;
- 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)) {
- number_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getNumberBytes() {
- Object ref = number_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- number_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private void initFields() {
- number_ = "";
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- if (!hasNumber()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeBytes(1, getNumberBytes());
- }
- }
-
- 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, getNumberBytes());
- }
- memoizedSerializedSize = size;
- return size;
- }
-
- @java.lang.Override
- protected Object writeReplace() throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.damazio.notifier.protocol.Commands.CallCommand parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.damazio.notifier.protocol.Commands.CallCommand parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.damazio.notifier.protocol.Commands.CallCommand parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.damazio.notifier.protocol.Commands.CallCommand parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.damazio.notifier.protocol.Commands.CallCommand parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.damazio.notifier.protocol.Commands.CallCommand parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static org.damazio.notifier.protocol.Commands.CallCommand parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.damazio.notifier.protocol.Commands.CallCommand 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 org.damazio.notifier.protocol.Commands.CallCommand parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.damazio.notifier.protocol.Commands.CallCommand 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(org.damazio.notifier.protocol.Commands.CallCommand prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageLite.Builder<
- org.damazio.notifier.protocol.Commands.CallCommand, Builder>
- implements org.damazio.notifier.protocol.Commands.CallCommandOrBuilder {
- // Construct using org.damazio.notifier.protocol.Commands.CallCommand.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- }
- private static Builder create() {
- return new Builder();
- }
-
- public Builder clear() {
- super.clear();
- number_ = "";
- bitField0_ = (bitField0_ & ~0x00000001);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public org.damazio.notifier.protocol.Commands.CallCommand getDefaultInstanceForType() {
- return org.damazio.notifier.protocol.Commands.CallCommand.getDefaultInstance();
- }
-
- public org.damazio.notifier.protocol.Commands.CallCommand build() {
- org.damazio.notifier.protocol.Commands.CallCommand result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- private org.damazio.notifier.protocol.Commands.CallCommand buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- org.damazio.notifier.protocol.Commands.CallCommand result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return result;
- }
-
- public org.damazio.notifier.protocol.Commands.CallCommand buildPartial() {
- org.damazio.notifier.protocol.Commands.CallCommand result = new org.damazio.notifier.protocol.Commands.CallCommand(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.number_ = number_;
- result.bitField0_ = to_bitField0_;
- return result;
- }
-
- public Builder mergeFrom(org.damazio.notifier.protocol.Commands.CallCommand other) {
- if (other == org.damazio.notifier.protocol.Commands.CallCommand.getDefaultInstance()) return this;
- if (other.hasNumber()) {
- setNumber(other.getNumber());
- }
- return this;
- }
-
- public final boolean isInitialized() {
- if (!hasNumber()) {
-
- return false;
- }
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
-
- return this;
- default: {
- if (!parseUnknownField(input, extensionRegistry, tag)) {
-
- return this;
- }
- break;
- }
- case 10: {
- bitField0_ |= 0x00000001;
- number_ = input.readBytes();
- break;
- }
- }
- }
- }
-
- private int bitField0_;
-
- // required string number = 1;
- private Object number_ = "";
- public boolean hasNumber() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getNumber() {
- Object ref = number_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- number_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setNumber(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- number_ = value;
-
- return this;
- }
- public Builder clearNumber() {
- bitField0_ = (bitField0_ & ~0x00000001);
- number_ = getDefaultInstance().getNumber();
-
- return this;
- }
- void setNumber(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000001;
- number_ = value;
-
- }
-
- // @@protoc_insertion_point(builder_scope:org.damazio.notifier.protocol.CallCommand)
- }
-
- static {
- defaultInstance = new CallCommand(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:org.damazio.notifier.protocol.CallCommand)
- }
-
- public interface SmsCommandOrBuilder
- extends com.google.protobuf.MessageLiteOrBuilder {
-
- // required string to_number = 1;
- boolean hasToNumber();
- String getToNumber();
-
- // required string text = 2;
- boolean hasText();
- String getText();
- }
- public static final class SmsCommand extends
- com.google.protobuf.GeneratedMessageLite
- implements SmsCommandOrBuilder {
- // Use SmsCommand.newBuilder() to construct.
- private SmsCommand(Builder builder) {
- super(builder);
- }
- private SmsCommand(boolean noInit) {}
-
- private static final SmsCommand defaultInstance;
- public static SmsCommand getDefaultInstance() {
- return defaultInstance;
- }
-
- public SmsCommand getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private int bitField0_;
- // required string to_number = 1;
- public static final int TO_NUMBER_FIELD_NUMBER = 1;
- private Object toNumber_;
- public boolean hasToNumber() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getToNumber() {
- Object ref = toNumber_;
- 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)) {
- toNumber_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getToNumberBytes() {
- Object ref = toNumber_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- toNumber_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // required string text = 2;
- public static final int TEXT_FIELD_NUMBER = 2;
- private Object text_;
- public boolean hasText() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public String getText() {
- Object ref = text_;
- 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)) {
- text_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getTextBytes() {
- Object ref = text_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- text_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private void initFields() {
- toNumber_ = "";
- text_ = "";
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- if (!hasToNumber()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasText()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeBytes(1, getToNumberBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(2, getTextBytes());
- }
- }
-
- 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, getToNumberBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, getTextBytes());
- }
- memoizedSerializedSize = size;
- return size;
- }
-
- @java.lang.Override
- protected Object writeReplace() throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.damazio.notifier.protocol.Commands.SmsCommand parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.damazio.notifier.protocol.Commands.SmsCommand parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.damazio.notifier.protocol.Commands.SmsCommand parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.damazio.notifier.protocol.Commands.SmsCommand parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.damazio.notifier.protocol.Commands.SmsCommand parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.damazio.notifier.protocol.Commands.SmsCommand parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static org.damazio.notifier.protocol.Commands.SmsCommand parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.damazio.notifier.protocol.Commands.SmsCommand 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 org.damazio.notifier.protocol.Commands.SmsCommand parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.damazio.notifier.protocol.Commands.SmsCommand 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(org.damazio.notifier.protocol.Commands.SmsCommand prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageLite.Builder<
- org.damazio.notifier.protocol.Commands.SmsCommand, Builder>
- implements org.damazio.notifier.protocol.Commands.SmsCommandOrBuilder {
- // Construct using org.damazio.notifier.protocol.Commands.SmsCommand.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- }
- private static Builder create() {
- return new Builder();
- }
-
- public Builder clear() {
- super.clear();
- toNumber_ = "";
- bitField0_ = (bitField0_ & ~0x00000001);
- text_ = "";
- bitField0_ = (bitField0_ & ~0x00000002);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public org.damazio.notifier.protocol.Commands.SmsCommand getDefaultInstanceForType() {
- return org.damazio.notifier.protocol.Commands.SmsCommand.getDefaultInstance();
- }
-
- public org.damazio.notifier.protocol.Commands.SmsCommand build() {
- org.damazio.notifier.protocol.Commands.SmsCommand result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- private org.damazio.notifier.protocol.Commands.SmsCommand buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- org.damazio.notifier.protocol.Commands.SmsCommand result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return result;
- }
-
- public org.damazio.notifier.protocol.Commands.SmsCommand buildPartial() {
- org.damazio.notifier.protocol.Commands.SmsCommand result = new org.damazio.notifier.protocol.Commands.SmsCommand(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.toNumber_ = toNumber_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.text_ = text_;
- result.bitField0_ = to_bitField0_;
- return result;
- }
-
- public Builder mergeFrom(org.damazio.notifier.protocol.Commands.SmsCommand other) {
- if (other == org.damazio.notifier.protocol.Commands.SmsCommand.getDefaultInstance()) return this;
- if (other.hasToNumber()) {
- setToNumber(other.getToNumber());
- }
- if (other.hasText()) {
- setText(other.getText());
- }
- return this;
- }
-
- public final boolean isInitialized() {
- if (!hasToNumber()) {
-
- return false;
- }
- if (!hasText()) {
-
- return false;
- }
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
-
- return this;
- default: {
- if (!parseUnknownField(input, extensionRegistry, tag)) {
-
- return this;
- }
- break;
- }
- case 10: {
- bitField0_ |= 0x00000001;
- toNumber_ = input.readBytes();
- break;
- }
- case 18: {
- bitField0_ |= 0x00000002;
- text_ = input.readBytes();
- break;
- }
- }
- }
- }
-
- private int bitField0_;
-
- // required string to_number = 1;
- private Object toNumber_ = "";
- public boolean hasToNumber() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getToNumber() {
- Object ref = toNumber_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- toNumber_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setToNumber(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- toNumber_ = value;
-
- return this;
- }
- public Builder clearToNumber() {
- bitField0_ = (bitField0_ & ~0x00000001);
- toNumber_ = getDefaultInstance().getToNumber();
-
- return this;
- }
- void setToNumber(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000001;
- toNumber_ = value;
-
- }
-
- // required string text = 2;
- private Object text_ = "";
- public boolean hasText() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public String getText() {
- Object ref = text_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- text_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setText(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- text_ = value;
-
- return this;
- }
- public Builder clearText() {
- bitField0_ = (bitField0_ & ~0x00000002);
- text_ = getDefaultInstance().getText();
-
- return this;
- }
- void setText(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000002;
- text_ = value;
-
- }
-
- // @@protoc_insertion_point(builder_scope:org.damazio.notifier.protocol.SmsCommand)
- }
-
- static {
- defaultInstance = new SmsCommand(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:org.damazio.notifier.protocol.SmsCommand)
- }
-
-
- static {
- }
-
- // @@protoc_insertion_point(outer_class_scope)
- }