/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! package com.android.dialer.calldetails.nano; /** This file is autogenerated, but javadoc required. */ @SuppressWarnings("hiding") public final class CallDetailsEntries extends com.google.protobuf.nano.ExtendableMessageNano { /** This file is autogenerated, but javadoc required. */ public static final class CallDetailsEntry extends com.google.protobuf.nano.ExtendableMessageNano { private static volatile CallDetailsEntry[] _emptyArray; public static CallDetailsEntry[] emptyArray() { // Lazily initializes the empty array if (_emptyArray == null) { synchronized (com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) { if (_emptyArray == null) { _emptyArray = new CallDetailsEntry[0]; } } } return _emptyArray; } // optional int64 call_id = 1; public long callId; // optional int32 call_type = 2; public int callType; // optional int32 features = 3; public int features; // optional int64 date = 4; public long date; // optional int64 duration = 5; public long duration; // optional int64 data_usage = 6; public long dataUsage; // repeated .com.android.dialer.enrichedcall.historyquery.proto. // HistoryResult history_results = 7; public com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult[] historyResults; // @@protoc_insertion_point(class_scope:com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry) public CallDetailsEntry() { clear(); } public CallDetailsEntry clear() { callId = 0L; callType = 0; features = 0; date = 0L; duration = 0L; dataUsage = 0L; historyResults = com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult.emptyArray(); unknownFieldData = null; cachedSize = -1; return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof CallDetailsEntry)) { return false; } CallDetailsEntry other = (CallDetailsEntry) o; if (this.callId != other.callId) { return false; } if (this.callType != other.callType) { return false; } if (this.features != other.features) { return false; } if (this.date != other.date) { return false; } if (this.duration != other.duration) { return false; } if (this.dataUsage != other.dataUsage) { return false; } if (!com.google.protobuf.nano.InternalNano.equals( this.historyResults, other.historyResults)) { return false; } if (unknownFieldData == null || unknownFieldData.isEmpty()) { return other.unknownFieldData == null || other.unknownFieldData.isEmpty(); } else { return unknownFieldData.equals(other.unknownFieldData); } } @Override public int hashCode() { int result = 17; result = 31 * result + getClass().getName().hashCode(); result = 31 * result + (int) (this.callId ^ (this.callId >>> 32)); result = 31 * result + this.callType; result = 31 * result + this.features; result = 31 * result + (int) (this.date ^ (this.date >>> 32)); result = 31 * result + (int) (this.duration ^ (this.duration >>> 32)); result = 31 * result + (int) (this.dataUsage ^ (this.dataUsage >>> 32)); result = 31 * result + com.google.protobuf.nano.InternalNano.hashCode(this.historyResults); result = 31 * result + (unknownFieldData == null || unknownFieldData.isEmpty() ? 0 : unknownFieldData.hashCode()); return result; } @Override public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output) throws java.io.IOException { if (this.callId != 0L) { output.writeInt64(1, this.callId); } if (this.callType != 0) { output.writeInt32(2, this.callType); } if (this.features != 0) { output.writeInt32(3, this.features); } if (this.date != 0L) { output.writeInt64(4, this.date); } if (this.duration != 0L) { output.writeInt64(5, this.duration); } if (this.dataUsage != 0L) { output.writeInt64(6, this.dataUsage); } if (this.historyResults != null && this.historyResults.length > 0) { for (int i = 0; i < this.historyResults.length; i++) { com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult element = this.historyResults[i]; if (element != null) { output.writeMessage(7, element); } } } super.writeTo(output); } @Override protected int computeSerializedSize() { int size = super.computeSerializedSize(); if (this.callId != 0L) { size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt64Size(1, this.callId); } if (this.callType != 0) { size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt32Size(2, this.callType); } if (this.features != 0) { size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt32Size(3, this.features); } if (this.date != 0L) { size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt64Size(4, this.date); } if (this.duration != 0L) { size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt64Size(5, this.duration); } if (this.dataUsage != 0L) { size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt64Size(6, this.dataUsage); } if (this.historyResults != null && this.historyResults.length > 0) { for (int i = 0; i < this.historyResults.length; i++) { com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult element = this.historyResults[i]; if (element != null) { size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeMessageSize(7, element); } } } return size; } @Override public CallDetailsEntry mergeFrom(com.google.protobuf.nano.CodedInputByteBufferNano input) throws java.io.IOException { while (true) { int tag = input.readTag(); switch (tag) { case 0: return this; default: { if (!super.storeUnknownField(input, tag)) { return this; } break; } case 8: { this.callId = input.readInt64(); break; } case 16: { this.callType = input.readInt32(); break; } case 24: { this.features = input.readInt32(); break; } case 32: { this.date = input.readInt64(); break; } case 40: { this.duration = input.readInt64(); break; } case 48: { this.dataUsage = input.readInt64(); break; } case 58: { int arrayLength = com.google.protobuf.nano.WireFormatNano.getRepeatedFieldArrayLength(input, 58); int i = this.historyResults == null ? 0 : this.historyResults.length; com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult[] newArray = new com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult [i + arrayLength]; if (i != 0) { java.lang.System.arraycopy(this.historyResults, 0, newArray, 0, i); } for (; i < newArray.length - 1; i++) { newArray[i] = new com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult(); input.readMessage(newArray[i]); input.readTag(); } // Last one without readTag. newArray[i] = new com.android.dialer.enrichedcall.historyquery.proto.nano.HistoryResult(); input.readMessage(newArray[i]); this.historyResults = newArray; break; } } } } public static CallDetailsEntry parseFrom(byte[] data) throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { return com.google.protobuf.nano.MessageNano.mergeFrom(new CallDetailsEntry(), data); } public static CallDetailsEntry parseFrom( com.google.protobuf.nano.CodedInputByteBufferNano input) throws java.io.IOException { return new CallDetailsEntry().mergeFrom(input); } } private static volatile CallDetailsEntries[] _emptyArray; public static CallDetailsEntries[] emptyArray() { // Lazily initializes the empty array if (_emptyArray == null) { synchronized (com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) { if (_emptyArray == null) { _emptyArray = new CallDetailsEntries[0]; } } } return _emptyArray; } // repeated .com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry entries = 1; public com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry[] entries; // @@protoc_insertion_point(class_scope:com.android.dialer.calldetails.CallDetailsEntries) public CallDetailsEntries() { clear(); } public CallDetailsEntries clear() { entries = com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry.emptyArray(); unknownFieldData = null; cachedSize = -1; return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof CallDetailsEntries)) { return false; } CallDetailsEntries other = (CallDetailsEntries) o; if (!com.google.protobuf.nano.InternalNano.equals(this.entries, other.entries)) { return false; } if (unknownFieldData == null || unknownFieldData.isEmpty()) { return other.unknownFieldData == null || other.unknownFieldData.isEmpty(); } else { return unknownFieldData.equals(other.unknownFieldData); } } @Override public int hashCode() { int result = 17; result = 31 * result + getClass().getName().hashCode(); result = 31 * result + com.google.protobuf.nano.InternalNano.hashCode(this.entries); result = 31 * result + (unknownFieldData == null || unknownFieldData.isEmpty() ? 0 : unknownFieldData.hashCode()); return result; } @Override public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output) throws java.io.IOException { if (this.entries != null && this.entries.length > 0) { for (int i = 0; i < this.entries.length; i++) { com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry element = this.entries[i]; if (element != null) { output.writeMessage(1, element); } } } super.writeTo(output); } @Override protected int computeSerializedSize() { int size = super.computeSerializedSize(); if (this.entries != null && this.entries.length > 0) { for (int i = 0; i < this.entries.length; i++) { com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry element = this.entries[i]; if (element != null) { size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeMessageSize(1, element); } } } return size; } @Override public CallDetailsEntries mergeFrom(com.google.protobuf.nano.CodedInputByteBufferNano input) throws java.io.IOException { while (true) { int tag = input.readTag(); switch (tag) { case 0: return this; default: { if (!super.storeUnknownField(input, tag)) { return this; } break; } case 10: { int arrayLength = com.google.protobuf.nano.WireFormatNano.getRepeatedFieldArrayLength(input, 10); int i = this.entries == null ? 0 : this.entries.length; com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry[] newArray = new com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry [i + arrayLength]; if (i != 0) { java.lang.System.arraycopy(this.entries, 0, newArray, 0, i); } for (; i < newArray.length - 1; i++) { newArray[i] = new com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry(); input.readMessage(newArray[i]); input.readTag(); } // Last one without readTag. newArray[i] = new com.android.dialer.calldetails.nano.CallDetailsEntries.CallDetailsEntry(); input.readMessage(newArray[i]); this.entries = newArray; break; } } } } public static CallDetailsEntries parseFrom(byte[] data) throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { return com.google.protobuf.nano.MessageNano.mergeFrom(new CallDetailsEntries(), data); } public static CallDetailsEntries parseFrom( com.google.protobuf.nano.CodedInputByteBufferNano input) throws java.io.IOException { return new CallDetailsEntries().mergeFrom(input); } }