swagger: '2.0'
info:
  description: Configuration for NetScaler Mode resource.
  version: 'v2'
  title: ns_ns_mode
host: 'adm.cloud.com'
schemes:
 - https
# tags are used for organizing operations
tags:
  - name: ns_ns_mode
    description: NetScaler Mode
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/ns_ns_mode:
    get:
      tags:
        - ns_ns_mode
      summary: GET all ns_ns_mode
      operationId: getall_ns_ns_mode
      description: Use this operation to get ns mode for a given NetScaler IP Address
      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 ns_ns_mode 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 ns_ns_mode 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 ns_ns_mode resources.
          enum:
            - yes
      responses:
        200:
          description:  for ns_ns_mode
          schema: 
              $ref: '#/definitions/getns_ns_modesResponse'
        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:
  getns_ns_modeResponse:
    type: object
    required:
      - ns_ns_mode
    properties:
      ns_ns_mode:
        $ref: '#/definitions/ns_ns_mode'
    title: getns_ns_modeResponse
    example:
      ns_ns_mode:
        rise_rhi: "boolean_value"
        sradv: "boolean_value"
        pmtud: "boolean_value"
        ns_ip_address: "1.1.1.1"
        dradv: "boolean_value"
        tcpb: "boolean_value"
        fr: "boolean_value"
        dradv6: "boolean_value"
        edge: "boolean_value"
        usnip: "boolean_value"
        bridgebpdus: "boolean_value"
        cka: "boolean_value"
        ulfd: "boolean_value"
        rise_apbr: "boolean_value"
        sradv6: "boolean_value"
        ns_ip_address_arr: "[1.1.1.1, 1.1.1.2]"
        mbf: "boolean_value"
        l3: "boolean_value"
        l2: "boolean_value"
        mediaclassification: "boolean_value"
        iradv: "boolean_value"
        usip: "boolean_value"

  getns_ns_modesResponse:
    type: object
    required:
      - ns_ns_mode
    properties:
      ns_ns_mode:
        type: array
        items:
          $ref: '#/definitions/ns_ns_mode'
    title: getns_ns_modesResponse
    example:
      ns_ns_mode:
        rise_rhi: "boolean_value"
        sradv: "boolean_value"
        pmtud: "boolean_value"
        ns_ip_address: "1.1.1.1"
        dradv: "boolean_value"
        tcpb: "boolean_value"
        fr: "boolean_value"
        dradv6: "boolean_value"
        edge: "boolean_value"
        usnip: "boolean_value"
        bridgebpdus: "boolean_value"
        cka: "boolean_value"
        ulfd: "boolean_value"
        rise_apbr: "boolean_value"
        sradv6: "boolean_value"
        ns_ip_address_arr: "[1.1.1.1, 1.1.1.2]"
        mbf: "boolean_value"
        l3: "boolean_value"
        l2: "boolean_value"
        mediaclassification: "boolean_value"
        iradv: "boolean_value"
        usip: "boolean_value"

  ns_ns_mode_readwrite:
    type: object
    properties:
      rise_rhi:
        description: "true, if rise_rhi feature is enabled"
        type: boolean
        format: boolean
      sradv:
        description: "true, if sradv feature is enabled"
        type: boolean
        format: boolean
      pmtud:
        description: "true, if pmtud feature is enabled"
        type: boolean
        format: boolean
      ns_ip_address:
        description: "NetScaler IP Address"
        type: string
        format: ipaddress
        minLength: 1
        maxLength: 64
      dradv:
        description: "true, if dradv feature is enabled"
        type: boolean
        format: boolean
      tcpb:
        description: "true, if tcpb feature is enabled"
        type: boolean
        format: boolean
      fr:
        description: "true, if fr feature is enabled"
        type: boolean
        format: boolean
      dradv6:
        description: "true, if dradv6 feature is enabled"
        type: boolean
        format: boolean
      edge:
        description: "true, if edge feature is enabled"
        type: boolean
        format: boolean
      usnip:
        description: "true, if usnip feature is enabled"
        type: boolean
        format: boolean
      bridgebpdus:
        description: "true, if bridgebpdus feature is enabled"
        type: boolean
        format: boolean
      cka:
        description: "true, if cka feature is enabled"
        type: boolean
        format: boolean
      ulfd:
        description: "true, if ulfd feature is enabled"
        type: boolean
        format: boolean
      rise_apbr:
        description: "true, if rise_apbr feature is enabled"
        type: boolean
        format: boolean
      sradv6:
        description: "true, if sradv6 feature is enabled"
        type: boolean
        format: boolean
      ns_ip_address_arr:
        description: "List of NetScaler IP Addresses"
        type: array
        items:
          type: string
          format: ipaddress
        minLength: 1
        maxLength: 64
      mbf:
        description: "true, if mbf feature is enabled"
        type: boolean
        format: boolean
      l3:
        description: "true, if l3 feature is enabled"
        type: boolean
        format: boolean
      l2:
        description: "true, if l2 feature is enabled"
        type: boolean
        format: boolean
      mediaclassification:
        description: "true, if mediaclassification feature is enabled"
        type: boolean
        format: boolean
      iradv:
        description: "true, if iradv feature is enabled"
        type: boolean
        format: boolean
      usip:
        description: "true, if usip feature is enabled"
        type: boolean
        format: boolean

  ns_ns_mode:
    allOf:
      - $ref: '#/definitions/ns_ns_mode_readwrite'

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