private void initSystemCredentials() {
   NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
   List<SystemCredentialsForAppsProto> list = p.getSystemCredentialsForAppsList();
   this.systemCredentials = new HashMap<ApplicationId, ByteBuffer>();
   for (SystemCredentialsForAppsProto c : list) {
     ApplicationId appId = convertFromProtoFormat(c.getAppId());
     ByteBuffer byteBuffer = ProtoUtils.convertFromProtoFormat(c.getCredentialsForApp());
     this.systemCredentials.put(appId, byteBuffer);
   }
 }
 private void addSystemCredentialsToProto() {
   maybeInitBuilder();
   builder.clearSystemCredentialsForApps();
   for (Map.Entry<ApplicationId, ByteBuffer> entry : systemCredentials.entrySet()) {
     builder.addSystemCredentialsForApps(
         SystemCredentialsForAppsProto.newBuilder()
             .setAppId(convertToProtoFormat(entry.getKey()))
             .setCredentialsForApp(ProtoUtils.convertToProtoFormat(entry.getValue().duplicate())));
   }
 }
 private ExecutionType convertFromProtoFormat(ExecutionTypeProto executionType) {
   return ProtoUtils.convertFromProtoFormat(executionType);
 }
 private ExecutionTypeProto convertToProtoFormat(ExecutionType executionType) {
   return ProtoUtils.convertToProtoFormat(executionType);
 }
 private ContainerType convertFromProtoFormat(ContainerTypeProto containerType) {
   return ProtoUtils.convertFromProtoFormat(containerType);
 }