openapi: 3.0.3
info:
  title: NetScaler NextGen API (preview)
  x-netscaler-nextgen-doc: true
  description: NetScaler NextGen API
  version: 0.1.10
  contact:
    name: NetScaler Team
    url: https://www.netscaler.com
    email: netscaler_support@cloud.com
servers:
  - url: https://{NetScaler-ip}/mgmt/api/nextgen/v1
    variables:
      NetScaler-ip:
        default: <NetScaler IP>

tags:
  - name: Authentication
    description: All API operations related to Authentication
  - name: Applications
    description: All API Operations related to Applications
  - name: Frontends
    description: All API Operations related to Application Frontends
  - name: Backends
    description: All API Operations related to Application Backends
  - name: Routes
    description: All API Operations related to Application Routes
  - name: Certificates
    description: All API Operations related to Certificates
  - name: Filters Value Sets
    description: All API Operations related to Filters Value Sets
  - name: RBAC
    description: All API Operations related to RBAC
paths:
  /login:
    post:
      tags:
        - Authentication
      summary: Login request
      description: Log on to NetScaler Appliance. Sets `sessionid` in cookie on success or error otherwise.
      operationId: Login
      requestBody:
        description: The request payload for logging in to NetScaler Appliance.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LoginRequest"
      responses:
        '200':
            description: Successful response for login request. The session ID is set in a cookie named `sessionid`. You need to include this cookie in subsequent requests.
            headers:
              Set-Cookie:
                schema:
                  type: string
                  example: sessionid=<cookie_string>; path=/mgmt/api/nextgen/v1
        '400':
          description: Bad request for log in request. Please check URL, request headers or request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot log in.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
              example:
                errorcode: 1103
                errormessage: Invalid username or password
                details: []
        '406':
          description: Invalid `Accept` header. Cannot log in.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot log in.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot log in.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot log in.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

  /logout:
    post:
      tags:
        - Authentication
      summary: Logout request
      description: Log out of NetScaler Appliance. Deletes `sessionid` from cookie on success if it is present.
      operationId: Logout
      responses:
        '200':
            description: Successful response for logout request
        '400':
          description: Bad request for log out request. Please check URL, request headers or request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot log out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot log out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot log out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot log out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot log out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

  /applications:
    get:
      tags:
        - Applications
      summary: Lists all applications.
      description: Returns list of applications.
      operationId: ListApplications
      parameters:
        - $ref: '#/components/parameters/stateQueryParam'
      responses:
        '200':
          description: Successful response for retrieving a list of applications
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Applications"
              examples:
                list_of_apps:
                    $ref: '#/components/examples/list_of_apps_response'
        '400':
          description: Bad request in URL or headers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access for listing Applications.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header.  Cannot list applications.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot list applications.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot list applications.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

    post:
      summary: Creates a new application.
      description: |
        This API creates a new application. If an application with the same name or same (virtual ip, port) exists
        this API will return an error.
      tags:
        - Applications
      operationId: AddApplication
      requestBody:
        description: The request payload for creating an application.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Application"
            examples:
              simple_http_lb_app:
                $ref: '#/components/examples/simple_http_lb_app_with_defaults_request'
              simple_http_lb_app2:
                $ref: '#/components/examples/simple_http_lb_app_with_defaults_request2'
              simple_https_lb_app_with_defaults:
                $ref: '#/components/examples/simple_https_lb_app_with_defaults_request'
              simple_https_lb_app_with_defaults_2:
                $ref: '#/components/examples/simple_https_lb_app_with_defaults_request2'
              simple_https_lb_app_with_multiple_listeners:
                $ref: '#/components/examples/simple_https_lb_app_with_multiple_listeners'
              lb_app_with_lb_settings:
                $ref: '#/components/examples/lb_app_with_settings_request'
              cs_app_default_backend:
                    $ref: '#/components/examples/cs_app_default_backend'
              simple_cs_application:
                $ref: '#/components/examples/simple_cs_application_request'
              cs_application_with_multiple_frontends_1:
                $ref: '#/components/examples/cs_application_with_multiple_frontends_request1'
              cs_application_with_multiple_frontends_2:
                $ref: '#/components/examples/cs_application_with_multiple_frontends_request2'
      responses:
        '201':
            description: Successful response for creating an application
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/Application'
                examples:
                  simple_http_lb_app:
                    $ref: '#/components/examples/simple_http_lb_app_with_defaults_response'
                  simple_http_lb_app2:
                    $ref: '#/components/examples/simple_http_lb_app_with_defaults_response2'
                  simple_https_lb_app_with_defaults:
                     $ref: '#/components/examples/simple_https_lb_app_with_defaults_response'
                  simple_https_lb_app_with_defaults_2:
                     $ref: '#/components/examples/simple_https_lb_app_with_defaults_response2'
                  simple_https_lb_app_with_multiple_listeners:
                    $ref: '#/components/examples/simple_https_lb_app_with_multiple_listeners'
                  lb_app_with_settings:
                    $ref: '#/components/examples/lb_app_with_settings_response'
                  cs_app_default_backend:
                    $ref: '#/components/examples/cs_app_default_backend'
                  simple_cs_application:
                    $ref: '#/components/examples/simple_cs_application_response'
                  cs_application_with_multiple_frontends:
                    $ref: '#/components/examples/cs_application_with_multiple_frontends_response'
        '400':
          description: Bad request for creating an application. Please check URL, request headers or request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access for creating an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot create a new application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot create a new application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot create a new application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot create a new application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot create a new application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

  /applications/{application-name}:
    get:
      tags:
        - Applications
      operationId: GetApplication
      summary: Retrieves the details of an application
      description: This API returns the details of an application by name.
      parameters:
        - $ref: "#/components/parameters/appNamePathParam"
        - $ref: '#/components/parameters/stateQueryParam'
        - $ref: '#/components/parameters/expandAppQueryParam'
      responses:
        '200':
          description: Successful response for retrieving an aplication's details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Application"
              examples:
                simple_http_lb_app:
                  $ref: '#/components/examples/simple_http_lb_app_with_defaults_response'
                simple_http_lb_app2:
                  $ref: '#/components/examples/simple_http_lb_app_with_defaults_response2'
                simple_https_lb_app_with_defaults:
                   $ref: '#/components/examples/simple_https_lb_app_with_defaults_response'
                simple_https_lb_app_with_defaults_2:
                   $ref: '#/components/examples/simple_https_lb_app_with_defaults_response2'
                simple_https_lb_app_with_multiple_listeners:
                  $ref: '#/components/examples/simple_https_lb_app_with_multiple_listeners'
                lb_app_with_settings:
                  $ref: '#/components/examples/lb_app_with_settings_response'
                cs_app_default_backend:
                  $ref: '#/components/examples/cs_app_default_backend_response'
                simple_cs_application:
                  $ref: '#/components/examples/simple_cs_application_response'
                cs_application_with_multiple_frontends:
                  $ref: '#/components/examples/cs_application_with_multiple_frontends_response'
        '400':
          description: Bad request for retrieving an application. Please check URL or request headers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access for retireving an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: The application is not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot retrieve the details of an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot retrieve the details of an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service internal error. Cannot retrieve the details of an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    post:
      tags:
        - Applications
      operationId: CreateOrUpdateApplication
      summary: Creates or Updates the desired state of an application.
      description: This API creates an application if it doesn't exist. If the application with the same name is found, then it is updated with the supplied desired state configuration.
      parameters:
        - $ref: "#/components/parameters/appNamePathParam"
      requestBody:
        description: The request payload for creating or updating an application.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Application"
            examples:
              simple_http_lb_app:
                $ref: '#/components/examples/simple_http_lb_app_with_defaults_request'
              simple_http_lb_app2:
                $ref: '#/components/examples/simple_http_lb_app_with_defaults_request2'
              simple_https_lb_app_with_defaults:
                $ref: '#/components/examples/simple_https_lb_app_with_defaults_request'
              simple_https_lb_app_with_defaults_2:
                $ref: '#/components/examples/simple_https_lb_app_with_defaults_request2'
              simple_https_lb_app_with_multiple_listeners:
                $ref: '#/components/examples/simple_https_lb_app_with_multiple_listeners'
              lb_app_with_lb_settings:
                $ref: '#/components/examples/lb_app_with_settings_request'
              cs_app_default_backend:
                $ref: '#/components/examples/cs_app_default_backend'
              simple_cs_application:
                $ref: '#/components/examples/simple_cs_application_request'
              cs_application_with_multiple_frontends_1:
                $ref: '#/components/examples/cs_application_with_multiple_frontends_request1'
              cs_application_with_multiple_frontends_2:
                $ref: '#/components/examples/cs_application_with_multiple_frontends_request2'
      responses:
        '200':
          description: Successful response to create or update application API.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Application"
              examples:
                simple_http_lb_app:
                  $ref: '#/components/examples/simple_http_lb_app_with_defaults_response'
                simple_http_lb_app2:
                  $ref: '#/components/examples/simple_http_lb_app_with_defaults_response2'
                simple_https_lb_app_with_defaults:
                   $ref: '#/components/examples/simple_https_lb_app_with_defaults_response'
                simple_https_lb_app_with_defaults_2:
                   $ref: '#/components/examples/simple_https_lb_app_with_defaults_response2'
                simple_https_lb_app_with_multiple_listeners:
                   $ref: '#/components/examples/simple_https_lb_app_with_multiple_listeners_response'
                lb_app_with_settings:
                  $ref: '#/components/examples/lb_app_with_settings_response'
                cs_app_default_backend:
                  $ref: '#/components/examples/cs_app_default_backend_response'
                simple_cs_application:
                  $ref: '#/components/examples/simple_cs_application_response'
                cs_application_with_multiple_frontends:
                  $ref: '#/components/examples/cs_application_with_multiple_frontends_response'
        '400':
          description: Bad request for creating or updating an application. Please check URL, request headers and body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access for creating/updating an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. . Cannot create or update an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot create or update an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot create or update an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot create or update an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service internal error. Cannot create or update an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    put:
      tags:
        - Applications
      operationId: UpdateApplication
      summary: Updates the desired state of an application.
      description: This API updates an existing application. This API returns an error if the application is not found.
      parameters:
        - $ref: "#/components/parameters/appNamePathParam"
      requestBody:
        description: The request payload for updating an application.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Application"
            examples:
              simple_http_lb_app:
                $ref: '#/components/examples/simple_http_lb_app_with_defaults_request'
              simple_http_lb_app2:
                $ref: '#/components/examples/simple_http_lb_app_with_defaults_request2'
              simple_https_lb_app_with_defaults:
                $ref: '#/components/examples/simple_https_lb_app_with_defaults_request'
              simple_https_lb_app_with_defaults_2:
                $ref: '#/components/examples/simple_https_lb_app_with_defaults_request2'
              simple_https_lb_app_with_multiple_listeners:
                $ref: '#/components/examples/simple_https_lb_app_with_multiple_listeners'
              lb_app_with_lb_settings:
                $ref: '#/components/examples/lb_app_with_settings_request'
              cs_app_default_backend:
                $ref: '#/components/examples/cs_app_default_backend'
              simple_cs_application:
                $ref: '#/components/examples/simple_cs_application_request'
              cs_application_with_multiple_frontends_1:
                $ref: '#/components/examples/cs_application_with_multiple_frontends_request1'
              cs_application_with_multiple_frontends_2:
                $ref: '#/components/examples/cs_application_with_multiple_frontends_request2'
      responses:
        '200':
          description: Successful response to update application API.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Application"
              examples:
                simple_http_lb_app:
                  $ref: '#/components/examples/simple_http_lb_app_with_defaults_response'
                simple_http_lb_app2:
                  $ref: '#/components/examples/simple_http_lb_app_with_defaults_response2'
                simple_https_lb_app_with_defaults:
                   $ref: '#/components/examples/simple_https_lb_app_with_defaults_response'
                simple_https_lb_app_with_defaults_2:
                   $ref: '#/components/examples/simple_https_lb_app_with_defaults_response2'
                simple_https_lb_app_with_multiple_listeners:
                   $ref: '#/components/examples/simple_https_lb_app_with_multiple_listeners_response'
                lb_app_with_settings:
                  $ref: '#/components/examples/lb_app_with_settings_response'
                cs_app_default_backend:
                  $ref: '#/components/examples/cs_app_default_backend_response'
                simple_cs_application:
                  $ref: '#/components/examples/simple_cs_application_response'
                cs_application_with_multiple_frontends:
                  $ref: '#/components/examples/cs_application_with_multiple_frontends_response'
        '400':
          description: Bad request for updating an application. Please check the URL, request headers and body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access for updating an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Application to be updated is not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot update the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot update the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot update the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot update the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot update the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

    delete:
      tags:
        - Applications
      operationId: DeleteApplication
      summary: Deletes an application
      description: Deletes an application. If the application to be deleted doesn't exist (already deleted), this API still returns success
      parameters:
        - $ref: "#/components/parameters/appNamePathParam"
      responses:
        '204':
          description: Application Successfully Deleted
        '400':
          description: Bad request for deleting an application. Please check the URL and headers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access for deleting an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot delete the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot delete the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot delete the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot delete the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

  /applications/{application-name}/configstatus:
    get:
      tags:
        - Applications
      summary: Get application's desired config progress status
      description: Returns application's desired config progress status
      operationId: GetApplicationConfigStatus
      parameters:
        - $ref: "#/components/parameters/appNamePathParam"
      responses:
        '200':
          description: Successful response for application config progress status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApplicationConfigStatus"
        '400':
          description: Bad request for retrieving config status of an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access to retrieve config status of an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Application not found. Cannot retrieve config status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot create a new application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot create a new application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot retrieve the status of the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
  /applications/{application-name}/health:
    get:
      tags:
        - Applications
      summary: Get application's health
      description: Returns application's health
      operationId: GetApplicationHealth
      parameters:
        - $ref: "#/components/parameters/appNamePathParam"
        - $ref: '#/components/parameters/expandAppQueryParam'
      responses:
        '200':
          description: Successful response for application config progress status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApplicationHealth"
              examples:
                simple_app_health:
                  $ref: '#/components/examples/simple_app_health'
                cs_app_simple_backend_health:
                  $ref: '#/components/examples/cs_app_simple_backend_health'
                cs_app_simple_frontend_health:
                  $ref: '#/components/examples/cs_app_simple_frontend_health'
                cs_app_health:
                  $ref: '#/components/examples/cs_app_health'
        '400':
          description: Bad request for retrieving config status of an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access to retrieve config status of an application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Application not found. Cannot retrieve config status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot create a new application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot create a new application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot retrieve the status of the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
  /applications/{application-name}/frontends:
    get:
      tags:
        - Frontends
      summary: Lists Frontends of an application. This includes the "_default" frontend.
      description: Returns list of an application's frontends.
      operationId: ListFrontends
      parameters:
        - $ref: "#/components/parameters/appNamePathParam"
        - $ref: '#/components/parameters/stateQueryParam'
        - $ref: '#/components/parameters/expandAppQueryParam'
      responses:
        '200':
          description: Successful response for retrieving a list of the application's frontends
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Frontends"
              examples:
                list_of_frontends:
                    $ref: '#/components/examples/list_of_frontends_response'
        '400':
          description: Bad request for retrieving a list of the application's frontends.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access to retrieving a list of the application's frontends.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Application not found. Cannot retrieve a list of the application's frontends.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'        
        '406':
            description: Invalid `Accept` header.  Cannot retrieve a list of the application's frontends.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
            description: Invalid `Content-type` header.  Cannot retrieve a list of the application's frontends.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot retrieve the frontends of the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

  /applications/{application-name}/frontends/{frontend-name}:
      get:
        tags:
          - Frontends
        operationId: GetFrontend
        summary: Retrieves the details of an application's frontend
        description: This API retrieves the details of an application's frontend.
        parameters:
          - $ref: "#/components/parameters/appNamePathParam"
          - name: frontend-name
            in: path
            description: Name of the Frontend for which retrieve the details.
            required: true
            schema:
              $ref: '#/components/schemas/name_data_type'
          - $ref: '#/components/parameters/stateQueryParam'
          - $ref: '#/components/parameters/expandAppQueryParam'

        responses:
          '200':
            description: Successful response for retrieving an aplication's frontend details
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Frontend"
                examples:
                  simple_frontend:
                    $ref: '#/components/examples/simple_frontend_response'
                  frontend_with_listeners:
                    $ref: '#/components/examples/frontend_with_listeners_response'
          '400':
            description: Bad request. Cannot retrieve an aplication's frontend details
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody400'
          '401':
            description: Unauthorized Access to retrieving an aplication's frontend details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody401'
          '404':
            description: Application or Frontend not found.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody404'
          '406':
            description: Invalid `Accept` header.  Cannot retrieve the details of a frontend..
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
          '415':
            description: Invalid `Content-type` header.  Cannot retrieve the details of a frontend..
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
          '500':
            description: Service Internal error. Cannot retrieve the details of a frontend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody500'
      put:
        tags:
          - Frontends
        operationId: UpdateFrontend
        summary: Updates the desired state of an application's frontend.
        description: This API updates an existing application's frontend. This API returns an error if the application frontend is not found.
        parameters:
          - $ref: "#/components/parameters/appNamePathParam"
          - name: frontend-name
            in: path
            description: Name of the frontend to update.
            required: true
            schema:
              $ref: '#/components/schemas/name_data_type'
        requestBody:
          description: The request payload for updating an application frontend.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Frontend"
              examples:
                  simple_frontend:
                    $ref: '#/components/examples/simple_frontend_request'
                  frontend_with_listeners:
                    $ref: '#/components/examples/frontend_with_listeners_request'
        responses:
          '200':
            description: Successful response to update an application's frontend API.
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Frontend"
                examples:
                  simple_frontend:
                    $ref: '#/components/examples/simple_frontend_response'
                  frontend_with_listeners:
                    $ref: '#/components/examples/frontend_with_listeners_response'
          '400':
            description: Bad request. Cannot update an application's frontend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody400'
          '401':
            description: Unauthorized Access. Cannot update an application's frontend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody401'
          '404':
            description: Application or Frontend not found. Cannot update an application's frontend
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody404'
          '406':
            description: Invalid `Accept` header. Cannot update an application's frontend
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
          '409':
            description: Conflict. Cannot update an application's frontend
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody409'
          '415':
            description: Invalid `Content-type` header. Cannot update an application's frontend
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
          '422':
            description: Validation failure. Cannot update an application's frontend
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody422'
          '500':
            description: Service Internal error. Cannot update an application frontend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody500'
      delete:
        tags:
          - Frontends
        operationId: DeleteFrontend
        summary: Deletes an application frontend
        description: Deletes an application's frontend. If the application's frontend to be deleted doesn't exist (already deleted), this API still returns success.
          If the frontend to be deleted is the last frontend of the application, this API will result in an error.
        parameters:
          - $ref: "#/components/parameters/appNamePathParam"
          - name: frontend-name
            in: path
            description: Name of the frontend to delete.
            required: true
            schema:
              $ref: '#/components/schemas/name_data_type'
        responses:
          '204':
            description: Application Frontend Successfully Deleted
          '400':
            description: Bad request. Cannot delete an application's Frontend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody400'
          '401':
            description: Unauthorized Access. Cannot delete an application's Frontend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody401'
          '404':
            description: Application or Frontend not found. Cannot delete an application's Frontend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody404'
          '406':
            description: Invalid `Accept` header. Cannot delete an application's Frontend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
          '409':
            description: Conflict. Cannot delete an application's Frontend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody409'
          '415':
            description: Invalid `Content-type` header. Cannot delete an application's Frontend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
          '500':
            description: Service Internal error. Cannot delete an application frontend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody500'


  /applications/{application-name}/frontends/{frontend-name}/listeners:
    get:
      tags:
        - Frontends
      summary: Lists Listeners of an application's frontend. This includes the "_default" listener.
      description: Returns list of listeners of an application's frontends.
      operationId: ListListeners
      parameters:
        - $ref: "#/components/parameters/appNamePathParam"
        - name: frontend-name
          in: path
          description: Name of the frontend for which to list the listeners.
          required: true
          schema:
            $ref: '#/components/schemas/name_data_type'
        - $ref: '#/components/parameters/stateQueryParam'
        - $ref: '#/components/parameters/expandAppQueryParam'

      responses:
        '200':
          description: Successful response for retrieving a list of the listeners for an application's frontend
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Listeners"
              examples:
                list_of_listeners:
                    $ref: '#/components/examples/list_of_listeners_response'
        '400':
          description: Bad request. Cannot retrieve a list of the listeners for an application's frontend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot retrieve a list of the listeners for an application's frontend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Application or Frontend not found. Cannot retrieve a list of the listeners for an application's frontend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot list the listeners of an application frontend..
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot list the listeners of an application frontend..
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot list the listeners of an application frontend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

  /applications/{application-name}/frontends/{frontend-name}/listeners/{listener-name}:
      get:
        tags:
          - Frontends
        operationId: GetListener
        summary: Retrieves the details of a frontend's listener
        description: This API retrieves the details of a frontend's listener.
        parameters:
          - $ref: "#/components/parameters/appNamePathParam"
          - name: frontend-name
            in: path
            description: Name of the frontend for which to retrieve a listener's details.
            required: true
            schema:
              $ref: '#/components/schemas/name_data_type'
          - name: listener-name
            in: path
            description: Name of the listener for which to retrieve the details.
            required: true
            schema:
              $ref: '#/components/schemas/name_data_type'
          - $ref: '#/components/parameters/stateQueryParam'
          - $ref: '#/components/parameters/expandAppQueryParam'

        responses:
          '200':
            description: Successful response for retrieving an frontend's listener details
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Listener"
                examples:
                  simple_listener:
                    $ref: '#/components/examples/simple_listener_response'
          '400':
            description: Bad request. Cannot retrieve a frontend's listener details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody400'
          '401':
            description: Unauthorized Access. Cannot retrieve a frontend's listener details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody401'
          '404':
            description: Application, Frontend or Listener not found. Cannot retrieve a frontend's listener details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody404'
          '406':
            description: Invalid `Accept` header.  Cannot retrieve a frontend's listener details..
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
          '415':
            description: Invalid `Content-type` header.  Cannot retrieve a frontend's listener details..
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
          '500':
            description: Service Internal error. Cannot retrieve a frontend's listener details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody500'
      put:
        tags:
          - Frontends
        operationId: UpdateListener
        summary: Updates the desired state of a frontend's listener.
        description: This API updates an existing frontend's listener. This API returns an error if the frontend listener is not found.
        parameters:
          - $ref: "#/components/parameters/appNamePathParam"
          - name: frontend-name
            in: path
            description: Name of the frontend for which to update a listener.
            required: true
            schema:
              $ref: '#/components/schemas/name_data_type'
          - name: listener-name
            in: path
            description: Name of the listener to update.
            required: true
            schema:
              $ref: '#/components/schemas/name_data_type'
        requestBody:
          description: The request payload for updating a listener.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Listener"
              examples:
                  simple_listener:
                    $ref: '#/components/examples/simple_listener_request'
        responses:
          '200':
            description: Successful response to update a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Listener"
                examples:
                  simple_listener:
                    $ref: '#/components/examples/simple_listener_response'
          '400':
            description: Bad request. Cannot update a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody400'
          '401':
            description: Unauthorized Access. Cannot update a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody401'
          '404':
            description: Application, Frontend or Listener not found. Cannot update a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody404'
          '406':
            description: Invalid `Accept` header.  Cannot update a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
          '409':
            description: Conflict.  Cannot update a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody409'
          '415':
            description: Invalid `Content-type` header.  Cannot update a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
          '422':
            description: Validation failure.  Cannot update a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody422'
          '500':
            description: Service Internal error. Cannot update a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody500'
      delete:
        tags:
          - Frontends
        operationId: DeleteListener
        summary: Deletes an frontend listener
        description: Deletes an frontend's listener. If the frontend's listener to be deleted doesn't exist (already deleted), this API still returns success.
          If the listener to be deleted is the last listener of the application, this API will result in an error.
        parameters:
          - $ref: "#/components/parameters/appNamePathParam"
          - name: frontend-name
            in: path
            description: Name of the frontend for which to delete a listener.
            required: true
            schema:
              $ref: '#/components/schemas/name_data_type'
          - name: listener-name
            in: path
            description: Name of the listener to delete.
            required: true
            schema:
              $ref: '#/components/schemas/name_data_type'
        responses:
          '204':
            description: Frontend Listener Successfully Deleted.
          '400':
            description: Bad request. Cannot delete a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody400'
          '401':
            description: Unauthorized Access. Cannot delete a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody401'
          '404':
            description: Application or Frontend not found. Cannot delete a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody404'
          '406':
            description: Invalid `Accept` header. Cannot delete a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
          '409':
            description: Conflict. Cannot delete a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody409'
          '415':
            description: Invalid `Content-type` header. Cannot delete a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
          '500':
            description: Service Internal error. Cannot delete a Frontend's listener.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody500'

  /applications/{application-name}/backends:
    get:
      tags:
        - Backends
      summary: Lists Backends of an application. This includes the "_default" backend.
      description: Returns list of an application's backends.
      operationId: ListBackends
      parameters:
        - $ref: "#/components/parameters/appNamePathParam"
        - $ref: '#/components/parameters/stateQueryParam'
        - $ref: '#/components/parameters/expandAppQueryParam'

      responses:
        '200':
          description: Successful response for retrieving a list of the application's backends
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Backends"
              examples:
                list_of_backends:
                    $ref: '#/components/examples/list_of_backends_response'
        '400':
          description: Bad request. Cannot retrieve a list of the application's backends.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot retrieve a list of the application's backends.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Application not found. Cannot retrieve a list of the application's backends.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot retrieve a list of the application's backends..
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot retrieve a list of the application's backends..
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot retrieve a list of the application's backends.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

  /applications/{application-name}/backends/{backend-name}:
      get:
        tags:
          - Backends
        operationId: GetBackend
        summary: Retrieves the details of an application's backend
        description: This API retrieves the details of an application's backend.
        parameters:
          - $ref: "#/components/parameters/appNamePathParam"
          - name: backend-name
            in: path
            description: Backend ID
            required: true
            schema:
              $ref: '#/components/schemas/name_data_type'
          - $ref: '#/components/parameters/stateQueryParam'
          - $ref: '#/components/parameters/expandAppQueryParam'

        responses:
          '200':
            description: Successful response for retrieving an aplication's backend details
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Backend"
                examples:
                  simple_backend:
                    $ref: '#/components/examples/simple_backend_response'
          '400':
            description: Bad request. Cannot retrieve an aplication's backend details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody400'
          '401':
            description: Unauthorized Access. Cannot retrieve an aplication's backend details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody401'
          '404':
            description: Application or Backend not found. Cannot retrieve an aplication's backend details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody404'
          '406':
            description: Invalid `Accept` header. Cannot retrieve an aplication's backend details..
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
          '415':
            description: Invalid `Content-type` header. Cannot retrieve an aplication's backend details..
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
          '500':
            description: Service Internal error. Cannot retrieve an aplication's backend details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody500'
      put:
        tags:
          - Backends
        operationId: UpdateBackend
        summary: Updates the desired state of an application's backend.
        description: This API updates an existing application's backend. This API returns an error if the application backend is not found.
        parameters:
          - $ref: "#/components/parameters/appNamePathParam"
          - name: backend-name
            in: path
            description: Name of the backend to update.
            required: true
            schema:
              $ref: '#/components/schemas/name_data_type'
        requestBody:
          description: The request payload for updating an application backend.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Backend"
              examples:
                  simple_backend:
                    $ref: '#/components/examples/simple_backend_request'
        responses:
          '200':
            description: Successful response to update an application's backend.
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Backend"
                examples:
                  simple_backend:
                    $ref: '#/components/examples/simple_backend_response'
          '400':
            description: Bad request. Cannot update an application's backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody400'
          '401':
            description: Unauthorized Access. Cannot update an application's backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody401'
          '404':
            description: Application or Backend not found. Cannot update an application's backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody404'
          '406':
            description: Invalid `Accept` header. Cannot update an application's backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
          '409':
            description: Conflict. Cannot update an application's backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody409'
          '415':
            description: Invalid `Content-type` header. Cannot update an application's backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
          '422':
            description: Validation failure. Cannot update an application's backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody422'
          '500':
            description: Service Internal error. Cannot update an application's backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody500'
      delete:
        tags:
          - Backends
        operationId: DeleteBackend
        summary: Deletes an application backend
        description: Deletes an application's backend. If the application's backend to be deleted doesn't exist (already deleted), this API still returns success.
          If the backend to be deleted is the last backend of the application, this API will result in an error.
        parameters:
          - $ref: "#/components/parameters/appNamePathParam"
          - name: backend-name
            in: path
            description: Name of the backend to delete.
            required: true
            schema:
              $ref: '#/components/schemas/name_data_type'
        responses:
          '204':
            description: Application Backend Successfully Deleted
          '400':
            description: Bad request. Cannot delete an application backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody400'
          '401':
            description: Unauthorized Access. Cannot delete an application backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody401'
          '404':
            description: Application backend not found.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody404'
          '406':
            description: Invalid `Accept` header. Cannot delete an application backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
          '409':
            description: Conflict. Cannot delete an application backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody409'
          '415':
            description: Invalid `Content-type` header. Cannot delete an application backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
          '500':
            description: Service Internal error. Cannot delete an application backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody500'

  /applications/{application-name}/backends/{backend-name}/servers:
    get:
      tags:
        - Backends
      summary: Lists Servers of an application backend.
      description: This API returns the list of backend servers.
      operationId: ListServers
      parameters:
        - $ref: "#/components/parameters/appNamePathParam"
        - name: backend-name
          in: path
          description: Name of the backend for which to list the servers.
          required: true
          schema:
              $ref: '#/components/schemas/name_data_type'
        - name: ip
          in: query
          description: Server IP address
          schema:
              $ref: '#/components/schemas/ip_data_type'
        - name: fqdn
          in: query
          description: Server FQDN
          # required: true
          schema:
              $ref: '#/components/schemas/fqdn_data_type'
        - name: port
          in: query
          description: Port number
          schema:
              $ref: '#/components/schemas/port_data_type'
        - $ref: '#/components/parameters/stateQueryParam'
        - $ref: '#/components/parameters/expandAppQueryParam'

      responses:
        '200':
          description: |
            Successful response for retrieving a list of an application's backend servers, or the servers whose ip
            matches the query string.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Servers"
              examples:
                list_of_servers:
                  $ref: "#/components/examples/list_of_servers_response"
        '400':
          description: Bad request. Cannot retrieve the list of an application's backend servers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot retrieve the list of an application's backend servers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Application or Backend not found. Cannot retrieve the list of an application's backend servers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot retrieve the list of an application's backend servers..
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot retrieve the list of an application's backend servers..
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot retrieve the list of an application's backend servers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    post:
      summary: Creates a new server to an application backend.
      description: This API adds a new server to an application backend. If the backend has a server with the same ip/port, this API will return an error.
      tags:
        - Backends
      operationId: AddServer
      parameters:
        - $ref: "#/components/parameters/appNamePathParam"
        - name: backend-name
          in: path
          description: Name of the backend for which to create a server.
          required: true
          schema:
              $ref: '#/components/schemas/name_data_type'
      requestBody:
        description: The request payload for adding a server to an application backend.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Server"
            examples:
              simple_server:
                $ref: '#/components/examples/simple_server_request'
              server_with_port:
                $ref: '#/components/examples/server_with_port_request'
      responses:
        '201':
            description: Successful response for adding a new server to an application's backend
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/Server'
                examples:
                  simple_server:
                    $ref: '#/components/examples/simple_server_response'
                  server_with_port:
                    $ref: '#/components/examples/server_with_port_response'
        '400':
          description: Bad request. Cannot add a new server to an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot add a new server to an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Application or Backend not found. Cannot add a new server to an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot add a new server to an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot add a new server to an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot add a new server to an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot add a new server to an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot add a new server to an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    put:
      summary: Adds or Replaces all the servers of a backend.
      description: This API replaces all the servers of a backend with the supplied list of servers.
      tags:
        - Backends
      operationId: UpdateServers
      parameters:
        - $ref: "#/components/parameters/appNamePathParam"
        - name: backend-name
          in: path
          description: Name of the backend for which to add or update the servers.
          required: true
          schema:
              $ref: '#/components/schemas/name_data_type'
      requestBody:
        description: The request payload for adding or replacing the servers of an application backend.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ServersRequired"
            examples:
              list_of_servers:
                $ref: '#/components/examples/list_of_servers_request'

      responses:
        '200':
            description: Successful response for replacing all the servers of an application's backend
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/Servers'
                examples:
                  list_of_servers:
                    $ref: '#/components/examples/list_of_servers_response'
        '400':
          description: Bad request. Cannot add or replace the servers of an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot add or replace the servers of an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Application or Backend not found. Cannot add or replace the servers of an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
            description: Invalid `Accept` header. Cannot update an application's backend.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot update an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot update an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot update an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot add or replace the servers of an application's backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    delete:
      tags:
        - Backends
      operationId: DeleteServer
      summary: Deletes a backend server
      description: Deletes an application's backend server. If the server to be deleted doesn't exist (already deleted), this API still returns success.
        If the backend to be deleted is the last server of the application, this API will result in an error.
      parameters:
        - $ref: "#/components/parameters/appNamePathParam"
        - name: backend-name
          in: path
          description: Name of the backend for which to delete a server
          required: true
          schema:
            $ref: '#/components/schemas/name_data_type'
        - name: ip
          in: query
          description: IP address of the server to delete.
          schema:
              $ref: '#/components/schemas/ip_data_type'
        - name: fqdn
          in: query
          description: FQDN of the server to delete.
          schema:
              $ref: '#/components/schemas/fqdn_data_type'
        - name: port
          in: query
          description: Port number of the server to delete.
          required: true
          schema:
              $ref: '#/components/schemas/port_data_type'
      responses:
        '204':
          description: Application Backend servers successfully deleted.
        '400':
          description: Bad request. Cannot delete the servers of an application backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot delete the servers of an application backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Application or Backend not found. Cannot delete the servers of an application backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot delete the servers of an application backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot delete the servers of an application backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot delete the servers of an application backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot delete the servers of an application backend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

  /applications/{application-name}/routes:
    get:
      tags:
        - Routes
      summary: Lists Routes of an application
      description: Returns list of an application's routes.
      operationId: ListRoutes
      parameters:
        - $ref: '#/components/parameters/appNamePathParam'
        - $ref: '#/components/parameters/stateQueryParam'

      responses:
        '200':
          description: Successful response for retrieving a list of the application's routes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Routes"
              examples:
                list_of_routes:
                    $ref: '#/components/examples/list_of_routes_response'
        '400':
          description: Bad request. Cannot retrieve a list of the application's routes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot retrieve a list of the application's routes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Application not found. Cannot retrieve a list of the application's routes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot retrieve a list of the application's routes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot retrieve a list of the application's routes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot retrieve a list of the application's routes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    post:
      summary: Creates a new route for the application.
      description: This API adds a new route to an application. If an application has a route with the same name, this API will return an error.
      tags:
        - Routes
      operationId: AddRoute
      parameters:
        - $ref: '#/components/parameters/appNamePathParam'
      requestBody:
        description: The request payload for creating a new application route.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Route"
            examples:
              simple_route:
                $ref: '#/components/examples/simple_route_request'
      responses:
        '201':
            description: Successful response for adding a new route to an application
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/Route'
                examples:
                  simple_route:
                    $ref: '#/components/examples/simple_route_response'
        '400':
          description: Bad request. Cannot add a new route to the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot add a new route to the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Application not found. Cannot add a new route to the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot add a new route to the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot add a new route to the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot add a new route to the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot add a new route to the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot add a new route to the application.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

  /applications/{application-name}/routes/{route-name}:
      get:
        tags:
          - Routes
        operationId: GetRoute
        summary: Retrieves the details of an application's route
        description: This API retrieves the details of an application's route.
        parameters:
          - $ref: '#/components/parameters/appNamePathParam'
          - $ref: '#/components/parameters/routeNamePathParam'
          - $ref: '#/components/parameters/stateQueryParam'
        responses:
          '200':
            description: Successful response for retrieving an aplication's route details
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Route"
                examples:
                  simple_route:
                    $ref: '#/components/examples/simple_route_response'
          '400':
            description: Bad request. Cannot retrieve an aplication's route details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody400'
          '401':
            description: Unauthorized Access. Cannot retrieve an aplication's route details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody401'
          '404':
            description: Application or Route not found. Cannot retrieve an aplication's route details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody404'
          '406':
            description: Invalid `Accept` header. Cannot retrieve an aplication's route details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
          '415':
            description: Invalid `Content-type` header. Cannot retrieve an aplication's route details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
          '500':
            description: Service Internal error. Cannot retrieve an aplication's route details.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody500'
      post:
        tags:
          - Routes
        operationId: CreateOrUpdateRoute
        summary: Creates or Updates the desired state of an application's route.
        description: This API creates an application's route if it doesn't exist. If an application route with the same name is found, then it is updated with the supplied desired state configuration.
        parameters:
          - $ref: '#/components/parameters/appNamePathParam'
          - $ref: '#/components/parameters/routeNamePathParam'
        requestBody:
          description: The request payload for creating or updating a new application route.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Route"
              examples:
                  simple_backend:
                    $ref: '#/components/examples/simple_route_request'
        responses:
          '200':
            description: Successful response to create or update application route.
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Route"
                examples:
                  simple_backend:
                    $ref: '#/components/examples/simple_route_response'
          '400':
            description: Bad request. Cannot create or update application route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody400'
          '401':
            description: Unauthorized Access. Cannot create or update application route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody401'
          '404':
            description: Application or Frontend not found. Cannot create or update application route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody404'
          '406':
            description: Invalid `Accept` header. Cannot create or update application route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
          '409':
            description: Conflict. Cannot create or update application route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody409'
          '415':
            description: Invalid `Content-type` header. Cannot create or update application route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
          '422':
            description: Validation failure. Cannot create or update application route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody422'
          '500':
            description: Service Internal error. Cannot create or update application route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody500'
      put:
        tags:
          - Routes
        operationId: UpdateRoute
        summary: Updates the desired state of an application's route.
        description: This API updates an existing application's route. This API returns an error if the application route is not found.
        parameters:
          - $ref: '#/components/parameters/appNamePathParam'
          - $ref: '#/components/parameters/routeNamePathParam'
        requestBody:
          description: The request payload for updating an application route.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Route"
              examples:
                  simple_route:
                    $ref: '#/components/examples/simple_route_request'
        responses:
          '200':
            description: Successful response to update an application's route.
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Route"
                examples:
                  simple_route:
                    $ref: '#/components/examples/simple_route_response'
          '400':
            description: Bad request. Cannot update an application's route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody400'
          '401':
            description: Unauthorized Access. Cannot update an application's route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody401'
          '404':
            description: Application or Route not found. Cannot update an application's route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody404'
          '406':
            description: Invalid `Accept` header. Cannot update an application's route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
          '409':
            description: Conflict. Cannot update an application's route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody409'
          '415':
            description: Invalid `Content-type` header. Cannot update an application's route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
          '422':
            description: Validation failure. Cannot update an application's route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody422'
          '500':
            description: Service Internal error. Cannot update an application's route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody500'
      delete:
        tags:
          - Routes
        operationId: DeleteRoute
        summary: Deletes an application route
        description: Deletes an application's route. If the application's route to be deleted doesn't exist (already deleted), this API still returns success.
          If the route to be deleted is the last route of the application, this API will result in an error.
        parameters:
          - $ref: '#/components/parameters/appNamePathParam'
          - $ref: '#/components/parameters/routeNamePathParam'
        responses:
          '204':
            description: Application Route Successfully Deleted
          '400':
            description: Bad request. Cannot delete an application route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody400'
          '401':
            description: Unauthorized Access. Cannot delete an application route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody401'
          '404':
            description: Application route not found.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody404'
          '406':
            description: Invalid `Accept` header.  Cannot delete an application route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
          '409':
            description: Conflict.  Cannot delete an application route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody409'
          '415':
            description: Invalid `Content-type` header.  Cannot delete an application route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
          '500':
            description: Service Internal error. Cannot delete an application route.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody500'

  /certificates:
    get:
      tags:
        - Certificates
      summary: Lists Certificates.
      description: This API returns list of TLS certificates.
      operationId: ListCertificates
      responses:
        '200':
          description: Successful response for retrieving a list of certificates
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Certificates"
              examples:
                list_of_certs:
                    $ref: '#/components/examples/list_of_cert_response'
        '400':
          description: Bad request. Cannot list certificates.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot list certificates.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot list certificates.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot list certificates.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot list certificates.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    post:
      tags:
        - Certificates
      operationId: AddCertificate
      summary: Adds a new Certificate.
      description: Adds a new certificate and its certificate chain. If a certificate with the same name already exists, this API will return an error. If some of the certificates in the certificate chain added as part of this certificate already exist (and are exactly the same), these are reused for this certificate. Otherwise, an error is returned.
      requestBody:
        description: The request payload for adding a certificate.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CertificateUpload"
            examples:
              certificate_example:
                $ref: '#/components/examples/certificate_example'
      responses:
        '201':
            description: Successful response for adding a certificate.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/Certificate'
                examples:
                  certificate_details:
                    $ref: '#/components/examples/certificate_details_example'
        '400':
          description: Bad request. Cannot add a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot add a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot add a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot add a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot add a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot add a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot add a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
  /certificates/{certificate-name}:
    get:
      tags:
        - Certificates
      operationId: GetCertificate
      summary: Retrieves a Certificate Details.
      description: This API retrieves a Certificate details.
      parameters:
        - name: certificate-name
          in: path
          description: Certificate Name to retreive
          required: true
          schema:
            type: string
          example: admin_cert
      responses:
        '200':
          description: Successful retrieval of a certificate details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Certificate"
              examples:
                certificate_details:
                      $ref: '#/components/examples/certificate_details_example'
        '400':
          description: Bad request. Cannot retrieve a certificate details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot retrieve a certificate details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Certificate not found. Cannot retrieve a certificate details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot retrieve a certificate details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot retrieve a certificate details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot retrieve a certificate details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    post:
      tags:
        - Certificates
      operationId: AddOrUpdateCertificate
      summary: Adds or Updates a Certificate.
      description: Adds or Updates a certificate and its certificate chain. If a certificate with the same name already exists, this API will update the existing certificate. If some of the certificates in the certificate chain that are part of this certificate already exist (and are exactly the same), these are reused for this certificate. Otherwise, an error is returned.
      parameters:
        - name: certificate-name
          in: path
          description: Certificate Name to add or update
          required: true
          schema:
            type: string
          example: admin_cert
      requestBody:
        description: The request payload for adding or updating a certificate.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CertificateUpload"
            examples:
              certificate_example:
                $ref: '#/components/examples/certificate_example'
      responses:
        '200':
          description: Successful response for adding/updating a certificate
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Certificate"
              examples:
                certificate_example:
                  $ref: '#/components/examples/certificate_details_example'
        '400':
          description: Bad request. Cannot add/update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot add/update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header.  Cannot add/update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict.  Cannot add/update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header.  Cannot add/update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure.  Cannot add/update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot add/update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    put:
      tags:
        - Certificates
      operationId: UpdateCertificate
      summary: Updates an existing Certificate.
      description: Updates an existing certificate. If some of the certificates in the certificate chain that are part of this certificate already exist (and are exactly the same), these are reused for this certificate. Otherwise, an error is returned.
      parameters:
        - name: certificate-name
          in: path
          description: Certificate Name to update
          required: true
          schema:
            type: string
          example: admin_cert
      requestBody:
        description: The request payload for updating a certificate.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CertificateUpload"
            examples:
              certificate_example:
                $ref: '#/components/examples/certificate_example'
      responses:
        '200':
          description: Successful response for updating a certificate.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Certificate"
              examples:
                certificate_example:
                  $ref: '#/components/examples/certificate_details_example'
        '400':
          description: Bad request. Cannot update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Certificate not found. Cannot update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header.  Cannot update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict.  Cannot update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header.  Cannot update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure.  Cannot update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot update a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    delete:
      tags:
        - Certificates
      operationId: DeleteCertificate
      summary: Deletes a Certificate
      description: Deletes a certificate. If a certificate is not found (already deleted), this API still returns a successful response.
                   If the certificate is used by an application, it cannot be deleted.
      parameters:
        - name: certificate-name
          in: path
          description: Certificate Name to delete
          required: true
          schema:
            type: string
          example: admin_cert
      responses:
        '204':
          description: Certificate Succesfully deleted.
        '400':
          description: Bad request. Cannot delete a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot delete a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Certificate not found. Cannot delete certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot delete certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot delete certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot delete certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot delete a certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
  /certificates/{certificate-name}/configstatus:
    get:
      tags:
        - Certificates
      summary: Get certificate's desired config progress status
      description: Returns certificate's desired config progress status
      operationId: GetCertificateConfigStatus
      parameters:
        - name: certificate-name
          in: path
          description: Name of the Certificate for which to retrieve the config status.
          required: true
          schema:
            $ref: '#/components/schemas/name_data_type'
      responses:
        '200':
          description: Successful response for certificate config progress status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApplicationConfigStatus"
        '400':
          description: Bad request for retrieving config status of an certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access to retrieve config status of an certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Certificate not found. Cannot retrieve config status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot retrieve the status of the certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot retrieve the status of the certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot retrieve the status of the certificate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

  /roles:
    get:
      tags:
        - RBAC
      summary: List Roles
      description: This API returns list of RBAC roles.
      operationId: GetRoles
      responses:
        '200':
          description: Successful response for retrieving a list of roles
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Roles"
              examples:
                list_of_roles:
                    $ref: '#/components/examples/list_of_roles_response'
        '400':
          description: Bad request. Cannot list roles.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot list roles.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot list roles.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot list roles.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot list roles.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    post:
      tags:
        - RBAC
      summary: Adds a new role
      description: Adds new role with specific permissions on the API resources
      operationId: AddRole
      requestBody:
        description: The request payload for adding a RBAC Role.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Role'
            examples:
              role_simple:
                $ref: '#/components/examples/role_request_simple'
              role_advanced:
                  $ref: '#/components/examples/role_request_advanced'
      responses:
        '201':
            description: Successful response for adding a RBAC Role.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/Role'
                examples:
                  role_simple:
                    $ref: '#/components/examples/role_response_simple'
                  role_advanced:
                      $ref: '#/components/examples/role_response_advanced'

        '400':
          description: Bad request. Cannot add a RBAC Role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot add a RBAC Role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot add a RBAC Role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot add a RBAC Role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot add a RBAC Role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot add a RBAC Role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot add a RBAC Role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

  /roles/{role-name}:
    get:
      tags:
        - RBAC
      operationId: GetRole
      summary: Retrieves a role details.
      description: This API retrieves a RBAC role details.
      parameters:
        - $ref: "#/components/parameters/roleNamePathParam"
      responses:
        '200':
          description: Successful retrieval of a role details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Role"
              examples:
                role_response:
                  $ref: '#/components/examples/role_request_advanced'
        '400':
          description: Bad request. Cannot retrieve a role details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot retrieve a role details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Role not found. Cannot retrieve a role details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot retrieve a role details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header.  Cannot retrieve a role details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot retrieve a role details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    post:
      tags:
        - RBAC
      operationId: AddOrUpdateRole
      summary: Adds or Updates a Role.
      description: Adds or Updates a role. If a role with the same name already exists, this API will update the existing role.
      parameters:
        - $ref: "#/components/parameters/roleNamePathParam"
      requestBody:
        description: The request payload for adding or updating a role.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Role"
            examples:
              role_example:
                $ref: '#/components/examples/role_request_advanced'
      responses:
        '200':
          description: Successful response for adding/updating a role
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Role"
              examples:
                role_example:
                  $ref: '#/components/examples/role_response_advanced'
        '400':
          description: Bad request. Cannot add/update a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot add/update a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot add/update a role
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot add/update a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot add/update a role
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot add/update a role
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot add/update a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    put:
      tags:
        - RBAC
      operationId: UpdateRole
      summary: Updates an existing Role.
      description: Updates an existing role. This API returns an error if the role is not found.
      parameters:
        - $ref: "#/components/parameters/roleNamePathParam"
      requestBody:
        description: The request payload for updating a role.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Role"
            examples:
              role_example:
                $ref: '#/components/examples/role_request_advanced'
      responses:
        '200':
          description: Successful response for updating a role.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Role"
              examples:
                role_example:
                  $ref: '#/components/examples/role_response_advanced'
        '400':
          description: Bad request. Cannot update a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot update a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Role not found. Cannot update a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot update a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot update a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot update a role
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot update a role
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot update a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    delete:
      tags:
        - RBAC
      operationId: DeleteRole
      summary: Deletes a Role
      description: Deletes a role. If a role is not found (already deleted), this API still returns a successful response.
      parameters:
        - $ref: "#/components/parameters/roleNamePathParam"
      responses:
        '204':
          description: Role Succesfully deleted.
        '400':
          description: Bad request. Cannot delete a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot delete a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot delete a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot delete a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot delete a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot delete a role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
  /groups:
    get:
        tags:
          - RBAC
        operationId: GetGroups
        summary: Lists all groups with their roles associations
        description: This API returns list of groups with their roles associations
        responses:
          '200':
            description: Successful response for retrieving list of groups
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/Groups"
                examples:
                  group_roles_example:
                    $ref: '#/components/examples/groups'
          '400':
            description: Bad request. Cannot retrieve list of groups.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody400'
          '401':
            description: Unauthorized Access. Cannot retrieve list of groups.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody401'
          '406':
            description: Invalid `Accept` header. Cannot retrieve list of groups.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
          '415':
            description: Invalid `Content-type` header. Cannot retrieve list of groups.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
          '500':
            description: Service Internal error. Cannot retrieve list of groups.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody500'


  /groups/{group-name}/roles:
    get:
      tags:
        - RBAC
      operationId: GetGroupRoles
      summary: Lists all roles associated with the group.
      description: This API returns list of roles associated with the group.
      parameters:
        - $ref: "#/components/parameters/groupNamePathParam"
      responses:
        '200':
          description: Successful response for retrieving list of roles associated with the group
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GroupRoles"
              examples:
                group_roles_example:
                  $ref: '#/components/examples/group_roles_association'
        '400':
          description: Bad request. Cannot retrieve list of role associated to the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot retrieve list of role associated to the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
            description: No Roles found associated to the group.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
            description: Invalid `Accept` header. Cannot retrieve list of role associated to the group.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
            description: Invalid `Content-type` header. Cannot retrieve list of role associated to the group.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot retrieve list of role associated to the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

    post:
      tags:
        - RBAC
      operationId: AddGroupRole
      summary: Associates a Role with the group
      description: This API associates a role to the group. If group already has role with same name associated, this API will return an error.
      parameters:
        - $ref: "#/components/parameters/groupNamePathParam"
      requestBody:
        description: The request payload for associating role to the group.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GroupRole"
            examples:
              group_role_example:
                $ref: '#/components/examples/group_role_association'
      responses:
        '201':
          description: Successful response for associating role to the group.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GroupRole"
              examples:
                group_role_example:
                  $ref: '#/components/examples/group_role_association'
        '400':
          description: Bad request. Cannot associate role to the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot associate role to the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot associate role to the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot associate role to the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot associate role to the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot associate role to the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot associate role to the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

    put:
      tags:
        - RBAC
      operationId: AddGroupRoles
      summary: Adds or Replaces all the roles associations of a group.
      description: This API replaces all roles associated to the group with the suppplied list of roles.
      parameters:
        - $ref: "#/components/parameters/groupNamePathParam"
      requestBody:
        description: The request payload for associating roles to the group.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GroupRoles"
            examples:
              group_roles_example:
                $ref: '#/components/examples/group_roles_association'
      responses:
        '200':
          description: Successful response for associating roles to the group.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GroupRoles"
              examples:
                group_roles_example:
                  $ref: '#/components/examples/group_roles_association'
        '400':
          description: Bad request. Cannot add a new backend to the application..
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot add a new backend to the application..
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot add a new backend to the application..
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot add a new backend to the application..
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot add a new backend to the application..
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot add a new backend to the application..
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot add a new backend to the application..
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

  /groups/{group-name}/roles/{role-name}:
    delete:
      tags:
        - RBAC
      operationId: DeleteGroupRole
      summary: Disassociates a Role from the group
      description: This API disassociates a role from the group. If a role is not found (already disassociated), this API still returns a successful response.
      parameters:
        - $ref: "#/components/parameters/groupNamePathParam"
        - $ref: "#/components/parameters/roleNamePathParam"
      responses:
        '204':
          description: Role Succesfully disassociated.
        '400':
          description: Bad request. Cannot disassociate role from the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot disassociate role from the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot disassociate role from the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot disassociate role from the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot disassociate role from the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot disassociate role from the group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

  /filters/value_sets:
    get:
      tags:
        - Filters Value Sets
      summary: List filter value sets
      description: This API returns list of filter value sets.
      operationId: GetFilterValueSets
      responses:
        '200':
          description: Successful response for retrieving a list of filter value sets
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FilterValueSets"
              examples:
                filter_value_sets_example:
                  $ref: '#/components/examples/value_sets'
        '400':
          description: Bad request. Cannot list filter value sets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot list filter value sets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot list filter value sets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot list filter value sets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot list filter value sets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    post:
      tags:
        - Filters Value Sets
      summary: Adds a new filter value set
      description: Adds new filter value set
      operationId: AddFilterValueSet
      requestBody:
        description: The request payload for adding a filter value set.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FilterValueSet'
            examples:
              filter_value_set_example:
                $ref: '#/components/examples/value_set'
      responses:
        '201':
            description: Successful response for adding a filter value set.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/FilterValueSet'
                examples:
                  filter_value_set_example:
                    $ref: '#/components/examples/value_set'

        '400':
          description: Bad request. Cannot add a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot add a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot add a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot add a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot add a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot add a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot add a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'

  /filters/value_sets/{value_set-name}:
    get:
      tags:
        - Filters Value Sets
      summary: List filter value sets
      description: This API returns list of filter value sets.
      operationId: GetFilterValueSet
      parameters:
        - $ref: "#/components/parameters/valuesetNamePathParam"
      responses:
        '200':
          description: Successful response for retrieving a list of filter value sets
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FilterValueSet"
              examples:
                filter_value_set_example:
                  $ref: '#/components/examples/value_set'
        '400':
          description: Bad request. Cannot list filter value sets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot list filter value sets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot list filter value sets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '415':
          description: Invalid `Content-type` header. Cannot list filter value sets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot list filter value sets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    post:
      tags:
        - Filters Value Sets
      summary: Adds a new filter value set
      description: Adds new filter value set
      operationId: AddorUpdateFilterValueSet
      parameters:
        - $ref: "#/components/parameters/valuesetNamePathParam"
      requestBody:
        description: The request payload for adding a filter value set.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FilterValueSet'
            examples:
              filter_value_set_example:
                $ref: '#/components/examples/value_set'
      responses:
        '200':
            description: Successful response for adding a filter value set.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/FilterValueSet'
                examples:
                  filter_value_set_example:
                   $ref: '#/components/examples/value_set'

        '400':
          description: Bad request. Cannot add a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot add a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot add a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot add a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot add a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot add a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot add a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    put:
      tags:
        - Filters Value Sets
      operationId: UpdateFilterValueSet
      summary: Updates an existing filter value set.
      description: Updates an existing filter value set. This API returns an error if the filter value set is not found.
      parameters:
        - $ref: "#/components/parameters/valuesetNamePathParam"
      requestBody:
        description: The request payload for updating a filter value set.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/FilterValueSet"
            examples:
              filter_value_set_example:
                $ref: '#/components/examples/value_set'
      responses:
        '200':
          description: Successful response for updating a filter value set.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FilterValueSet"
              examples:
                filter_value_set_example:
                  $ref: '#/components/examples/value_set'
        '400':
          description: Bad request. Cannot update a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot update a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '404':
          description: Filter value set not found. Cannot update a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody404'
        '406':
          description: Invalid `Accept` header. Cannot update a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot update a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot update a filter value set
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '422':
          description: Validation failure. Cannot update a filter value set
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody422'
        '500':
          description: Service Internal error. Cannot update a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'
    delete:
      tags:
        - Filters Value Sets
      operationId: DeleteFilterValueSet
      summary: Deletes a filter value set
      description: Deletes a filter value set. If a filter value set is not found (already deleted), this API still returns a successful response.
      parameters:
        - $ref: "#/components/parameters/valuesetNamePathParam"
      responses:
        '204':
          description: filter value set Succesfully deleted.
        '400':
          description: Bad request. Cannot delete a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody400'
        '401':
          description: Unauthorized Access. Cannot delete a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody401'
        '406':
          description: Invalid `Accept` header. Cannot delete a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody406'
        '409':
          description: Conflict. Cannot delete a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody409'
        '415':
          description: Invalid `Content-type` header. Cannot delete a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody415'
        '500':
          description: Service Internal error. Cannot delete a filter value set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody500'


security:
  - cookieAuth: []
components:
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid
  parameters:
    appNamePathParam:
      name: application-name
      in: path
      description: Name of the Application.
      required: true
      schema:
          $ref: '#/components/schemas/name_data_type'
    routeNamePathParam:
      name: route-name
      in: path
      description: Name of the Application Route.
      required: true
      schema:
          $ref: '#/components/schemas/name_data_type'
    stateQueryParam:
      name: state
      in: query
      required: false
      description: For retrieving desired state vs current state
      schema:
        $ref: "#/components/schemas/ResourceStates"
    expandAppQueryParam:
      name: expanded
      in: query
      required: false
      description: For retrieving expanded view of the application where application is expressed as frontends and backends
      schema:
        type: string
        default: false
        enum:
          - true
          - false
    roleNamePathParam:
      name: role-name
      in: path
      description: Name of the Role
      required: true
      schema:
        type: string
      example: readonly-group
    groupNamePathParam:
      name: group-name
      in: path
      description: Name of the User Group
      required: true
      schema:
        type: string
      example: readonly-group
    valuesetNamePathParam:
      name: value_set-name
      in: path
      description: Name of the filter value set
      required: true
      schema:
        type: string
      example: internal-subnets

  examples:

    simple_http_lb_app_with_defaults_request:
      value:
        application:
          name: app1
          virtual_ip: 70.122.23.11
          protocol: HTTP
          servers:
            - 192.168.10.11
            - 192.168.10.14
    simple_http_lb_app_with_defaults_request2:
      value:
        application:
          name: app2
          virtual_ip: 70.122.23.11
          protocol: HTTP
          port: 8080
          servers_port: 81
          unavailable_redirect_url: https://www.example.com
          servers:
            -
              ip: 192.168.10.11
              weight: 3
            -
              ip: 192.168.10.12
            -
              fqdn: ftdx01.example.com
            -
              ip: 192.168.10.14
              port: 82
          load_balancing:
            algorithm: ROUNDROBIN
            stickiness_type: SOURCEIP
            stickiness_timeout: "2hr"
          # http_redirect_refs:
          #   - emea_redirect
          http_redirect:
            # name: emea_redirect
            filter: "http.host == 'emea.example.com'"
            url: https://us.example.com/


    simple_https_lb_app_with_defaults_request:
      value:
        application:
          name: app3
          virtual_ip: 70.122.23.11
          default_certificate_ref: app3_cert
          servers:
            - 192.168.10.11
            - 192.168.10.14

    simple_https_lb_app_with_defaults_request2:
      value:
        application:
          name: app4
          virtual_ip: 70.122.23.11
          default_certificate_ref: app3_cert
          protocol: HTTPS
          port: 444
          servers_port: 8080
          servers:
            - 192.168.10.11
            - 192.168.10.14
            - 192.168.10.15
            - 192.168.10.16
            - 192.168.10.17
            - 192.168.154.47

    simple_https_lb_app_with_multiple_listeners:
      value:
        application:
          name: app5
          virtual_ip: 70.122.23.11
          listeners:
            -
              name: secure_listener
              port: 443
              protocol: HTTPS
              default_certificate_ref: app3_cert
              http_to_https_redirect: true
            -
              name: http_listener
              port: 80
              protocol: HTTP
          servers_port: 8080
          servers:
            - 192.168.10.11
            - 192.168.10.14
            - 192.168.10.15
            - 192.168.10.16
            - 192.168.10.17
            - 192.168.154.47

    cs_app_default_backend:
      value:
        application:
          name: app7
          frontends:
            -
              name: admin_frontend
              virtual_ip: 70.122.23.26
              port: 443
              protocol: HTTPS
              default_certificate_ref: app3_cert
            -
              name: customer_frontend
              virtual_ip: 70.122.24.21
              listeners:
                -
                  name: secure_listener
                  port: 443
                  protocol: HTTPS
                  default_certificate_ref: app3_cert
                  http_responder_refs:
                    - admin_response
                -
                  name: http_listener
                  port: 80
                  protocol: HTTP
                  http_responder_refs:
                    - admin_response
          servers_port: 8080
          servers:
            - 192.168.10.11
            - 192.168.10.14
            - 192.168.10.15
            - 192.168.10.16
            - 192.168.10.17
            - 192.168.154.47
          http_responder_defs:
            -
              name: admin_response
              filter: "http.request.uri contains 'admin'"
              response: "'404' Not Found"

    lb_app_with_settings_request:
      value:
        application:
          name: app6
          virtual_ip: 70.122.23.12
          port: 443
          protocol: HTTPS
          default_certificate_ref: app3_cert
          servers_port: 80
          servers:
            - 192.168.10.11
            - 192.168.10.14
          load_balancing:
            algorithm: LEASTCONNECTION
            stickiness_type: SOURCEIP
          http_to_https_redirect: true

    simple_cs_application_request:
      value:
        application:
          name: app8
          virtual_ip: 70.122.23.23
          port: 443
          protocol: HTTPS
          default_certificate_ref: app3_cert
          backends:
            -
              name: account_servers
              servers_port: 8080
              servers:
                - 192.168.10.11
                - 192.168.10.14
              load_balancing_ref: standard_settings
              http_redirect_refs:
                - emea_redirect
                - apac_redirect
            -
              name: billing_servers
              servers_port: 8080
              servers:
                -
                  ip: 192.168.11.11
                  weight: 3
                -
                  ip: 192.168.11.14
              load_balancing_ref: experimental_settings
          routes:
            -
              name: account_route
              filter: "http.request.uri contains '/account/'"
              backend_ref: account_servers
            -
              name: checkout_route
              filter: "http.request.uri contains '/checkout/'"
              backend_ref: billing_servers
          load_balancing_defs:
            -
              name: standard_settings
              algorithm: ROUNDROBIN
              stickiness_type: SOURCEIP
              stickiness_timeout: 12hr
            -
              name: experimental_settings
              algorithm: LEASTCONNECTION
              stickiness_type: COOKIEINSERT
              stickiness_timeout: 1hr
          http_redirect_defs:
            -
              name: emea_redirect
              filter: "http.host == 'emea.example.com'"
              url: https://us.example.com/
            -
              name: apac_redirect
              filter: "http.host == 'apac.example.com'"
              url: https://us.example.com/

          http_responder_defs:
            -
              name: admin_response
              filter: "http.request.uri contains 'admin'"
              response: "'404' Not Found"

          http_responder_refs:
            - admin_response

    cs_application_with_multiple_frontends_request1:
      value:
        application:
          name: app9
          frontends:
            -
              name: admin_frontend
              virtual_ip: 70.122.23.36
              port: 443
              protocol: HTTPS
              default_certificate_ref: app3_cert
              tls_settings_ref: ts_high
            -
              name: app_frontend
              virtual_ip: 70.122.24.37
              listeners:
                -
                  name: secure_listener
                  port: 443
                  protocol: HTTPS
                  default_certificate_ref: app3_cert
                  tls_settings_ref: ts_tls1
                -
                  name: http_listener
                  port: 80
                  protocol: HTTP
          backends:
            -
              name: account_servers
              servers_port: 8080
              servers:
                - 192.168.10.11
                - 192.168.10.14
              load_balancing_ref: standard_settings
              http_redirect_refs:
                - emea_redirect
                - apac_redirect
            -
              name: billing_servers
              port: 8080
              servers:
                -
                  ip: 192.168.11.11
                  weight: 3
                -
                  ip: 192.168.11.14
              load_balancing_ref: experimental_settings
              http_responder_refs:
                - admin_response
          routes:
            -
              name: account_route
              filter: "http.request.uri contains '/account/'"
              backend_ref: account_servers
            -
              name: checkout_route
              filter: "http.request.uri contains '/checkout/'"
              backend_ref: billing_servers
          load_balancing_defs:
            -
              name: standard_settings
              algorithm: ROUNDROBIN
              stickiness_type: SOURCEIP
              stickiness_timeout: 2hr

            -
              name: experimental_settings
              algorithm: LEASTCONNECTION
              stickiness_type: COOKIEINSERT
              stickiness_timeout: 20min

          http_redirect_defs:
            -
              name: emea_redirect
              filter: "http.host == 'emea.example.com'"
              url: https://us.example.com/
            -
              name: apac_redirect
              filter: "http.host == 'apac.example.com'"
              url: https://us.example.com/

          http_responder_defs:
            -
              name: admin_response
              filter: "http.request.uri contains 'admin'"
              response: "'404' Not Found"
          tls_settings_defs:
            -
              name: ts_high
              security_level: HIGH
            -
              name: ts_tls1
              tls_protocols: [TLS-1]
              tls_cipher_suites: [TLS1-EXP1024-RC4-SHA, TLS1-EXP1024-DHE-DSS-DES-CBC-SHA, TLS1-EXP1024-DHE-DSS-RC4-SHA, TLS1-EXP1024-RC4-MD5, TLS1-EXP1024-RC2-CBC-MD5]
              enable_session_reuse: True
              session_timeout: 48s



    cs_application_with_multiple_frontends_request2:
      value:
        application:
          name: app10
          frontends:
            -
              name: admin_frontend
              virtual_ip: 71.122.23.26
              port: 443
              protocol: HTTPS
              tls_settings:
                security_level: MEDIUM
              default_certificate_ref: app3_cert
              default_backend_ref: administration
              http_redirect_refs:
                - emea_redirect
            -
              name: app_frontend
              virtual_ip: 71.122.24.21
              listeners:
                -
                  name: secure_listener
                  port: 443
                  protocol: HTTPS
                  default_certificate_ref: app3_cert
                  http_to_https_redirect: true
                  http_redirect_port: 81
                -
                  name: http_listener
                  port : 80
                  protocol: HTTP
          backends:
            -
              name: administration
              servers_port: 443
              servers_protocol: HTTPS
              health_check_refs:
                - https_monitor
              servers:
                - 192.168.14.24
                - 192.168.14.25
                - 192.168.14.26
            -
              name: advert_servers
              servers_port: 8080
              health_check_refs:
                - ping_monitor
              servers:
                - 192.168.10.11
                - 192.168.10.14
            -
              name: billing_servers
              servers_port: 8080
              health_check_refs:
                - ping_monitor
              servers:
                -
                  ip: 192.168.11.11
                  weight: 3
                -
                  ip: 192.168.11.14
          routes:
            -
              name: checkout_route
              filter: "http.request.uri contains '/checkout/'"
              frontend_ref: app_frontend
              listener_ref: secure_listener
              backend_ref: billing_servers
            -
              name: ad_route
              filter: "http.request.uri contains '/ad/'"
              frontend_ref: app_frontend
              listener_ref: http_listener
              backend_ref: advert_servers
          http_redirect_defs:
            -
              name: emea_redirect
              filter: "http.host == 'emea.example.com'"
              url: https://us.example.com/
            -
              name: apac_redirect
              filter: "http.host == 'apac.example.com'"
              url: https://us.example.com/
          health_check_defs:
            -
              name: https_monitor
              type: HTTPS
              probe_request_str: GET /health
              probe_healthy_response:
                status_codes:
                - 200-299
                - '300'
                - '302'
              interval: 1000s
              num_retries_on_failure: 3
              min_failed_retries: 1
              num_consecutive_successful_retries: 7
              wait_period_after_failure: 1min
            -
              name: ping_monitor
              type: PING

    simple_frontend_request:
      value:
          frontend:
            name: admin_frontend
            virtual_ip: 70.122.23.26
            port: 443
            protocol: HTTPS
            default_certificate_ref: admin_cert
    frontend_with_listeners_request:
      value:
        frontend:
          name: app_frontend
          virtual_ip: 70.122.24.21
          listeners:
            -
              name: secure_listener
              port: 443
              protocol: HTTPS
              default_certificate_ref: app6_cert
            -
              name: http_listener
              port: 80
              protocol: HTTP

    simple_listener_request:
      value:
        listener:
          name: secure_listener
          port: 443
          protocol: HTTPS

    simple_server_request:
      value:
        server: 192.168.14.24

    server_with_port_request:
      value:
        server:
          ip: 192.168.145.56
          port: 8181

    simple_backend_request:
      value:
        backend:
          name: adminstration
          port: 443
          protocol: HTTPS
          servers:
            - 192.168.14.24
            - 192.168.14.25
            - 192.168.14.26
    simple_route_request:
      value:
        route:
            name: checkout_route
            filter: "http.request.uri contains '/checkout/'"
            frontend_ref: admin_frontend
            backend_ref: billing_servers
            listener_ref: https_listener

    list_of_listeners_request:
      value:
        listeners:
          -
            name: secure_listener
            port: 443
            protocol: HTTPS
          -
            name: http_listener
            port: 80
            protocol: HTTP

    list_of_servers_request:
      value:
        servers:
          - 192.168.10.11
          - 192.168.10.14
          - 192.168.10.15
          - 192.168.10.16
          - 192.168.10.17
          -
            ip: 192.168.154.47
            port: 81

    simple_http_lb_app_with_defaults_response:
      $ref: "#/components/examples/simple_http_lb_app_with_defaults_request"
    simple_http_lb_app_with_defaults_response2:
      $ref: "#/components/examples/simple_http_lb_app_with_defaults_request2"
    simple_https_lb_app_with_defaults_response:
      $ref: "#/components/examples/simple_https_lb_app_with_defaults_request"
    simple_https_lb_app_with_defaults_response2:
      $ref: "#/components/examples/simple_https_lb_app_with_defaults_request2"
    simple_https_lb_app_with_multiple_listeners_response:
      $ref: "#/components/examples/simple_https_lb_app_with_multiple_listeners"
    lb_app_with_settings_response:
      $ref: "#/components/examples/lb_app_with_settings_request"
    cs_app_default_backend_response:
      $ref: "#/components/examples/cs_app_default_backend"
    simple_cs_application_response:
      $ref: "#/components/examples/simple_cs_application_request"
    list_of_apps_response:
      value:
        applications:
          -
            name: app1
            virtual_ip: 70.122.23.11
            protocol: HTTPS
            port: 444
            default_certificate_ref: app1_cert
            servers_port: 8080
            servers:
              - 192.168.10.11
              - 192.168.10.14
              - 192.168.10.15
              - 192.168.10.16
              - 192.168.10.17
              - 192.168.154.47
          -
            name: app2
            virtual_ip: 70.122.23.11
            protocol: HTTP
            port: 8080
            servers_port: 81
            servers:
              -
                ip: 192.168.10.11
                weight: 3
              -
                ip: 192.168.10.12
              -
                fqdn: ftdx01.example.com
              -
                ip: 192.168.10.14
                port: 82
            load_balancing:
              algorithm: ROUNDROBIN
              stickiness_type: SOURCEIP
            http_redirect:
              -
                name: emea_redirect
                filter: "http.host == 'emea.example.com'"
                url: https://us.example.com/
              -
                name: apac_redirect
                filter: "http.host == 'apac.example.com'"
                url: https://us.example.com/
          -
            name: app3
            virtual_ip: 70.122.23.11
            default_certificate_ref: app1_cert
            servers:
              - 192.168.10.11
              - 192.168.10.14
          -
            name: app4
            virtual_ip: 70.122.23.11
            port: 443
            protocol: HTTPS
            default_certificate_ref: app7_cert
            servers_port: 80
            servers:
              - 192.168.10.11
              - 192.168.10.14
            load_balancing:
              algorithm: LEASTCONNECTION
              stickiness_type: SOURCEIP
          -
            name: app5
            virtual_ip: 70.122.23.11
            port: 443
            protocol: HTTPS
            default_certificate_ref: portal_cert

            backends:
              -
                name: account_servers
                servers_port: 8080
                servers:
                  - 192.168.10.11
                  - 192.168.10.14
                load_balancing_ref: standard_settings
                http_redirect_refs:
                  - emea_redirect
                  - apac_redirect
              -
                name: billing_servers
                port: 8080
                servers:
                  -
                    ip: 192.168.11.11
                    weight: 3
                  -
                    ip: 192.168.11.14
                load_balancing_ref: experimental_settings
                http_responder_refs:
                  - admin_response
            routes:
              -
                name: account_route
                filter: "http.request.uri startswith '/account/'"
                backend_ref: account_servers
              -
                name: checkout_route
                filter: "http.request.uri contains '/checkout/'"
                backend_ref: billing_servers
            load_balancing:
              -
                name: standard_settings
                algorithm: ROUNDROBIN
                stickiness_type: SOURCEIP
              -
                name: experimental_settings
                algorithm: LEASTCONNECTION
                stickiness_type: COOKIEINSERT
            http_redirect_defs:
              -
                name: emea_redirect
                filter: "http.host == 'emea.example.com'"
                url: https://us.example.com/
              -
                name: apac_redirect
                filter: "http.host == 'apac.example.com'"
                url: https://us.example.com/
            http_responder_defs:
              -
                name: admin_response
                filter: "path startswith '/admin'"
                response: "'404' Not Found"
          -
              name: app7
              virtual_ip: 70.122.24.12
              port: 443
              protocol: HTTPS
              default_certificate_ref: app7_cert
              servers_port: 80
              servers:
                - 192.168.10.11
                - 192.168.10.14
              load_balancing:
                name: standard_settings
                algorithm: LEASTCONNECTION
                stickiness_type: SOURCEIP
    cs_application_with_multiple_frontends_response:
      $ref: "#/components/examples/cs_application_with_multiple_frontends_request2"

    simple_frontend_response:
      $ref: "#/components/examples/simple_frontend_request"

    frontend_with_listeners_response:
      $ref: "#/components/examples/frontend_with_listeners_request"

    simple_backend_response:
      $ref: "#/components/examples/simple_backend_request"

    simple_listener_response:
      $ref: "#/components/examples/simple_listener_request"

    simple_server_response:
      $ref: "#/components/examples/simple_server_request"

    server_with_port_response:
      $ref: "#/components/examples/server_with_port_request"

    simple_route_response:
      $ref: "#/components/examples/simple_route_request"

    list_of_frontends_response:
      value:
        frontends:
          -
            name: _default
            virtual_ip: 70.122.23.11
            port: 443
            protocol: HTTPS
            default_certificate_ref: app8_cert
          -
            name: admin_frontend
            virtual_ip: 70.122.23.26
            port: 443
            protocol: HTTPS
            default_certificate_ref: admin_cert
          -
            name: app_frontend
            virtual_ip: 70.122.24.21
            listeners:
              -
                name: secure_listener
                port: 443
                protocol: HTTPS
                default_certificate_ref: app6_cert
              -
                name: http_listener
                port: 80
                protocol: HTTP

    list_of_backends_response:
      value:
        backends:
          -
            name: account_servers
            servers_port: 8080
            servers:
              - 192.168.10.11
              - 192.168.10.14
            load_balancing_ref: standard_settings
            http_redirect_refs:
              - emea_redirect
              - apac_redirect
          -
            name: billing_servers
            servers_port: 8080
            servers:
              -
                ip: 192.168.11.11
                weight: 3
              -
                ip: 192.168.11.14
            load_balancing_ref: experimental_settings
            http_responder_refs:
              - admin_response

    list_of_routes_response:
      value:
        routes:
          -
            name: account_route
            filter: "http.request.uri startswith '/account/'"
            backend_ref: account_servers
          -
            name: checkout_route
            filter: "http.request.uri contains '/checkout/'"
            backend_ref: billing_servers
            listener_ref: https_listener

    list_of_listeners_response:
      $ref: "#/components/examples/list_of_listeners_request"

    list_of_servers_response:
      $ref: "#/components/examples/list_of_servers_request"

    certificate_example:
      value:
        certificate:
          name: app1_cert
          public_cert: ' -----BEGIN CERTIFICATE----- (Your Primary SSL certificate: your_domain_name.crt) -----END CERTIFICATE----- '
          private_key: ' -----BEGIN PRIVATE KEY----- (Your Private Key) -----END PRIVATE KEY----- '
          passphrase: long secret phrase
          ca_certs:
            - ' -----BEGIN CERTIFICATE----- (Your Intermediate certificate: DigiCertCA.crt) -----END CERTIFICATE----- '
            - ' -----BEGIN CERTIFICATE----- (Your Root certificate: TrustedRoot.crt) -----END CERTIFICATE----- '

    certificate_details_example:
      value:
        certificate:
          name: app1_cert
          serial: 45:46:2C:D0:D6:53:7B:20:CF:2F:3E:B8:AE:C0:71:40
          sha256_fingerprint: D5:6B:45:97:F9:E1:84:5E:B9:D4:2B:99:32:4A:69:8E:12:C1:53:82:BD:7B:F0:E7:ED:F6:8B:5A:29:9C:E2:B6
          common_name: example.com
          subject: CN=example.com, O=AutoMagic, L=Detroit, ST=Michigan, C=US
          subject_alternative_names:
            - DNS: www.example.com
          issuer: CN=AutoMagicCA.com,OU=Engineering,O=AutoMagic,L=Detroit,ST=Michigan,C=US
          key_usage:
            - Signing
            - Key Encipherment
          extended_key_usage:
            - TLS Web Server Authentication
            - TLS Web Client Authentication
          domains:
            - example.com
          signature_algorithm: sha256WithRSAEncryption
          key_algorithm: rsaEncryption
          validation_type: dv
          creation_date: 2022-02-08T07:16:00.000Z
          expiry_date: 2025-02-08T07:16:00.000Z
          basic_constraints:
            ca: false
          is_self_signed: false
          modulus: a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a7'401'6c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db
          modulus_length: 2048
    list_of_cert_response:
      value:
        certificates:
          -
            name: app1_cert
            serial: 45:46:2C:D0:D6:53:7B:20:CF:2F:3E:B8:AE:C0:71:40
            sha256_fingerprint: D5:6B:45:97:F9:E1:84:5E:B9:D4:2B:99:32:4A:69:8E:12:C1:53:82:BD:7B:F0:E7:ED:F6:8B:5A:29:9C:E2:B6
            common_name: example.com
            subject: CN=example.com, O=AutoMagic, L=Detroit, ST=Michigan, C=US
            subject_alternative_names:
              - DNS: www.example.com
            issuer: CN=AutoMagicCA.com,OU=Engineering,O=AutoMagic,L=Detroit,ST=Michigan,C=US
            key_usage:
              - Signing
              - Key Encipherment
            extended_key_usage:
              - TLS Web Server Authentication
              - TLS Web Client Authentication
            domains:
              - example.com
            signature_algorithm: sha256WithRSAEncryption
            key_algorithm: rsaEncryption
            validation_type: dv
            creation_date: 2022-02-08T07:16:00.000Z
            expiry_date: 2025-02-08T07:16:00.000Z
            basic_constraints:
              ca: false
            is_self_signed: false
            modulus: a673c3b17344664b35f8791f562d3aea6bf4d8faa3ae3fc0a519380fd453964a36677c34d48677ecb7f5ed035df026f5f0f8fbfe21745e52daf1f3b9e58c73f0baefdb709320e2202e7d05250b051a59b30ff1fef22d83d7140c1c81cea314a0890ce8d2226799872181c58a7'401'6c7aaa2cff5ac72b575cecde8f304aa572a2ea03d8b173ab76c6e8cdb9dfd0da81e1119cefd4b8b4dbfbe0e46c7f1ee2fe8b5fd5504e58ccbc0d13b4fa41ecc9ebd0dabe1d1fec5c724f748167e7c0553e997f9b77eb36abce70973f06df151748d41b758de3efd7afa6f2464a1547f5ff158469d96e248be464df9eda0e7ce854a89332a2c1278b17c425368a9604f454db
            modulus_length: 2048
          -
            name: myserver-cert
            serial: 06
            x509_version: v3
            sha256_fingerprint: db:2d:cd:c4:b4:d1:40:81:1c:06:60:ea:2d:4d:cd:b4:86:e4:17:b8:15:a3:73:07:1a:16:6c:48:95:81:d8:a4
            common_name: accounts.dummy.com
            subject: 1.2.840.113549.1.9.1=admin@cloud.com,CN=accounts.dummy.com,OU=NetScaler,O=CSG,L=Santa
              Clara,ST=CA,C=US
            issuer: 1.2.840.113549.1.9.1=admin@cloud.com,CN=interm-ca.dummy.com,OU=NetScaler,O=CSG,L=Santa
              Clara,ST=CA,C=US
            creation_date: '2023-11-10T00:20:25.000'
            expiry_date: '2024-11-09T00:20:25.000'
            key_usage:
              - Digital Signature
              - Content Commitment
              - Key Encipherment
            extended_key_usage:
              - TLS Web Server Authentication
              - TLS Web Client Authentication
              - Code Signing
              - Email Protection
            signature_algorithm: sha256WithRSAEncryption
            key_algorithm: rsaEncryption
            key_size: 4096
            basic_constraints:
              ca: false
            is_self_signed: false
            modulus: 70671429403414979880426361948467159988050660169968872915802785440760402937341399852999951475552002100291337741434469193795498039587043899795630626993211198582989727613074800773964118096970851009533062120374382217821827918502549130314232996147190555059862022917371867924662047466034229045785459752195838533515699706168995001815039983558596368490541596147691347924518170019085530873125768182883512231635131242381837309895981791817066306663166112923312650477940629514204094102
            modulus_length: 4096

    list_of_roles_response:
      value:
        roles:
          -
            name: apps-admin
            permissions:
              -
                method: ALL
                resources: /applications/.+
          -
            name: sec-admin
            permissions:
              -
                method: GET
                resources: /applications/.+
              -
                name: srvrs_lstnrs_add_update
                description: Allow addition and update of servers to existing backends and addition and update of listeners to existing frontends only.
                method: [POST, PUT]
                resources:
                  - /applications/.+/backends/.+/servers/.+
                  - /applications/.+/frontends/.+/listeners/.+

    role_request_simple:
      value:
        role:
          name: apps-admin
          permissions:
            -
              method: ALL
              resources: /applications/.+

    role_request_advanced:
      value:
        role:
          name: sec-admin
          permissions:
            -
              method: GET
              resources: /applications.*
            -
              name: srvrs_lstnrs_add_update
              method: [POST, PUT]
              description: Allow addition/update of servers to existing backends and addition/update of listeners to existing frontends only.
              resources:
                - /applications/.+/backends/.+/servers/.+
                - /applications/.+/frontends/.+/listeners/.+

    role_response_simple:
        $ref: '#/components/examples/role_request_simple'

    role_response_advanced:
        $ref: '#/components/examples/role_request_advanced'

    group_role_association:
      value:
        role:
          ops-role

    group_roles_association:
      value:
        roles:
          - ops-role
          - admin-role

    groups:
      value:
        groups:
          -
            name: netscaler-grp
            roles:
              - ops-role
              - admin-role
    
    simple_app_health:
      value:
        application:
          name: app1
          configured_state: ENABLED
          operational_state: UP
          # servers_configured_state: ENABLED
          # servers_operational_state: UP
          servers:
            -  
              ip: 10.102.201.166
              port: 80
              configured_state: ENABLED
              operational_state: UP
            -  
              ip: 10.102.201.167
              port: 80
              configured_state: ENABLED
              operational_state: UP

    cs_app_simple_backend_health:
     value:
        application:
          name: app1
          configured_state: ENABLED
          operational_state: UP
          frontends:
            - 
              name: fe1
              configured_state: ENABLED
              operational_state: UP
            - 
              name: fe2
              configured_state: ENABLED
              operational_state: DOWN
          # servers_configured_state: ENABLED
          # servers_operational_state: UP
          servers:
            -  
              ip: 10.102.201.166
              port: 80
              configured_state: ENABLED
              operational_state: UP
            -  
              ip: 10.102.201.167
              port: 80
              configured_state: ENABLED
              operational_state: UP

    cs_app_simple_frontend_health:
      value:
        application:
          name: app1
          configured_state: ENABLED
          operational_state: UP
          backends:
          - 
            name: be1
            configured_state: ENABLED
            operational_state: UP
            servers:
              -  
                ip: 10.102.201.166
                port: 80
                configured_state: ENABLED
                operational_state: UP
              -  
                ip: 10.102.201.167
                port: 80
                configured_state: ENABLED
                operational_state: UP
          - 
            name: be2
            configured_state: ENABLED
            operational_state: UP
            servers:
              -  
                ip: 10.102.201.70
                port: 81
                configured_state: ENABLED
                operational_state: UP
    cs_app_health:
      value:
        application:
          name: app1
          configured_state: ENABLED
          operational_state: UP
          frontends:
            - 
              name: fe1
              configured_state: ENABLED
              operational_state: UP
            - 
              name: fe2
              configured_state: ENABLED
              operational_state: DOWN
          backends:
          - 
            name: be1
            configured_state: ENABLED
            operational_state: UP
            servers:
              -  
                ip: 10.102.201.166
                port: 80
                configured_state: ENABLED
                operational_state: UP
              -  
                ip: 10.102.201.167
                port: 80
                configured_state: ENABLED
                operational_state: UP
          - 
            name: be2
            configured_state: ENABLED
            operational_state: UP
            servers:
              -  
                ip: 10.102.201.70
                port: 81
                configured_state: ENABLED
                operational_state: UP
    value_sets:
      value:
        value_sets:
          -
            name: val_set
            type: ipv4
            values:
              - 192.168.11.11
              - 192.168.11.12
              - 192.168.11.13
              - 192.168.11.14

    value_set:
      value:
        value_set:
          name: val_set
          type: ipv4
          values:
            - 192.168.11.11
            - 192.168.11.12
            - 192.168.11.13
            - 192.168.11.14

  schemas:
    # Common Data Types:
    name_data_type:
      type: string
      minLength: 3
      maxLength: 30
      pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$|^_default$"

    valset_name_data_type:
      type: string
      minLength: 3
      maxLength: 30
      pattern: "^[a-zA-Z][a-zA-Z0-9_]*$"

    reference_data_type:
      type: string
      minLength: 3
      maxLength: 30
      pattern: "^[_a-zA-Z][a-zA-Z0-9_-]*$"

    backend_protocol_data_type:
      type: string
      default: HTTP
      enum:
        - HTTP
        - HTTPS

    frontend_protocol_data_type:
      type: string
      default: HTTPS
      enum:
        - HTTP
        - HTTPS

    port_data_type:
      type: number
      minimum: 0
      maximum: 65535

    ip_data_type:
      type: string
      pattern: ^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$

    fqdn_data_type:
      type: string

    time_period_data_type:
      type: string
      pattern: ^\d+(ms|s|sec|m|min|h|hr)$
      example:
        - "1hr"
        - "1h"
        - "20m"
        - "20min"
        - "59sec"
        - "59s"
        - "100ms"

    algorithm_data_type:
      type: string
      description: |
        Method used to direct the client request to the server.
          * LEASTCONNECTIONS - Request is assigned to the server with the least number of active connections.
          * ROUNDROBIN - Requests are distributed across the servers sequentially regardless of the load.
          * LEASTRESPONSETIME -  Request is assigned to the server with the lowest average response time.
          * SOURCEIPHASH - Create a hash of the source IP address.
          * URLHASH - Create a hash of the request URL, or part of the URL if it exceeds 80 characters.
          * DOMAINHASH - Create a hash of the domain name in the request, or part of the domain name if it exceeds 80 characters.
      default: LEASTCONNECTION
      enum:
        - LEASTCONNECTION
        - ROUNDROBIN
        - LEASTRESPONSETIME
        - SOURCEIPHASH
        - URLHASH
        - DOMAINHASH

    stickiness_type_data_type:
      type: string
      description: |
        Configure stickiness to route all connections from the same client to the same server.
          * NONE -  No stickiness configured.
          * COOKIEINSERT - The ADC service inserts an HTTP cookie that is valid for the configured duration. Default duration = 2 mins.
          * SOURCEIP - All connections from the same address are forwarded to the same stickiness session. Default duration = 2 mins.
          * SSLSESSION - Connections with the same SSL session ID belong to the same session. Default duration = 2 mins.
      default: NONE
      enum:
        - NONE
        - COOKIEINSERT
        - SOURCEIP
        - SSLSESSION

    server_data_type:
      description: Specifies a Backend server either as a string in the format "<fqdn_or_ip>" or as an object with ip/port/weight attributes.
      oneOf:
        - type: string
        - type: object
          minProperties: 1
          properties:
            ip:
              $ref: "#/components/schemas/ip_data_type"
            fqdn:
              $ref: "#/components/schemas/fqdn_data_type"
            port:
              $ref: "#/components/schemas/port_data_type"
            weight:
              type: number
              minimum: 1

    filter_data_type:
      type: string

    filter_format_data_type:
      type: string
      default: wireshark
      enum:
          - wireshark
          - pixl

    url_data_type:
      type: string
      pattern: ^(https?|https)://[^\s\/$.?#][^\s]*$

    monitor_type_data_type:
      type: string
      default: HTTP
      enum:
          - HTTP
          - HTTPS
          - TCP
          - TCPS
          - PING

    monitor_probe_method:
      type: string
      default: GET
      enum:
          - POST
          - HEAD
          - PUT
          - GET

    configured_state_data_type:
      type: string
      enum:
        - ENABLED
        - DISABLED

    operational_state_data_type:
      type: string
      enum:
        - UP
        - DOWN

    #Main Objects
    Server:
      type: object
      required:
        - server
      properties:
        server:
          $ref: "#/components/schemas/server_data_type"

    Servers:
      type: object
      properties:
        servers:
          type: array
          items:
            $ref: "#/components/schemas/server_data_type"
    
    ServersRequired:
      required:
        - servers
      allOf:
        - $ref: "#/components/schemas/Servers"

    HTTPRedirectProperties:
      type: object
      required:
        - url
      properties:
        name:
          description: Name of the HTTP Redirect Settings object
          $ref: "#/components/schemas/name_data_type"
        filter:
          description: Filter expression that specifies the subset of traffic for which these settings apply. If not specified, no filtering is applied.
          $ref: "#/components/schemas/filter_data_type"
        filter_format:
          description: Filter expression format. The default format is wireshark display filter expressions format.
          $ref: "#/components/schemas/filter_format_data_type"
        url:
          description: The URL to which traffic matching the filter will be redirected to.
          $ref: "#/components/schemas/url_data_type"

    MultiHTTPRedirectProperties:
          type: array
          items:
              $ref: "#/components/schemas/HTTPRedirectProperties"

    HTTPRedirectInline:
      type: object
      description: This is mutually-exclusive with HTTPRedirectReferences object
      properties:
        http_redirect:
          oneOf:
            -
              $ref: "#/components/schemas/HTTPRedirectProperties"
            -
              $ref: "#/components/schemas/MultiHTTPRedirectProperties"

    HTTPRedirectDefinitions:
      type: object
      properties:
        http_redirect_defs:
          type: array
          items:
              $ref: "#/components/schemas/HTTPRedirectProperties"

    HTTPRedirectReferences:
      type: object
      description: This is mutually-exclusive with HTTPRedirectInline object
      properties:
        http_redirect_refs:
          type: array
          items:
            $ref: "#/components/schemas/reference_data_type"


    HTTPResponderProperties:
      type: object
      required:
        - response
      properties:
        name:
          description: Name of the HTTP Responder Settings object
          $ref: "#/components/schemas/name_data_type"
        filter:
          description: Filter expression that specifies the subset of traffic for which these settings apply. If not specified, no filtering is applied.
          $ref: "#/components/schemas/filter_data_type"
        filter_format:
          description: Filter expression format. The default format is wireshark display filter expressions format.
          $ref: "#/components/schemas/filter_format_data_type"
        response:
          description: The HTTP response string returned to the client if the traffic matches the filter expression.
          type: string

    MultiHTTPResponderProperties:
      type: array
      items:
          $ref: "#/components/schemas/HTTPResponderProperties"

    HTTPResponderInline:
      type: object
      description: This is mutually-exclusive with HTTPResponderReferences object
      properties:
          http_responder:
            oneOf:
              -
                $ref: "#/components/schemas/HTTPResponderProperties"
              -
                $ref: "#/components/schemas/MultiHTTPResponderProperties"

    HTTPResponderDefinitions:
      type: object
      properties:
        http_responder_defs:
          type: array
          items:
              $ref: "#/components/schemas/HTTPResponderProperties"

    HTTPResponderReferences:
      description: This is mutually-exclusive with HTTPResponderInline object
      type: object
      properties:
        http_responder_refs:
          type: array
          items:
              $ref: "#/components/schemas/reference_data_type"

    HealthCheckProperties:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/name_data_type"
          # description: Name of the health check.
        type:
          $ref: "#/components/schemas/monitor_type_data_type"
          # description: Protocol of the health check.
        probe_request_str:
          type: string
          description: HTTP request URL path to which health checks are sent. Only applicable to HTTP/HTTPS health checks.
          default: "GET /"
        probe_request:
          description: You can also specify the probe request by its individual components (rather than just a URL) scuh as HTTP method, headers, etc.
          type: object
          properties:
            method:
              description: The HTTP Method used by the probe request
              $ref: "#/components/schemas/monitor_probe_method"
            host:
              description: The HTTP Hostname used by the probe request URL
              type: string
            port:
              description: The HTTP port used by the probe request
              $ref: "#/components/schemas/port_data_type"
              # description:  Destination port where health checks are sent. If this parameter is not configured,
                # the health checks are sent to the same port as regular traffic.
            path:
              description: The path used by the probe request URL
              type: string
            query_str:
              description: The query string used by the probe request URL
              type: string
            headers:
              description: The headers used by the probe request
              type: object
              additionalProperties:
                type: string
            body:
              description: The body used by the probe request
              type: string
        probe_healthy_response:
          type: object
          properties:
            status_codes:
              type: array
              default: [ 200 ]
              items:
                type: string
                description: Expected HTTP response codes to mark the server
                  as healthy. Used only when "response_substring" is not set.
            response_substring:
              description: Expected sub string to be found in the probe response.
              type: string
            max_response_time:
              type: string
              description: The time within which a response must be received from the server.
                Must be less than the "interval" value. Max Value is 20939s.
        interval:
          description: Time interval between two successive health checks to the server.
            Must be greater than the "max_response_time" value. Max Value is 20939s.
          type: string
        num_retries_on_failure:
          type: number
          description: Number of retries to determine the health of the server once a probe has failed.
          minimum: 1
          maximum: 127
          default: 3
        min_failed_retries:
          type: number
          description: Number of retries that must fail, out of the number specified for the num_retries_on_failure parameter,
            for a service to be marked as DOWN. If this field is not provided, then all retries specified by num_retries_on_failure parameter
            value must fail to mark the server as DOWN.
          minimum: 1
          maximum: 32
        wait_period_after_failure:
          type: string
          description: Time interval between two successive health checks to an unhealthy server. Max Value is 20939s.
        num_consecutive_successful_retries:
          type: number
          description: Number of consecutive successful probes required to transition a service's state from DOWN to UP.
          minimum: 1
          maximum: 32

    MultiHealthCheckProperties:
      type: array
      items:
          $ref: "#/components/schemas/HealthCheckProperties"

    HealthCheckDefinitions:
      type: object
      properties:
        health_check_defs:
          type: array
          items:
              $ref: "#/components/schemas/HealthCheckProperties"

    HealthCheckReferences:
      description: This is mutually-exclusive with HealthCheckInline object
      type: object
      properties:
        health_check_refs:
          type: array
          items:
              $ref: "#/components/schemas/reference_data_type"

    HealthCheckInline:
      type: object
      description: This is mutually-exclusive with HealthCheckReferences object
      properties:
          health_check:
                $ref: "#/components/schemas/HealthCheckProperties"
          health_checks:
                $ref: "#/components/schemas/MultiHealthCheckProperties"

    HTTPRedirectInlineOrReferences:
      allOf:
        - $ref: "#/components/schemas/HTTPRedirectInline"
        - $ref: "#/components/schemas/HTTPRedirectReferences"

    HTTPResponderInlineOrReferences:
      allOf:
        - $ref: "#/components/schemas/HTTPResponderInline"
        - $ref: "#/components/schemas/HTTPResponderReferences"

    HealthCheckInlineOrReferences:
      allOf:
        - $ref: "#/components/schemas/HealthCheckInline"
        - $ref: "#/components/schemas/HealthCheckReferences"

    CommonSettingsInlineOrReferences:
      allOf:
        - $ref: "#/components/schemas/HTTPRedirectInlineOrReferences"
        - $ref: "#/components/schemas/HTTPResponderInlineOrReferences"

    CommonSettingsDefinitions:
      allOf:
        - $ref: "#/components/schemas/LoadBalancingDefinitions"
        - $ref: "#/components/schemas/HealthCheckDefinitions"
        - $ref: "#/components/schemas/HTTPRedirectDefinitions"
        - $ref: "#/components/schemas/HTTPResponderDefinitions"
        - $ref: "#/components/schemas/TLSSettingsDefinitions"

    DefaultBackendProperties:
      allOf:
        - type: object
          properties:
            servers_protocol:
              $ref: "#/components/schemas/backend_protocol_data_type"
            servers_port:
              $ref: "#/components/schemas/port_data_type"
        - $ref: "#/components/schemas/Servers"
        - type: object
          properties:
            unavailable_redirect_url:
              $ref: "#/components/schemas/url_data_type"
        - $ref: "#/components/schemas/LoadBalancingInlineOrReference"
        - $ref: "#/components/schemas/HealthCheckInlineOrReferences"

    LoadBalancingInlineOrReference:
      allOf:
        - $ref: "#/components/schemas/LoadBalancing"
        - $ref: "#/components/schemas/LoadBalancingReference"


    BackendProperties:
      required:
        - name
        - servers
      allOf:
        - type: object
          properties:
            name:
              $ref: "#/components/schemas/name_data_type"
        - $ref: "#/components/schemas/DefaultBackendProperties"
        - $ref: "#/components/schemas/CommonSettingsInlineOrReferences"

    Backend:
      type: object
      required:
        - backend
      properties:
        backend:
          $ref: "#/components/schemas/BackendProperties"

    Backends:
      type: object
      properties:
        backends:
          type: array
          items:
            $ref: "#/components/schemas/BackendProperties"

    HttpToHttpsRedirectProperties:
      type: object
      properties:
          http_to_https_redirect:
            type: boolean
            default: false
          http_redirect_port:
            $ref: "#/components/schemas/port_data_type"

    ListenerParameters:
      required:
        - name
      allOf:
        - type: object
          properties:
            name:
              description: Name of the listener
              $ref: "#/components/schemas/name_data_type"
            protocol:
              description: Protocol of the listener
              $ref: "#/components/schemas/frontend_protocol_data_type"
            port:
              description: Port of the listener
              $ref: "#/components/schemas/port_data_type"
            certificate_refs:
              description: List of SNI Certificate names. Used to match the SNI sent by the client.
              type: array
              items:
                $ref: "#/components/schemas/reference_data_type"
            default_certificate_ref:
              description: Default certificate of the listener. Used if clients don't send an SNI or the SNI they send doesn't match any other certificate.
              $ref: "#/components/schemas/reference_data_type"
            default_backend_ref:
              description: The Backend name used to route this listener's requests, for which no match was found in the specified routes.
              $ref: "#/components/schemas/reference_data_type"
        - $ref: "#/components/schemas/HttpToHttpsRedirectProperties"
        - $ref: "#/components/schemas/CommonSettingsInlineOrReferences"
        - $ref: "#/components/schemas/TLSSettingsInlineOrReference"

    Listener:
      type: object
      required:
        - listener
      properties:
        listener:
          $ref: "#/components/schemas/ListenerParameters"

    Listeners:
      type: object
      properties:
        listeners:
          type: array
          items:
            $ref: "#/components/schemas/ListenerParameters"

    ListenersRequired:
      required:
        - listeners
      allOf:
        - $ref: "#/components/schemas/Listeners"

    DefaultFrontendProperties:
      allOf:
        - type: object
          properties:
            virtual_ip:
              description: The Virtual IP of this frontend
              $ref: "#/components/schemas/ip_data_type"
            protocol:
              description: The protocol of this frontend
              $ref: "#/components/schemas/frontend_protocol_data_type"
            port:
              description: The port of this frontend
              $ref: "#/components/schemas/port_data_type"
            certificate_refs:
              description: List of SNI Certificate names. Used to match the SNI sent by the client.
              type: array
              items:
                $ref: "#/components/schemas/reference_data_type"
            default_certificate_ref:
              description: The Backend name used to route this listener's requests, for which no match was found in the specified routes.
              $ref: "#/components/schemas/reference_data_type"

    SimpleFrontend:
      required:
        - name
        - virtual_ip
        - protocol
      allOf:
        - type: object
          properties:
            name:
              description: Name of this frontend
              $ref: "#/components/schemas/name_data_type"
            default_backend_ref:
              description: The Backend name used to route this frontend's requests, for which no match was found in the specified routes.
              $ref: "#/components/schemas/reference_data_type"
        - $ref: "#/components/schemas/DefaultFrontendProperties"
        - $ref: "#/components/schemas/HttpToHttpsRedirectProperties"
        - $ref: "#/components/schemas/CommonSettingsInlineOrReferences"
        - $ref: "#/components/schemas/TLSSettingsInlineOrReference"


    SimpleFrontendWithListeners:
      required:
        - name
        - virtual_ip
        - listeners
      allOf:
        - type: object
          properties:
            name:
              description: Name of this frontend
              $ref: "#/components/schemas/name_data_type"
            virtual_ip:
              description: The Virtual IP of this frontend
              $ref: "#/components/schemas/ip_data_type"
        - 
          description: The Listeners for this frontend. Each listener is on a different port/protocol.
          $ref: "#/components/schemas/Listeners"

    BaseFrontend:
      oneOf:
        - $ref: "#/components/schemas/SimpleFrontend"
        - $ref: "#/components/schemas/SimpleFrontendWithListeners"

    FrontendProperties:
      allOf:
        - $ref: "#/components/schemas/BaseFrontend"

    Frontend:
      type: object
      required:
        - frontend
      properties:
        frontend:
          $ref: "#/components/schemas/FrontendProperties"

    Frontends:
      type: object
      properties:
        frontends:
          type: array
          items:
            $ref: "#/components/schemas/FrontendProperties"

    RouteProperties:
      type: object
      required:
        - name
        - backend_ref
      properties:
        name:
          description: Name of the route
          $ref: "#/components/schemas/name_data_type"
        filter:
          description: Filter expression used to match traffic for which this route applies. If not specified, no filtering is applied.
          $ref: "#/components/schemas/filter_data_type"
        filter_format:
          description: Filter expression format. The default format is the wireshark dsiplay filters format.
          $ref: "#/components/schemas/filter_format_data_type"
        frontend_ref:
          description: The frontend used for this route. Only requests coming from this frontend are considered. This is an optional attribute.
          $ref: "#/components/schemas/reference_data_type"
        listener_ref:
          description: |
            The listener used for this route. Only requests coming from this listener are considered. 
            This attribute is mutually exclusive with frontend attribute. This is an optional attribute.
          $ref: "#/components/schemas/reference_data_type"
        backend_ref:
          description: The backend to route requests to, when they match the filter expression of this route.
          $ref: "#/components/schemas/reference_data_type"

    Route:
      type: object
      required:
        - route
      properties:
        route:
          $ref: "#/components/schemas/RouteProperties"

    Routes:
      type: object
      properties:
        routes:
          type: array
          items:
            $ref: "#/components/schemas/RouteProperties"

    LoadBalancingProperties:
      type: object
      minProperties: 1
      properties:
        name:
          description: Name of this Load Balancing Settings object
          $ref: "#/components/schemas/name_data_type"
        algorithm:
          description: The LB Algorithm (Method) used to load balance incoming requests/connections to backend servers.
          $ref: "#/components/schemas/algorithm_data_type"
        stickiness_type:
          description: The stickiness or persistence type used to determine which requests should go to the same backend servers.
          $ref: "#/components/schemas/stickiness_type_data_type"
        stickiness_timeout:
          description: Timeout value after which to clear a stickiness if it hasn't been used during that time.
          allOf:
            - $ref: "#/components/schemas/time_period_data_type"
            -
              x-minimum: "0min"
              x-maximum: "1440min"
              x-default: "2min"

    LoadBalancing:
      type: object
      properties:
        load_balancing:
          $ref: "#/components/schemas/LoadBalancingProperties"

    LoadBalancingDefinitions:
      type: object
      properties:
        load_balancing_defs:
          type: array
          items:
            $ref: "#/components/schemas/LoadBalancingProperties"

    LoadBalancingReference:
      type: object
      properties:
        load_balancing_ref:
          $ref: "#/components/schemas/reference_data_type"

    TLSSettingsProperties:
      type: object
      minProperties: 1
      properties:
        name:
          description: Name of this TLS Settings object
          $ref: "#/components/schemas/name_data_type"
        security_level:
          description: A simple way to set security level for TLS to HIGH, MEDIUM or LOW.
          type: string
          enum:
            - HIGH
            - MEDIUM
            - LOW
        tls_protocols:
          description: This attribute is mutually exclusive with security_level and allows you to be more prescriptive about the TLS protocols to be supported.
          type: array
          items:
            type: string
            enum:
              - TLS-1
              - TLS-1.1
              - TLS-1.2
              - TLS-1.3
        tls_cipher_suites:
          description: This attribute is mutually exclusive with security_level and allows you to be more prescriptive about the TLS ciphers to be supported.
          type: array
          items:
            type: string
        enable_session_reuse:
          description: Enables TLS session reuse. 
          type: boolean
          default: true
        session_timeout:
          description: Sets a timeout value on the duration of a TLS session that is not in use.
          $ref: "#/components/schemas/time_period_data_type"

    MultiTLSSettingsProperties:
      type: array
      items:
        $ref: "#/components/schemas/TLSSettingsProperties"


    TLSSettingsDefinitions:
      type: object
      properties:
        tls_settings_defs:
          type: array
          items:
            $ref: "#/components/schemas/TLSSettingsProperties"

    TLSSettingsReference:
      type: object
      properties:
        tls_settings_ref:
          $ref: "#/components/schemas/reference_data_type"

    TLSSettingsInline:
      type: object
      properties:
        tls_settings:
          oneOf:
            -
              $ref: "#/components/schemas/TLSSettingsProperties"
            -
              $ref: "#/components/schemas/MultiTLSSettingsProperties"

    # Currently only supported for frontends
    TLSSettingsInlineOrReference:
      allOf:
        - $ref: "#/components/schemas/TLSSettingsInline"
        - $ref: "#/components/schemas/TLSSettingsReference"

    # default frontend, default backend - defs, refs (for frontend)
    SimpleApplication:
      required:
        - name
        - virtual_ip
        - servers
      allOf:
        - type: object
          properties:
            name:
              $ref: "#/components/schemas/name_data_type"
        - $ref: "#/components/schemas/DefaultFrontendProperties"
        - $ref: "#/components/schemas/HttpToHttpsRedirectProperties"
        - $ref: "#/components/schemas/Listeners"
        - $ref: "#/components/schemas/DefaultBackendProperties"
        - $ref: "#/components/schemas/CommonSettingsInlineOrReferences"
        - $ref: "#/components/schemas/TLSSettingsInlineOrReference"
        - $ref: "#/components/schemas/CommonSettingsDefinitions"

    # frontends, default backend - defs, refs (for backend)
    CSApplicationWithSimpleBackend:
      required:
        - name
        - frontends
        - servers
      allOf:
        - type: object
          properties:
            name:
              $ref: "#/components/schemas/name_data_type"
        - $ref: "#/components/schemas/Frontends"
        - $ref: "#/components/schemas/DefaultBackendProperties"
        - $ref: "#/components/schemas/CommonSettingsInlineOrReferences"
        - $ref: "#/components/schemas/CommonSettingsDefinitions"


    # default frontend, backends - defs, refs (for frontend)
    CSApplicationDefaultFrontend:
      required:
        - name
        - virtual_ip
        - backends
        - routes
      allOf:
        - type: object
          properties:
            name:
              $ref: "#/components/schemas/name_data_type"
        - $ref: "#/components/schemas/DefaultFrontendProperties"
        - $ref: "#/components/schemas/HttpToHttpsRedirectProperties"
        - $ref: "#/components/schemas/Listeners"
        - $ref: "#/components/schemas/Backends"
        - $ref: "#/components/schemas/Routes"
        - $ref: "#/components/schemas/CommonSettingsInlineOrReferences"
        - $ref: "#/components/schemas/TLSSettingsInlineOrReference"
        - $ref: "#/components/schemas/CommonSettingsDefinitions"


    # frontends, backends - defs, no refs (refs inside backend/frontend)
    CSApplicationWithMultipleFrontends:
      required:
        - name
        - frontends
        - backends
        - routes
      allOf:
        - type: object
          properties:
            name:
              $ref: "#/components/schemas/name_data_type"
        - $ref: "#/components/schemas/Frontends"
        - $ref: "#/components/schemas/Backends"
        - $ref: "#/components/schemas/Routes"
        - $ref: "#/components/schemas/CommonSettingsDefinitions"

    ApplicationProperties:
      oneOf:
        - $ref: "#/components/schemas/SimpleApplication"
        - $ref: "#/components/schemas/CSApplicationWithSimpleBackend"
        - $ref: "#/components/schemas/CSApplicationDefaultFrontend"
        - $ref: "#/components/schemas/CSApplicationWithMultipleFrontends"

    Application:
      type: object
      required:
        - application
      properties:
        application:
            $ref: "#/components/schemas/ApplicationProperties"

    Applications:
      type: object
      required:
        - applications
      properties:
        applications:
          type: array
          items:
            $ref: "#/components/schemas/ApplicationProperties"

    ApplicationConfigStatus:
      type: object
      required:
        - status
      properties:
        status:
          $ref: "#/components/schemas/ApplicationConfigStatusProperties"
      example:
        status:
          description: "Progress status for Resource: simple_app_4"
          state: "INSTALLED"
          tasks:
            - stage: "COMPUTE_DIFF"
              state: "COMPLETED"
            - stage: "APPLY_CONFIG"
              state: "INPROGRESS"

    ServerHealth:
      type: object
      properties:
        ip:
          $ref: "#/components/schemas/ip_data_type"
        fqdn:
          $ref: "#/components/schemas/fqdn_data_type"
        port:
            $ref: "#/components/schemas/port_data_type"
        configured_state:
          $ref: "#/components/schemas/configured_state_data_type"
        operational_state:
          $ref: "#/components/schemas/operational_state_data_type"
      
    ServersHealth:
      type: object
      properties:
        # servers_configured_state:
        #   $ref: "#/components/schemas/configured_state_data_type"
        # servers_operational_state:
        #   $ref: "#/components/schemas/operational_state_data_type"
        servers:
          type: array
          items:
            $ref: "#/components/schemas/ServerHealth"

    ApplicationSubcomponentHealth:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/name_data_type"
        configured_state:
          $ref: "#/components/schemas/configured_state_data_type"
        operational_state:
          $ref: "#/components/schemas/operational_state_data_type"

    FrontendsHealth:
      type: object
      properties:
        frontends:
          type: array
          items:
            $ref: "#/components/schemas/ApplicationSubcomponentHealth"

    BackendsHealth:
      type: object
      properties:
        backends:
          type: array
          items:
            allOf:
              # - $ref: "#/components/schemas/ApplicationSubcomponentHealth"
              - $ref: "#/components/schemas/ServersHealth"
        
    # default frontend, default backend
    SimpleApplicationHealth:
      allOf:
        - $ref: "#/components/schemas/ApplicationSubcomponentHealth"
        - $ref: "#/components/schemas/ServersHealth"

    # frontends, default backend
    CSApplicationWithSimpleBackendHealth:
      allOf:
        - $ref: "#/components/schemas/ApplicationSubcomponentHealth"
        - $ref: "#/components/schemas/FrontendsHealth"
        - $ref: "#/components/schemas/ServersHealth"

    # default frontend, backends
    CSApplicationDefaultFrontendHealth:
        allOf:
          - $ref: "#/components/schemas/ApplicationSubcomponentHealth"
          - $ref: "#/components/schemas/BackendsHealth"

    # frontends, backends
    CSApplicationWithMultipleFrontendsHealth:
      allOf:
        - $ref: "#/components/schemas/ApplicationSubcomponentHealth"
        - $ref: "#/components/schemas/FrontendsHealth"
        - $ref: "#/components/schemas/BackendsHealth"

    ApplicationHealth:
      properties:
        application:
          oneOf:
            - $ref: "#/components/schemas/SimpleApplicationHealth"
            - $ref: "#/components/schemas/CSApplicationWithSimpleBackendHealth"
            - $ref: "#/components/schemas/CSApplicationDefaultFrontendHealth"
            - $ref: "#/components/schemas/CSApplicationWithMultipleFrontendsHealth"

    ResourceStates:
      type: string
      default: desired
      enum:
        - current
        - desired

    ResourceConfigStates:
      type: string
      enum:
        - ACCEPTED
        - INSTALLED

    TaskStates:
      type: string
      enum:
        - NOTSTARTED
        - INPROGRESS
        - COMPLETED

    TaskStages:
        type: string
        enum:
          - COMPUTE_DIFF
          - APPLY_CONFIG

    ApplicationConfigStatusProperties:
      type: object
      required:
        - state
      properties:
        description:
          type: string
        state:
          $ref : "#/components/schemas/ResourceConfigStates"
        tasks:
          type: array
          items:
            $ref: "#/components/schemas/TaskStatus"

    TaskStatus:
      type: object
      required:
        - stage
        - state
      properties:
        stage:
          $ref : "#/components/schemas/TaskStages"
        state:
          $ref : "#/components/schemas/TaskStates"

    CertificateUpload:
      type: object
      required:
        - certificate
      properties:
        certificate:
          type: object
          required:
            - name
            - public_cert
          properties:
            name:
              $ref: "#/components/schemas/name_data_type"
            public_cert:
              type: string
            private_key:
              type: string
            passphrase:
              type: string
              format: password
            cert_chain:
              type: array
              items:
                type: string

    Certificate_Details:
      type: object
      properties:
        name:
          $ref: "#/components/schemas/name_data_type"
        serial:
          type: string
        x509_version:
          type: string
          enum:
            - "3"
        sha256_fingerprint:
          type: string
        common_name:
          type: string
        subject:
            type: string
        issuer:
          type: string
        subject_alternative_names:
          type: array
          items:
            type: object
          example:
            DNS: www.example.com
        creation_date:
          type: string
          format: date-time
        expiry_date:
          type: string
          format: date-time
        key_usage:
          type: array
          items:
            type: string
            enum:
              - Signing
              - Key Encipherment
        extended_key_usage:
          type: array
          items:
            type: string
            enum:
              - TLS Web Server Authentication
              - TLS Web Client Authentication
        status:
          type: string
          enum:
            - Issued
            - Expired
            - Revoked
        domains:
          type: array
          items:
            type: string
        signature_algorithm:
          type: string
          example: sha256WithRSAEncryption
        key_algorithm:
          type: string
          enum:
            - rsaEncryption
            - Diffie-Hellman
            - DSA
            - ECDSA
        key_size:
          type: number
        validation_type:
          type: string
          enum:
            - dv
        basic_constraints:
          type: array
          items:
            type: object
        is_self_signed:
          type: boolean
        modulus:
          type: string
        modulus_length:
          type: number
        exponent:
          type: number

    Certificate:
      type: object
      properties:
        certificate:
          $ref: "#/components/schemas/Certificate_Details"

    Certificates:
      type: array
      items:
        $ref: "#/components/schemas/Certificate_Details"

    LoginRequest:
      type: object
      required:
        - login
      properties:
        login:
          type: object
          required:
            - username
            - password
          properties:
            username:
              type: string
            password:
              type: string
            timeout:
              $ref: "#/components/schemas/time_period_data_type"
              x-default: "30min"
      example:
        login:
          username: nsroot
          password: admin@123
          timeout: 5hr

# RBAC schemas
    RoleProperties:
      type: object
      required:
        - name
      properties:
        name:
          $ref: "#/components/schemas/name_data_type"
        permissions:
          type: array
          items:
            $ref: "#/components/schemas/Permission"

    PermissionMethod:
      type: string
      enum:
        - GET
        - POST
        - PUT
        - DELETE
        - ALL

    MultiPermissionMethod:
      type: array
      items:
        $ref: "#/components/schemas/PermissionMethod"

    Permission:
      type: object
      required:
        - method
        - resources
      properties:
        method:
          description: HTTP Method(s) to be allowed
          oneOf:
            - $ref: "#/components/schemas/PermissionMethod"
            - $ref: "#/components/schemas/MultiPermissionMethod"
        description:
          type: string
        resources:
          description: Regex for the Resource URL
          oneOf:
            - type: array
              items:
                type: string
            - type: string

    Role:
      type: object
      required:
        - role
      properties:
        role:
          $ref: "#/components/schemas/RoleProperties"

    Roles:
      type: object
      required:
        - roles
      properties:
        roles:
          type: array
          items:
            $ref: "#/components/schemas/RoleProperties"

    GroupRole:
      type: object
      required:
        - role
      properties:
        role:
          type: string

    GroupRoles:
      type: object
      required:
        - roles
      properties:
        roles:
          type: array
          items:
            type: string
          uniqueItems: true

    Groups:
      type: object
      required:
        - groups
      properties:
        groups:
          type: array
          items:
            allOf:
              -
                type: object
                properties:
                  name:
                    type: string
              -
                $ref: "#/components/schemas/GroupRoles"

    FilterValueSetProperties:
      type: object
      required:
        - name
      properties:
        name:
          $ref: "#/components/schemas/valset_name_data_type"
        type:
          type: string
          default: string
          enum:
            - string
            - ipv4
            - ipv6
            - number
        values:
          type: array
          description: List of values conforming to the type parameter
          items:
            type: string

    FilterValueSet:
      type: object
      required:
        - value_set
      properties:
        value_set:
          $ref: "#/components/schemas/FilterValueSetProperties"

    FilterValueSets:
      type: object
      required:
        - value_sets
      properties:
        value_sets:
          type: array
          items:
            $ref: "#/components/schemas/FilterValueSetProperties"

