transformInput(input) {
    _.set(input, 'info.engine.software', [input.info.engine.name, input.info.engine.version].join(' '));
    _.set(input, 'info.exposedPort', parseInt(input.info.exposedPort, 10));
    _.set(input, 'actionsMap', input.actions.reduce((actions, action) => {
      actions[action.type] = action.isAllowed; // eslint-disable-line
      return actions;
    }, {}));

    const isProcessing = input.info.status === this.LogsConstants.inputStatus.PROCESSING;
    const isToBeConfigured = input.info.status === this.LogsConstants.inputStatus.INIT
      && !input.actionsMap.START;
    const isPending = (input.info.status === this.LogsConstants.inputStatus.INIT
      || input.info.status === this.LogsConstants.inputStatus.PENDING)
      && input.actionsMap.START;
    const isRunning = input.info.status === this.LogsConstants.inputStatus.RUNNING;

    /* eslint-disable no-nested-ternary */
    _.set(input, 'info.state', isProcessing ? this.LogsConstants.inputState.PROCESSING
      : input.info.isRestartRequired ? this.LogsConstants.inputState.RESTART_REQUIRED
        : isToBeConfigured ? this.LogsConstants.inputState.TO_CONFIGURE
          : isPending ? this.LogsConstants.inputState.PENDING
            : isRunning ? this.LogsConstants.inputState.RUNNING
              : this.LogsConstants.inputState.UNKNOWN);
    /* eslint-disable no-nested-ternary */
    _.set(input, 'info.stateType', this.LogsConstants.inputStateType[input.info.state]);
    return input;
  }
/**
   * transforms the input by adding some additional information
   *
   * @param {any} input
   * @returns the transformed input
   * @memberof LogsInputsService
   */
transforms the input by adding some additional information
@param {any} input
@returns the transformed input
@memberof LogsInputsService
transforms the input by adding some additional information @param { any } input @returns the transformed input @memberof LogsInputsService
transformInput(input) {
    _.set(input, 'info.engine.software', [input.info.engine.name, input.info.engine.version].join(' '));
    _.set(input, 'info.exposedPort', parseInt(input.info.exposedPort, 10));
    _.set(input, 'actionsMap', input.actions.reduce((actions, action) => {
      actions[action.type] = action.isAllowed; 
      return actions;
    }, {}));
    const isProcessing = input.info.status === this.LogsConstants.inputStatus.PROCESSING;
    const isToBeConfigured = input.info.status === this.LogsConstants.inputStatus.INIT
      && !input.actionsMap.START;
    const isPending = (input.info.status === this.LogsConstants.inputStatus.INIT
      || input.info.status === this.LogsConstants.inputStatus.PENDING)
      && input.actionsMap.START;
    const isRunning = input.info.status === this.LogsConstants.inputStatus.RUNNING;
    _.set(input, 'info.state', isProcessing ? this.LogsConstants.inputState.PROCESSING
      : input.info.isRestartRequired ? this.LogsConstants.inputState.RESTART_REQUIRED
        : isToBeConfigured ? this.LogsConstants.inputState.TO_CONFIGURE
          : isPending ? this.LogsConstants.inputState.PENDING
            : isRunning ? this.LogsConstants.inputState.RUNNING
              : this.LogsConstants.inputState.UNKNOWN);
    _.set(input, 'info.stateType', this.LogsConstants.inputStateType[input.info.state]);
    return input;
  }
transformInput ( input ) { _ . set ( input , 'info.engine.software' , [ input . info . engine . name , input . info . engine . version ] . join ( ' ' ) ) ; _ . set ( input , 'info.exposedPort' , parseInt ( input . info . exposedPort , 10 ) ) ; _ . set ( input , 'actionsMap' , input . actions . reduce ( ( actions , action ) => { actions [ action . type ] = action . isAllowed ; return actions ; } , { } ) ) ; const isProcessing = input . info . status === this . LogsConstants . inputStatus . PROCESSING ; const isToBeConfigured = input . info . status === this . LogsConstants . inputStatus . INIT && ! input . actionsMap . START ; const isPending = ( input . info . status === this . LogsConstants . inputStatus . INIT || input . info . status === this . LogsConstants . inputStatus . PENDING ) && input . actionsMap . START ; const isRunning = input . info . status === this . LogsConstants . inputStatus . RUNNING ; _ . set ( input , 'info.state' , isProcessing ? this . LogsConstants . inputState . PROCESSING : input . info . isRestartRequired ? this . LogsConstants . inputState . RESTART_REQUIRED : isToBeConfigured ? this . LogsConstants . inputState . TO_CONFIGURE : isPending ? this . LogsConstants . inputState . PENDING : isRunning ? this . LogsConstants . inputState . RUNNING : this . LogsConstants . inputState . UNKNOWN ) ; _ . set ( input , 'info.stateType' , this . LogsConstants . inputStateType [ input . info . state ] ) ; return input ; }
transforms the input by adding some additional information
 @param {any} input
 @returns the transformed input
 @memberof LogsInputsService
transforms the input by adding some additional information @param { any } input @returns the transformed input @memberof LogsInputsService
// eslint-disable-line /* eslint-disable no-nested-ternary */ /* eslint-disable no-nested-ternary */