@Override
 public String getDiagnosticsMessage() {
   NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
   if (!p.hasDiagnosticsMessage()) {
     return null;
   }
   return p.getDiagnosticsMessage();
 }
 @Override
 public NodeAction getNodeAction() {
   NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
   if (!p.hasNodeAction()) {
     return null;
   }
   return (convertFromProtoFormat(p.getNodeAction()));
 }
 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 initContainersToSignal() {
    if (this.containersToSignal != null) {
      return;
    }
    NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<SignalContainerRequestProto> list = p.getContainersToSignalList();
    this.containersToSignal = new ArrayList<SignalContainerRequest>();

    for (SignalContainerRequestProto c : list) {
      this.containersToSignal.add(convertFromProtoFormat(c));
    }
  }
  private void initContainersToDecrease() {
    if (this.containersToDecrease != null) {
      return;
    }
    NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<ContainerProto> list = p.getContainersToDecreaseList();
    this.containersToDecrease = new ArrayList<>();

    for (ContainerProto c : list) {
      this.containersToDecrease.add(convertFromProtoFormat(c));
    }
  }
  private void initApplicationsToCleanup() {
    if (this.applicationsToCleanup != null) {
      return;
    }
    NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<ApplicationIdProto> list = p.getApplicationsToCleanupList();
    this.applicationsToCleanup = new ArrayList<ApplicationId>();

    for (ApplicationIdProto c : list) {
      this.applicationsToCleanup.add(convertFromProtoFormat(c));
    }
  }
  private void initContainersToBeRemovedFromNM() {
    if (this.containersToBeRemovedFromNM != null) {
      return;
    }
    NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
    List<ContainerIdProto> list = p.getContainersToBeRemovedFromNmList();
    this.containersToBeRemovedFromNM = new ArrayList<ContainerId>();

    for (ContainerIdProto c : list) {
      this.containersToBeRemovedFromNM.add(convertFromProtoFormat(c));
    }
  }
 @Override
 public MasterKey getNMTokenMasterKey() {
   NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
   if (this.nmTokenMasterKey != null) {
     return this.nmTokenMasterKey;
   }
   if (!p.hasNmTokenMasterKey()) {
     return null;
   }
   this.nmTokenMasterKey = convertFromProtoFormat(p.getNmTokenMasterKey());
   return this.nmTokenMasterKey;
 }
 @Override
 public boolean getAreNodeLabelsAcceptedByRM() {
   NodeHeartbeatResponseProtoOrBuilder p = this.viaProto ? this.proto : this.builder;
   return p.getAreNodeLabelsAcceptedByRM();
 }
 @Override
 public long getNextHeartBeatInterval() {
   NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
   return (p.getNextHeartBeatInterval());
 }
 @Override
 public int getResponseId() {
   NodeHeartbeatResponseProtoOrBuilder p = viaProto ? proto : builder;
   return (p.getResponseId());
 }