import { SocialNetworkProvidersController } from "../../controllers/social-network/social-network-provider.controller";
import { SocialNetworkProvidersValidator } from "../../validators/social-network/social-network-provider.validator";
import { AbstractRoute } from "../abstract.route";

const express = require("express");
const router = express.Router();
const controller = new SocialNetworkProvidersController();

class SocialNetworkProvidersRoute extends AbstractRoute {
  constructor(_controller, _router) {
    super(_controller, _router, new SocialNetworkProvidersValidator());
  }
  /**
   * Get all social network provider
   * @swagger
   * /social-networks/providers:
   *    get:
   *      tags:
   *        - SocialNetworksProvider
   *      summary: "Get all social network provider"
   *      description: "List all social network provider with details"
   *      security:
   *        - bearerAuth: []
   *      operationId: "GETsocialNetworkProviders"
   *      produces:
   *      - "application/xml"
   *      - "application/json"
   *      parameters:
   *      - $ref: '#/components/parameters/store'
   *      - $ref: '#/components/parameters/pageParam'
   *      - $ref: '#/components/parameters/limitParam'
   *      - name: "sort"
   *        in: "query"
   *        description: "The type of sort of items to return."
   *        required: false
   *        schema:
   *          type: "string"
   *          enum: [createdAt, -createdAt]
   *      responses:
   *        "200":
   *          description: "successful operation"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/SocialNetworkProvidersGetItemsSchema'
   *        "204":
   *          description: "successful operation with empty respose"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/SocialNetworkProvidersGetItemsSchema'
   *        "401":
   *          description: "Not allow because you need a Authentication Token"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        '403':
   *          description: "Not allow because you need more permissions"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        "404":
   *          description: "social network provider not found"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        default:
   *          description: "Unexpected Error"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   */
  /**
   * Find social network provider by ID
   * @swagger
   * /social-networks/providers/{id}:
   *    get:
   *      tags:
   *        - SocialNetworksProvider
   *      summary: "Find social network provider by ID"
   *      description: "Returns a single social network provider"
   *      security:
   *        - bearerAuth: []
   *      operationId: "GETsocialNetworkProvider"
   *      produces:
   *      - "application/xml"
   *      - "application/json"
   *      parameters:
   *      - $ref: '#/components/parameters/store'
   *      - name: "id"
   *        in: "path"
   *        description: "ID of social network provider to return"
   *        required: true
   *      responses:
   *        "200":
   *          description: "successful operation"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/SocialNetworkProvidersGetItemSchema'
   *        "204":
   *          description: "successful operation with empty respose"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/SocialNetworkProvidersGetItemSchema'
   *        "401":
   *          description: "Not allow because you need a Authentication Token"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        '403':
   *          description: "Not allow because you need more permissions"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        "404":
   *          description: "social network provider not found"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        default:
   *          description: "Unexpected Error"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   */
  /**
   * Add a social network provider
   * @swagger
   * /social-networks/providers:
   *    post:
   *      tags:
   *        - SocialNetworksProvider
   *      summary: "Add a social network provider"
   *      description: "Add a social network provider"
   *      operationId: "ADDsocialNetworkProvider"
   *      security:
   *        - bearerAuth: []
   *      parameters:
   *      - $ref: '#/components/parameters/store'
   *      requestBody:
   *        content:
   *          application/json:
   *            schema:
   *              $ref: "#/definitions/SocialNetworkProvidersCreateItemSchema"
   *      responses:
   *        "200":
   *          description: "successful operation"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/SocialNetworkProvidersGetItemSchema'
   *        "201":
   *          description: "Created successfully"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/SocialNetworkProvidersGetItemSchema'
   *        "401":
   *          description: "Not allow because you need a Authentication Token"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        '403':
   *          description: "Not allow because you need more permissions"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        "404":
   *          description: "social network provider not found"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        default:
   *          description: "Unexpected Error"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   */
  /**
   * Update a social network provider
   * @swagger
   * /social-networks/providers/{id}:
   *    put:
   *      tags:
   *        - SocialNetworksProvider
   *      summary: "Update a social network provider"
   *      description: "Update an existing social network provider"
   *      operationId: "UPDATEsocialNetworkProvider"
   *      security:
   *        - bearerAuth: []
   *      parameters:
   *      - $ref: '#/components/parameters/store'
   *      - name: "id"
   *        in: "path"
   *        description: "ID of social network provider to update"
   *        required: true
   *      requestBody:
   *        content:
   *          application/json:
   *            schema:
   *              $ref: "#/definitions/SocialNetworkProvidersUpdateItemSchema"
   *      responses:
   *        "200":
   *          description: "successful operation"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/SocialNetworkProvidersGetItemSchema'
   *        "401":
   *          description: "Not allow because you need a Authentication Token"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        '403':
   *          description: "Not allow because you need more permissions"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        "404":
   *          description: "social network provider not found"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        default:
   *          description: "Unexpected Error"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   */
  /**
   * Delete a social network provider
   * @swagger
   * /social-networks/providers/{id}:
   *    delete:
   *      tags:
   *        - SocialNetworksProvider
   *      summary: "Delete a social network provider"
   *      description: "Delete an existing social network provider"
   *      operationId: "DELETEsocialNetworkProvider"
   *      security:
   *        - bearerAuth: []
   *      parameters:
   *      - $ref: '#/components/parameters/store'
   *      - name: "id"
   *        in: "path"
   *        description: "ID of social network provider to delete"
   *        required: true
   *      responses:
   *        "200":
   *          description: "successful operation"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/SocialNetworkProvidersDeleteItemSchema'
   *        "401":
   *          description: "Not allow because you need a Authentication Token"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        '403':
   *          description: "Not allow because you need more permissions"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        "404":
   *          description: "social network provider not found"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   *        default:
   *          description: "Unexpected Error"
   *          content:
   *            application/json:
   *              schema:
   *                $ref: '#/definitions/ErrorSchema'
   */
}

export const socialNetworkProvidersRouter = new SocialNetworkProvidersRoute(controller, router).init();
