Class contains helper methods for console response commands response processing

export

### Hierarchy

- ConsoleResponseService

## Index

### Methods

- getEmptyConsoleResponse
- isLastZosmfResponseEmpty
- populate
- populateError

## Methods

### Static getEmptyConsoleResponse

- getEmptyConsoleResponse(): IConsoleResponse

- - Defined in @zowe/zos-console-for-zowe-sdk/src/ConsoleResponseService.ts:106

  Provides empty console response

  static
  memberof

    ConsoleResponse

  #### Returns IConsoleResponse

### Static isLastZosmfResponseEmpty

- isLastZosmfResponseEmpty(response: IConsoleResponse): boolean

- - Defined in @zowe/zos-console-for-zowe-sdk/src/ConsoleResponseService.ts:121

  Determines whether last z/OSMF response has empty content or not

  static
  memberof

    ConsoleResponse

  #### Parameters

  - ##### response: IConsoleResponse

    command response

  #### Returns boolean

  true if last z/OSMF response has empty "cmd-response", false otherwise

### Static populate

- populate(zosmfResponse: IZosmfIssueResponse, response: IConsoleResponse, processResponses?: boolean): IConsoleResponse

- - Defined in @zowe/zos-console-for-zowe-sdk/src/ConsoleResponseService.ts:36

  Populate the console response with the details returned from the z/OSMF console API. Method takes two parameters: response from z/OSMF command and response to be populated. Method adds response to a collection of z/OSMF responses, mark response as "succeeded" (response.success = true) and populate other fields of response with values from z/OSMF sresponse.

  static
  memberof

    ConsoleResponse

  #### Parameters

  - ##### zosmfResponse: IZosmfIssueResponse

    zosmf console response, @see {IZosmfIssueResponse}

  - ##### response: IConsoleResponse

    console response to be populated, @see {IConsoleResponse}

  - ##### Optional processResponses: boolean

    is set to true, append command response string to the console API response

  #### Returns IConsoleResponse

  populated console response, @see {IConsoleResponse}

### Static populateError

- populateError(error: ImperativeError, response: IConsoleResponse): IConsoleResponse

- - Defined in @zowe/zos-console-for-zowe-sdk/src/ConsoleResponseService.ts:89

  Populate the console response with the Imperative error message. Method takes two parameters: Imperative error and response to be populated. Method save error message info failureResponse field and mark console response as "failed" (response.success = false)

  tatic
  memberof

    ConsoleResponse

  #### Parameters

  - ##### error: ImperativeError

    Imperative error, @see {ImperativeError}

  - ##### response: IConsoleResponse

    console response to be populated, @see {IConsoleResponse}

  #### Returns IConsoleResponse

  populated console response, @see {IConsoleResponse}

Generated using TypeDoc