public void writeTo(com.github.os72.protobuf351.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.github.os72.protobuf351.GeneratedMessageV3.writeString(output, 1, name_); } if (!getDeviceTypeBytes().isEmpty()) { com.github.os72.protobuf351.GeneratedMessageV3.writeString(output, 2, deviceType_); } if (memoryLimit_ != 0L) { output.writeInt64(4, memoryLimit_); } if (locality_ != null) { output.writeMessage(5, getLocality()); } if (incarnation_ != 0L) { output.writeFixed64(6, incarnation_); } if (!getPhysicalDeviceDescBytes().isEmpty()) { com.github.os72.protobuf351.GeneratedMessageV3.writeString(output, 7, physicalDeviceDesc_); } unknownFields.writeTo(output); }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.github.os72.protobuf351.GeneratedMessageV3.computeStringSize(1, name_); } if (!getDeviceTypeBytes().isEmpty()) { size += com.github.os72.protobuf351.GeneratedMessageV3.computeStringSize(2, deviceType_); } if (memoryLimit_ != 0L) { size += com.github.os72.protobuf351.CodedOutputStream .computeInt64Size(4, memoryLimit_); } if (locality_ != null) { size += com.github.os72.protobuf351.CodedOutputStream .computeMessageSize(5, getLocality()); } if (incarnation_ != 0L) { size += com.github.os72.protobuf351.CodedOutputStream .computeFixed64Size(6, incarnation_); } if (!getPhysicalDeviceDescBytes().isEmpty()) { size += com.github.os72.protobuf351.GeneratedMessageV3.computeStringSize(7, physicalDeviceDesc_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!getDeviceTypeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deviceType_); } if (memoryLimit_ != 0L) { output.writeInt64(4, memoryLimit_); } if (locality_ != null) { output.writeMessage(5, getLocality()); } if (incarnation_ != 0L) { output.writeFixed64(6, incarnation_); } if (!getPhysicalDeviceDescBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, physicalDeviceDesc_); } unknownFields.writeTo(output); }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (!getDeviceTypeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deviceType_); } if (memoryLimit_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(4, memoryLimit_); } if (locality_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getLocality()); } if (incarnation_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeFixed64Size(6, incarnation_); } if (!getPhysicalDeviceDescBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, physicalDeviceDesc_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }