@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getSessionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); } if (transactionCase_ == 2) { output.writeBytes(2, (com.google.protobuf.ByteString) transaction_); } if (transactionCase_ == 3) { output.writeMessage(3, (com.google.spanner.v1.TransactionOptions) transaction_); } for (int i = 0; i < mutations_.size(); i++) { output.writeMessage(4, mutations_.get(i)); } unknownFields.writeTo(output); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getSessionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, session_); } if (transactionCase_ == 2) { size += com.google.protobuf.CodedOutputStream.computeBytesSize( 2, (com.google.protobuf.ByteString) transaction_); } if (transactionCase_ == 3) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 3, (com.google.spanner.v1.TransactionOptions) transaction_); } for (int i = 0; i < mutations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, mutations_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }