swagger: '2.0'
info:
  description: Configuration for Af report for ICA Session hop detail resource.
  version: 'v2'
  title: ica_session_hop_detail
host: 'adm.cloud.com'
schemes:
 - https
# tags are used for organizing operations
tags:
  - name: ica_session_hop_detail
    description: Af report for ICA Session hop detail
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  UserSecurity:
    type: basic
security:
  - UserSecurity: []
parameters:
  authParam:
      in: header
      name: Authorization
      type: string
      required: true
      description: Session Id for authentication.Should be mentioned in the format CwsAuth bearer=sessionIdValue
  cloudParam:
      in: header
      name: isCloud
      type: string
      required: true
      description: set the value to true in case of Cloud services, false for on-prem deployment
paths:
  /massvc/{customerid}/nitro/v2/config/ica_session_hop_detail:
    get:
      tags:
        - ica_session_hop_detail
      summary: GET all ica_session_hop_detail
      operationId: getall_ica_session_hop_detail
      description: Af Report for ICA Session hop details.
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: path
          name: customerid
          type: string
          required: true
          description: Customer Id of the user
        - in: header
          name: Authorization
          type: string
          required: true
          description: Session Id for authentication.Should be mentioned in the format CwsAuth bearer=sessionIdValue
        - in: header
          name: isCloud
          type: string
          required: true
          description: set the value to true in case of Cloud services, false for on-prem deployment
        - in: query
          name: filter
          type: string
          required: false
          description: "Use this query-parameter to get the filtered set of vm_device resources configured on the system. You can set a filter on any property of the resource.Example:  property-name1:property-value1 "
        - in: query
          name: pagesize
          type: integer
          required: false
          description: Use this query-parameter to get the ica_session_hop_detail resources in chunks.To be used along with pageno query parameter.
        - in: query
          name: pageno
          type: integer
          required: false
          description: Use this query-parameter to get the ica_session_hop_detail resources in chunks.To be used along with pagesize query parameter.
        - in: query
          name: count
          type: string
          required: false
          description: Use this query-parameter to get the count of ica_session_hop_detail resources.
          enum:
            - yes
      responses:
        200:
          description:  for ica_session_hop_detail
          schema: 
              $ref: '#/definitions/getica_session_hop_detailsResponse'
        400:
          description: Bad input parameter
          schema: 
              $ref: '#/definitions/Error'
        401:
          description: Failed Authentication
          schema: 
              $ref: '#/definitions/Error'
        403:
          description: Unauthorized
          schema: 
              $ref: '#/definitions/Error'
        404:
          description: Item not found
          schema: 
              $ref: '#/definitions/Error'
        409:
          description: Resource Conflict
          schema: 
              $ref: '#/definitions/Error'
        500:
          description: Server Error
          schema: 
              $ref: '#/definitions/Error'
        504:
          description: Gateway Timeout
          schema: 
              $ref: '#/definitions/Error'

definitions:
  getica_session_hop_detailResponse:
    type: object
    required:
      - ica_session_hop_detail
    properties:
      ica_session_hop_detail:
        $ref: '#/definitions/ica_session_hop_detail'
    title: getica_session_hop_detailResponse
    example:
      ica_session_hop_detail:
        hop_count: "0"
        ica_device_name: "test_device"
        rpt_sample_time: "1545322342"
        __count: "0"
        id: "00000000-0000-375c-0000-000400000004"
        edt_type: "1"
        ica_device_ip_address: "1.1.1.1"
        hop_location: "0"
        dc_latency: "0"

  getica_session_hop_detailsResponse:
    type: object
    required:
      - ica_session_hop_detail
    properties:
      ica_session_hop_detail:
        type: array
        items:
          $ref: '#/definitions/ica_session_hop_detail'
    title: getica_session_hop_detailsResponse
    example:
      ica_session_hop_detail:
        hop_count: "0"
        ica_device_name: "test_device"
        rpt_sample_time: "1545322342"
        __count: "0"
        id: "00000000-0000-375c-0000-000400000004"
        edt_type: "1"
        ica_device_ip_address: "1.1.1.1"
        hop_location: "0"
        dc_latency: "0"

  ica_session_hop_detail_readwrite:
    type: object
    properties:
      hop_count:
        description: "ica session hop count."
        type: number
        format: double
      ica_device_name:
        description: "Name of ICA device"
        type: string
        format: string
        minLength: 1
        maxLength: 128
      rpt_sample_time:
        description: "Report Sample time."
        type: number
        format: double
      __count:
        description: "Number of records."
        type: number
        format: double
      id:
        description: "Id is ICA Session ID"
        type: string
        format: uuid
        minLength: 1
        maxLength: 64
      edt_type:
        description: "EDT type"
        type: string
        format: string
      hop_location:
        description: "ica session hop location."
        type: number
        format: double
      dc_latency:
        description: "ica session dc latency."
        type: number
        format: double

  ica_session_hop_detail:
    allOf:
      - $ref: '#/definitions/ica_session_hop_detail_readwrite'

  Error:
    properties:
      errorcode:
        type: number
        format: int32
        example: 1001
      errormessage:
        type: string
        format: string
        example: "id cannot be found"
