swagger: '2.0'
info:
  description: Configuration for NetScaler configuration template resource.
  version: 'v2'
  title: ns_configtemplate
host: 'adm.cloud.com'
schemes:
 - https
# tags are used for organizing operations
tags:
  - name: ns_configtemplate
    description: NetScaler configuration template
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  UserSecurity:
    type: basic
security:
  - UserSecurity: []
parameters:
  idParam:
   name: id
   in: path
   type: string
   description: Id is system generated key for all the system users
   required: true
  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_configtemplate:
    get:
      tags:
        - ns_configtemplate
      summary: GET all ns_configtemplate
      operationId: getall_ns_configtemplate
      description: Get NetScaler configuration templates
      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_configtemplate 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_configtemplate 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_configtemplate resources.
          enum:
            - yes
      responses:
        200:
          description:  for ns_configtemplate
          schema: 
              $ref: '#/definitions/getns_configtemplatesResponse'
        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'

    post:
      tags:
        - ns_configtemplate
      summary: POST operation for ns_configtemplate
      operationId: post_ns_configtemplate
      description: POST operation for ns_configtemplate
      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: onerror
          description: Use this parameter to set the onerror status for nitro request. Applicable only for bulk requests.
          required: false
          type: string
          default: CONTINUE
          enum:
            - EXIT
            - CONTINUE
        - in: body
          name: ns_configtemplate
          description: ns_configtemplate object
          schema:
              $ref: '#/definitions/addns_configtemplateRequest'
      responses:
        200:
          description: add for ns_configtemplate
          schema: 
              $ref: '#/definitions/addns_configtemplateResponse'
        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'

  /massvc/{customerid}/nitro/v2/config/ns_configtemplate/{id}:
    get:
      tags:
        - ns_configtemplate
      summary: GET by key for ns_configtemplate
      operationId: getbykey_ns_configtemplate
      description: Get NetScaler configuration templates
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/idParam'
        - 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
      responses:
        200:
          description: add for ns_configtemplate
          schema: 
              $ref: '#/definitions/getns_configtemplateResponse'
        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'

    post:
      tags:
        - ns_configtemplate
      summary: POST operation with actions for ns_configtemplate
      operationId: post_ns_configtemplate_actions
      description: POST operation with actions for ns_configtemplate
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/idParam'
        - 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: action
          type: string
          required: true
          enum: [import_variables_file,preview]
          description: >
            actions:
              * `import_variables_file` - Use this operation to import variables file
              * `preview` - Use this operation to preview

        - in: body
          name: ns_configtemplate
          description: ns_configtemplate object
          schema:
              $ref: '#/definitions/addns_configtemplateRequest'
      responses:
        200:
          description: preview for ns_configtemplate
          schema: 
              $ref: '#/definitions/addns_configtemplateResponse'
        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'

    put:
      tags:
        - ns_configtemplate
      summary: PUT for ns_configtemplate
      operationId: putbykey_ns_configtemplate
      description: Use this operation to modify NetScaler configuration template
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/idParam'
        - 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: body
          name: ns_configtemplate
          description: ns_configtemplate object
          schema:
              $ref: '#/definitions/modifyns_configtemplateRequest'
      responses:
        200:
          description: preview for ns_configtemplate
          schema: 
              $ref: '#/definitions/modifyns_configtemplateResponse'
        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'

    delete:
      tags:
        - ns_configtemplate
      summary: Delete for ns_configtemplate
      operationId: deletebykey_ns_configtemplate
      description: Use this operation to delete NetScaler configuration template
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/idParam'
        - 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
      responses:
        204:
          description: preview for ns_configtemplate
        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:
  addns_configtemplateRequest:
    type: object
    required:
      - ns_configtemplate
    properties:
      ns_configtemplate:
        $ref: '#/definitions/ns_configtemplate_readwrite'
    title: addns_configtemplateRequest
    example:
      ns_configtemplate:
        to_be_exported: "false"
        variable_vals: [{        parent_name: "string_value"
,        value: "string_value"
,        name: "string_value"
,        valuex: "string_value"
,        display_name: "string_value"
,        description: "string_value"
,        device_values: [{        value: "string_value"
,        id: "string_value"
,        valuex: "string_value"
,        device_group: "string_value"
,        device: "string_value"
}]
,        parent_id: "string_value"
,        default_value: "string_value"
,        id: "string_value"
,        type: "string_value"
,        values_enum_db: "string_value"
}]
        commands: [{        parent_name: "string_value"
,        id: "string_value"
,        command: "string_value"
,        parent_id: "string_value"
}]
        variables: [{        parent_name: "string_value"
,        name: "string_value"
,        valuex: "string_value"
,        display_name: "string_value"
,        description: "string_value"
,        parent_id: "string_value"
,        required: "boolean_value"
,        default_value: "string_value"
,        id: "string_value"
,        type: "string_value"
,        values_enum_db: "string_value"
,        values_enum: ["string_value1","string_value2"]
}]
        slack_profile: "admin_slack_profile"
        mail_export: "false"
        template_file: "variable_audit1.csv"
        send_report_only_when_diff: "false"
        mail_profile: "admin_mail_profile"
        slack_export: "false"
        isDefaultSchedule: "true"
        name: "variable1"
        description: "Internal audit template"
        ignoresysuserpassword: "false"
        device_groups_db: "Dev1,Dev3"
        scheduleInfo: {        scheduleTimesEpoch: "string_value"
,        daily_time: "string_value"
,        recurrenceOptions: "string_value"
,        id: "string_value"
,        recurrence_type: "string_value"
,        tz_offset: "integer_value"
}
        preview_commands: ["string_value1","string_value2"]
        device_groups: "ARRAY(0x2c9ffbc)"
        devices: "ARRAY(0x2cac04c)"

  addns_configtemplateResponse:
    type: object
    required:
      - ns_configtemplate
    properties:
      ns_configtemplate:
        $ref: '#/definitions/ns_configtemplate'
    title: addns_configtemplateResponse
    example:
      ns_configtemplate:
        to_be_exported: "false"
        variable_vals: [{        device_values_mapping: "string_value"
,        parent_name: "string_value"
,        value: "string_value"
,        name: "string_value"
,        valuex: "string_value"
,        display_name: "string_value"
,        description: "string_value"
,        device_values: [{}]
,        parent_id: "string_value"
,        default_value: "string_value"
,        id: "string_value"
,        type: "string_value"
,        values_enum_db: "string_value"
}]
        devicelistCombined: "string_value"
        commands: [{        index: "integer_value"
,        parent_name: "string_value"
,        id: "string_value"
,        command: "string_value"
,        parent_id: "string_value"
}]
        variables: [{        parent_name: "string_value"
,        name: "string_value"
,        valuex: "string_value"
,        display_name: "string_value"
,        description: "string_value"
,        parent_id: "string_value"
,        required: "boolean_value"
,        default_value: "string_value"
,        id: "string_value"
,        type: "string_value"
,        values_enum_db: "string_value"
,        values_enum: ["string_value1","string_value2"]
}]
        slack_profile: "admin_slack_profile"
        scheduleDetail: "Scheduled at next polling interval"
        last_updated_time: "1576886635"
        tenant_id: "07f8d0a3-4c80-41d9-a7f2-3ebe07b21951"
        mail_export: "false"
        template_file: "variable_audit1.csv"
        send_report_only_when_diff: "false"
        id: "02640332-1e11-4f61-a17f-1f28bbb18fcc"
        mail_profile: "admin_mail_profile"
        slack_export: "false"
        isDefaultSchedule: "true"
        name: "variable1"
        devicelist: "1.1.1.1-1.1.1.2,1.1.1.3-1.1.1.4"
        description: "Internal audit template"
        ignoresysuserpassword: "false"
        template_create_user: "userfirstname.lastname@company.com"
        device_groups_db: "Dev1,Dev3"
        scheduleInfo: {        scheduleTimesEpoch: "string_value"
,        parent_name: "string_value"
,        daily_time: "string_value"
,        recurrenceOptions: "string_value"
,        id: "string_value"
,        recurrence_type: "string_value"
,        tz_offset: "integer_value"
,        parent_id: "string_value"
}
        preview_commands: ["string_value1","string_value2"]
        device_groups: "ARRAY(0x2c9ffbc)"
        devices: "ARRAY(0x2cac04c)"

  getns_configtemplateResponse:
    type: object
    required:
      - ns_configtemplate
    properties:
      ns_configtemplate:
        $ref: '#/definitions/ns_configtemplate'
    title: getns_configtemplateResponse
    example:
      ns_configtemplate:
        to_be_exported: "false"
        variable_vals: [{        device_values_mapping: "string_value"
,        parent_name: "string_value"
,        value: "string_value"
,        name: "string_value"
,        valuex: "string_value"
,        display_name: "string_value"
,        description: "string_value"
,        device_values: [{}]
,        parent_id: "string_value"
,        default_value: "string_value"
,        id: "string_value"
,        type: "string_value"
,        values_enum_db: "string_value"
}]
        devicelistCombined: "string_value"
        commands: [{        index: "integer_value"
,        parent_name: "string_value"
,        id: "string_value"
,        command: "string_value"
,        parent_id: "string_value"
}]
        variables: [{        parent_name: "string_value"
,        name: "string_value"
,        valuex: "string_value"
,        display_name: "string_value"
,        description: "string_value"
,        parent_id: "string_value"
,        required: "boolean_value"
,        default_value: "string_value"
,        id: "string_value"
,        type: "string_value"
,        values_enum_db: "string_value"
,        values_enum: ["string_value1","string_value2"]
}]
        slack_profile: "admin_slack_profile"
        scheduleDetail: "Scheduled at next polling interval"
        last_updated_time: "1576886635"
        tenant_id: "07f8d0a3-4c80-41d9-a7f2-3ebe07b21951"
        mail_export: "false"
        template_file: "variable_audit1.csv"
        send_report_only_when_diff: "false"
        id: "02640332-1e11-4f61-a17f-1f28bbb18fcc"
        mail_profile: "admin_mail_profile"
        slack_export: "false"
        isDefaultSchedule: "true"
        name: "variable1"
        devicelist: "1.1.1.1-1.1.1.2,1.1.1.3-1.1.1.4"
        description: "Internal audit template"
        ignoresysuserpassword: "false"
        template_create_user: "userfirstname.lastname@company.com"
        device_groups_db: "Dev1,Dev3"
        scheduleInfo: {        scheduleTimesEpoch: "string_value"
,        parent_name: "string_value"
,        daily_time: "string_value"
,        recurrenceOptions: "string_value"
,        id: "string_value"
,        recurrence_type: "string_value"
,        tz_offset: "integer_value"
,        parent_id: "string_value"
}
        preview_commands: ["string_value1","string_value2"]
        device_groups: "ARRAY(0x2c9ffbc)"
        devices: "ARRAY(0x2cac04c)"

  getns_configtemplatesResponse:
    type: object
    required:
      - ns_configtemplate
    properties:
      ns_configtemplate:
        type: array
        items:
          $ref: '#/definitions/ns_configtemplate'
    title: getns_configtemplatesResponse
    example:
      ns_configtemplate:
        to_be_exported: "false"
        variable_vals: [{        device_values_mapping: "string_value"
,        parent_name: "string_value"
,        value: "string_value"
,        name: "string_value"
,        valuex: "string_value"
,        display_name: "string_value"
,        description: "string_value"
,        device_values: [{}]
,        parent_id: "string_value"
,        default_value: "string_value"
,        id: "string_value"
,        type: "string_value"
,        values_enum_db: "string_value"
}]
        devicelistCombined: "string_value"
        commands: [{        index: "integer_value"
,        parent_name: "string_value"
,        id: "string_value"
,        command: "string_value"
,        parent_id: "string_value"
}]
        variables: [{        parent_name: "string_value"
,        name: "string_value"
,        valuex: "string_value"
,        display_name: "string_value"
,        description: "string_value"
,        parent_id: "string_value"
,        required: "boolean_value"
,        default_value: "string_value"
,        id: "string_value"
,        type: "string_value"
,        values_enum_db: "string_value"
,        values_enum: ["string_value1","string_value2"]
}]
        slack_profile: "admin_slack_profile"
        scheduleDetail: "Scheduled at next polling interval"
        last_updated_time: "1576886635"
        tenant_id: "07f8d0a3-4c80-41d9-a7f2-3ebe07b21951"
        mail_export: "false"
        template_file: "variable_audit1.csv"
        send_report_only_when_diff: "false"
        id: "02640332-1e11-4f61-a17f-1f28bbb18fcc"
        mail_profile: "admin_mail_profile"
        slack_export: "false"
        isDefaultSchedule: "true"
        name: "variable1"
        devicelist: "1.1.1.1-1.1.1.2,1.1.1.3-1.1.1.4"
        description: "Internal audit template"
        ignoresysuserpassword: "false"
        template_create_user: "userfirstname.lastname@company.com"
        device_groups_db: "Dev1,Dev3"
        scheduleInfo: {        scheduleTimesEpoch: "string_value"
,        parent_name: "string_value"
,        daily_time: "string_value"
,        recurrenceOptions: "string_value"
,        id: "string_value"
,        recurrence_type: "string_value"
,        tz_offset: "integer_value"
,        parent_id: "string_value"
}
        preview_commands: ["string_value1","string_value2"]
        device_groups: "ARRAY(0x2c9ffbc)"
        devices: "ARRAY(0x2cac04c)"

  modifyns_configtemplateRequest:
    type: object
    required:
      - ns_configtemplate
    properties:
      ns_configtemplate:
        $ref: '#/definitions/ns_configtemplate_readwrite'
    title: modifyns_configtemplateRequest
    example:
      ns_configtemplate:
        to_be_exported: "false"
        variable_vals: [{        parent_name: "string_value"
,        value: "string_value"
,        name: "string_value"
,        valuex: "string_value"
,        display_name: "string_value"
,        description: "string_value"
,        device_values: [{        value: "string_value"
,        id: "string_value"
,        valuex: "string_value"
,        device_group: "string_value"
,        device: "string_value"
}]
,        parent_id: "string_value"
,        default_value: "string_value"
,        id: "string_value"
,        type: "string_value"
,        values_enum_db: "string_value"
}]
        commands: [{        parent_name: "string_value"
,        id: "string_value"
,        command: "string_value"
,        parent_id: "string_value"
}]
        variables: [{        parent_name: "string_value"
,        name: "string_value"
,        valuex: "string_value"
,        display_name: "string_value"
,        description: "string_value"
,        parent_id: "string_value"
,        required: "boolean_value"
,        default_value: "string_value"
,        id: "string_value"
,        type: "string_value"
,        values_enum_db: "string_value"
,        values_enum: ["string_value1","string_value2"]
}]
        slack_profile: "admin_slack_profile"
        mail_export: "false"
        template_file: "variable_audit1.csv"
        send_report_only_when_diff: "false"
        mail_profile: "admin_mail_profile"
        slack_export: "false"
        isDefaultSchedule: "true"
        name: "variable1"
        description: "Internal audit template"
        ignoresysuserpassword: "false"
        device_groups_db: "Dev1,Dev3"
        scheduleInfo: {        scheduleTimesEpoch: "string_value"
,        daily_time: "string_value"
,        recurrenceOptions: "string_value"
,        id: "string_value"
,        recurrence_type: "string_value"
,        tz_offset: "integer_value"
}
        preview_commands: ["string_value1","string_value2"]
        device_groups: "ARRAY(0x2c9ffbc)"
        devices: "ARRAY(0x2cac04c)"

  modifyns_configtemplateResponse:
    type: object
    required:
      - ns_configtemplate
    properties:
      ns_configtemplate:
        $ref: '#/definitions/ns_configtemplate'
    title: modifyns_configtemplateResponse
    example:
      ns_configtemplate:
        to_be_exported: "false"
        variable_vals: [{        device_values_mapping: "string_value"
,        parent_name: "string_value"
,        value: "string_value"
,        name: "string_value"
,        valuex: "string_value"
,        display_name: "string_value"
,        description: "string_value"
,        device_values: [{}]
,        parent_id: "string_value"
,        default_value: "string_value"
,        id: "string_value"
,        type: "string_value"
,        values_enum_db: "string_value"
}]
        devicelistCombined: "string_value"
        commands: [{        index: "integer_value"
,        parent_name: "string_value"
,        id: "string_value"
,        command: "string_value"
,        parent_id: "string_value"
}]
        variables: [{        parent_name: "string_value"
,        name: "string_value"
,        valuex: "string_value"
,        display_name: "string_value"
,        description: "string_value"
,        parent_id: "string_value"
,        required: "boolean_value"
,        default_value: "string_value"
,        id: "string_value"
,        type: "string_value"
,        values_enum_db: "string_value"
,        values_enum: ["string_value1","string_value2"]
}]
        slack_profile: "admin_slack_profile"
        scheduleDetail: "Scheduled at next polling interval"
        last_updated_time: "1576886635"
        tenant_id: "07f8d0a3-4c80-41d9-a7f2-3ebe07b21951"
        mail_export: "false"
        template_file: "variable_audit1.csv"
        send_report_only_when_diff: "false"
        id: "02640332-1e11-4f61-a17f-1f28bbb18fcc"
        mail_profile: "admin_mail_profile"
        slack_export: "false"
        isDefaultSchedule: "true"
        name: "variable1"
        devicelist: "1.1.1.1-1.1.1.2,1.1.1.3-1.1.1.4"
        description: "Internal audit template"
        ignoresysuserpassword: "false"
        template_create_user: "userfirstname.lastname@company.com"
        device_groups_db: "Dev1,Dev3"
        scheduleInfo: {        scheduleTimesEpoch: "string_value"
,        parent_name: "string_value"
,        daily_time: "string_value"
,        recurrenceOptions: "string_value"
,        id: "string_value"
,        recurrence_type: "string_value"
,        tz_offset: "integer_value"
,        parent_id: "string_value"
}
        preview_commands: ["string_value1","string_value2"]
        device_groups: "ARRAY(0x2c9ffbc)"
        devices: "ARRAY(0x2cac04c)"

  ns_configtemplate_readwrite:
    type: object
    properties:
      to_be_exported:
        description: "Setting for enabling/disabling config audit diff report"
        type: boolean
        format: boolean
      variable_vals:
        type: array
        items:
          $ref: '#/definitions/variable_values_readwrite'
      commands:
        type: array
        items:
          $ref: '#/definitions/ns_command_readwrite'
      variables:
        type: array
        items:
          $ref: '#/definitions/config_variable_readwrite'
      slack_profile:
        description: "Slack profile name to send slack notification."
        type: string
        format: string
        minLength: 1
        maxLength: 255
      mail_export:
        description: "Setting for enabling/disabling config audit diff report for mail export"
        type: boolean
        format: boolean
      template_file:
        description: "CSV file for importing variables"
        type: string
        format: string
      send_report_only_when_diff:
        description: "Send notification report only when there is a diff"
        type: boolean
        format: boolean
      mail_profile:
        description: "Mail profile name to send notification mail."
        type: string
        format: string
        minLength: 1
        maxLength: 255
      slack_export:
        description: "Setting for enabling/disabling config audit diff report for slack export"
        type: boolean
        format: boolean
      isDefaultSchedule:
        description: "Scheduled specification for template or default polling interval"
        type: boolean
        format: boolean
      name:
        description: "Name of the configuration template"
        type: string
        format: string
        minLength: 1
        maxLength: 128
      description:
        description: "Template Description"
        type: string
        format: string
        minLength: 1
        maxLength: 128
      ignoresysuserpassword:
        description: "When set to true, ignores password difference in diff command output"
        type: boolean
        format: boolean
      device_groups_db:
        description: "Device Groups List Comma separated to store in DB"
        type: string
        format: string
      scheduleInfo:
        $ref: '#/definitions/ns_configtemplate_scheduler_readwrite'
      preview_commands:
        description: "Preview of list of commands"
        type: array
        items:
          type: string
          format: string
      device_groups:
        description: "Device Group Array for which audit template is added"
        type: array
        items:
          type: string
          format: string
      devices:
        description: "List of NetScaler IP Address"
        type: array
        items:
          type: string
          format: IP Address

  ns_configtemplate:
    allOf:
      -
        properties:
          id:
            description: Id is system generated key for all the system users
            type: string
            format: uuid
          scheduleDetail:
             description: "Schedule Detail"
             type: string
             format: string
          last_updated_time:
             description: "Last Updated Time"
             type: integer
             format: int32
          tenant_id:
             description: "Tenant Id"
             type: string
             format: uuid
             minLength: 1
             maxLength: 128
          template_create_user:
             description: "User who created the template"
             type: string
             format: string
             minLength: 1
             maxLength: 128
      - $ref: '#/definitions/ns_configtemplate_readwrite'

  ns_command_readwrite:
    type: object
    properties:
      parent_name:
        type: string
        format: string
      command:
        description: "NetScaler Command"
        type: string
        format: string
      parent_id:
        type: string
        format: string

  ns_command:
    allOf:
      -
        properties:
          id:
            description: Id is system generated key
            type: string
            format: string
          index:
             description: "Command Index"
             type: integer
             format: int32
      - $ref: '#/definitions/ns_command_readwrite'

  ns_configtemplate_scheduler_readwrite:
    type: object
    properties:
      scheduleTimesEpoch:
        description: "Epoch times for scheduling the job"
        type: string
        format: int64
      daily_time:
        description: "Daily time details of scheduler"
        type: string
        format: string
      recurrenceOptions:
        description: "Comma separated recurrence options of job that is scheduled"
        type: string
        format: string
      recurrence_type:
        description: "Daily, Week or Monthly option"
        type: string
        format: string
        maxLength: 255
      tz_offset:
        description: "Time zone offset."
        type: integer
        format: int32

  ns_configtemplate_scheduler:
    allOf:
      -
        properties:
          id:
            description: Id is system generated key
            type: string
            format: uuid
      - $ref: '#/definitions/ns_configtemplate_scheduler_readwrite'

  variable_values_readwrite:
    type: object
    properties:
      parent_name:
        type: string
        format: string
      value:
        description: "Value of the Variable to be used for all device ips/groups"
        type: string
        format: string
      name:
        description: "Variable name"
        type: string
        format: string
        minLength: 1
        maxLength: 128
      valuex:
        description: "Secure Value of the Variable to be used for all device ips/groups"
        type: string
        format: password
      display_name:
        description: "Display name of configuration variable"
        type: string
        format: string
        minLength: 1
        maxLength: 1024
      description:
        description: "Description of configuration variable"
        type: string
        format: string
        minLength: 1
        maxLength: 1024
      device_values:
        type: array
        items:
          $ref: '#/definitions/device_values_map_readwrite'
      parent_id:
        type: string
        format: string
      default_value:
        description: "Default Value of configuration variable"
        type: string
        format: string
      type:
        description: "Type of Variable"
        type: string
        format: string
        minLength: 1
        maxLength: 64
      values_enum_db:
        description: "Comma separated list of possible values of variable"
        type: string
        format: string

  variable_values:
    allOf:
      -
        properties:
          id:
            type: string
            format: string
      - $ref: '#/definitions/variable_values_readwrite'

  device_values_map_readwrite:
    type: object
    properties:
      value:
        description: "Value of the Variable to be used for device ip/group"
        type: string
        format: string
      valuex:
        description: "Secure Value of the Variable to be used for device ip/group"
        type: string
        format: password
      device_group:
        description: "Device Group for which value is to be defined"
        type: string
        format: string
      device:
        description: "IP Address for this device"
        type: string
        format: ipaddress

  device_values_map:
    allOf:
      -
        properties:
          id:
            description: Id is system generated key for all the device value mapping
            type: string
            format: uuid
          parent_name:
             description: "Parent Name"
             type: string
             format: string
          parent_id:
             description: "Parent ID"
             type: string
             format: uuid
      - $ref: '#/definitions/device_values_map_readwrite'

  config_variable_readwrite:
    type: object
    properties:
      parent_name:
        description: "Parent name of config variable"
        type: string
        format: string
      name:
        description: "Variable name"
        type: string
        format: string
        minLength: 1
        maxLength: 128
      valuex:
        description: "Secure Value of the Variable to be used for all device ips/groups"
        type: string
        format: password
      display_name:
        description: "Display name of configuration variable"
        type: string
        format: string
        minLength: 1
        maxLength: 1024
      description:
        description: "Description of configuration variable"
        type: string
        format: string
        minLength: 1
        maxLength: 1024
      parent_id:
        description: "Parent Id of config variable"
        type: string
        format: uuid
      required:
        description: "If it is required argument for command then true else false."
        type: boolean
        format: boolean
      default_value:
        description: "Default Value of configuration variable"
        type: string
        format: string
      type:
        description: "Type of Variable Text Field, Numeric Text Field, Choice, File, IP Addrss Field, Password Field"
        type: string
        format: string
        minLength: 1
        maxLength: 64
      values_enum_db:
        description: "Comma separated list of possible values of variable"
        type: string
        format: string
      values_enum:
        description: "Possible Values values for choice type variable"
        type: array
        items:
          type: string
          format: string

  config_variable:
    allOf:
      -
        properties:
          id:
            description: Id is system generated key for all config variable
            type: string
            format: uuid
      - $ref: '#/definitions/config_variable_readwrite'

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