# Error Responses
    ErrorResponseBody:
      properties:
        errorcode:
          type: integer
        errormessage:
          type: string
        details:
          type: array
          items:
            type: object
            required:
            - message
            properties:
              instance:
                type: string
              errorcode:
                type: integer
              message:
                type: string
      required:
      - errorcode
      - errormessage
    ErrorResponseBody400:
      allOf:
      - $ref: '#/components/schemas/ErrorResponseBody'
      example:
        errorcode: 1001
        errormessage: Invalid json data
        details: []
      description: 'A unique `errorcode` and `errormessage` for the specific error. Possible values:
    
        - `1000` "Bad Request"
    
        - `1001` "Invalid json data"
    
        - `1002` "Resource name is different in url and payload"
    
        - `1003` "Missing query parameters"
    
        '
    ErrorResponseBody401:
      allOf:
      - $ref: '#/components/schemas/ErrorResponseBody'
      example:
        errorcode: 1102
        errormessage: User not authorized for this operation
        details: []
      description: 'A unique `errorcode` and `errormessage` for the specific error. Possible values:
    
        - `1100` "Unauthorized Request"
    
        - `1101` "Session expired or killed. Please login again"
    
        - `1102` "User not authorized for this operation"
    
        - `1103` "Authentication failed - Please provide sessionid in the cookie"
    
        - `1103` "Invalid username or password"
    
        '
    ErrorResponseBody404:
      allOf:
      - $ref: '#/components/schemas/ErrorResponseBody'
      example:
        errorcode: 1201
        errormessage: Application not found
        details: []
      description: 'A unique `errorcode` and `errormessage` for the specific error. Possible values:
    
        - `1200` "Resource not found"
    
        - `1201` "Application not found"
    
        - `1202` "Frontend not found"
    
        - `1203` "Listener not found"
    
        - `1204` "Backend not found"
    
        - `1205` "Server not found"
    
        - `1206` "Route not found"
    
        - `1207` "Certificate not found"
    
        - `1208` "Role not found"
    
        - `1209` "Roles not found"
    
        - `1210` "No Role associations found for group"
    
        - `1211` "Value set not found"
    
        '
    ErrorResponseBody406:
      allOf:
      - $ref: '#/components/schemas/ErrorResponseBody'
      example:
        errorcode: 1300
        errormessage: We only support sending responses in JSON format
        details: []
      description: 'A unique `errorcode` and `errormessage` for the specific error. Possible values:
    
        - `1300` "We only support sending responses in JSON format"
    
        '
    ErrorResponseBody409:
      allOf:
      - $ref: '#/components/schemas/ErrorResponseBody'
      example:
        errorcode: 1401
        errormessage: Delete of resource already in progress
        details: []
      description: 'A unique `errorcode` and `errormessage` for the specific error. Possible values:
    
        - `1400` "Resource already exists"
    
        - `1401` "Delete of resource already in progress"
    
        - `1402` "Delete of this resource is not possible as it is being referenced by other resources"
    
        - `1410` "Application already exists"
    
        - `1411` "Frontend already exists"
    
        - `1412` "Listener already exists"
    
        - `1414` "Backend already exists"
    
        - `1414` "Server already exists"
    
        - `1415` "Route already exists"
    
        - `1416` "Certificate already exists"
    
        - `1417` "Role already exists"
    
        - `1418` "Group Role association already exists"
    
        - `1419` "Value set already exists"
    
        '
    ErrorResponseBody415:
      allOf:
      - $ref: '#/components/schemas/ErrorResponseBody'
      example:
        errorcode: 1500
        errormessage: We only support requests in JSON format
        details: []
      description: 'A unique `errorcode` and `errormessage` for the specific error. Possible values:
    
        - `1500` "We only support requests in JSON format"
    
        '
    ErrorResponseBody422:
      allOf:
      - $ref: '#/components/schemas/ErrorResponseBody'
      example:
        errorcode: 2000
        errormessage: Validation Failed
        details:
        - instance: '{''name'': ''app2'', ''virtual_ip'': ''70.122.23.12'', ''protocol'': ''HTTPS'', ''servers'':
            [''192.168.10.11'']}'
          message: '''certificate_ref'' is a required property for ''protocol'':''HTTPS'''
      description: "A unique `errorcode` and `errormessage` for the specific error. Possible values:\n- `2000`\
        \ \"Validation Failed\"\n\n\tFollowing sub error codes are possible:\n\t- `2001` \"Certificate Chain\
        \ is invalid\"\n\t- `2002` \"Certificate is invalid\"\n\t- `2003` \"Certificate with key size smaller\
        \ than 512 bits not supported\"\n\t- `2004` \"Certificate with key size (modulus) that is not multiple\
        \ of 512 bits is not supported\"\n\t- `2005` \"Certificate key size not supported (max: 2048bits)\"\
        \n\t- `2006` \"Certificate key size not supported (max: 4096bits)\"\n\t- `2007` \"The EC curve in\
        \ the ECDSA certificate is not supported\"\n\t- `2008` \"Certificate parsing failed\"\n\t- `2009`\
        \ \"Invalid private key\"\n\t- `2010` \"Private key doesn't mach the public certificate\"\n\t- `2011`\
        \ \"Passphrase not provided for encrypted private key\"\n\t- `2012` \"Passphrase must not be provided\
        \ if private key is not encrypted\"\n\t- `2021` \"Referred value set(s) not found\"\n- `3001` \"The\
        \ resource cannot be deleted because it is the last remaining resource of its kind.\"\n"
    ErrorResponseBody500:
      allOf:
      - $ref: '#/components/schemas/ErrorResponseBody'
      example:
        errorcode: 1600
        errormessage: Internal Server Error
        details: []
      description: 'A unique `errorcode` and `errormessage` for the specific error. Possible values:
    
        - `1600` "Internal Server Error"
    
        '
# DO NOT ADD ANYTHING AFTER ERROR RESPONSE BODIES AS THEY ARE PROGRAMATICALLY GENERATED AND INJECTED AT THE END OF YAML
