"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApprovalsRequestBuilderUriTemplate = exports.ApprovalsRequestBuilderRequestsMetadata = exports.ApprovalsRequestBuilderNavigationMetadata = void 0;
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
const models_1 = require("@microsoft/msgraph-beta-sdk/models/");
const oDataErrors_1 = require("@microsoft/msgraph-beta-sdk/models/oDataErrors/");
const count_1 = require("./count/");
const filterByCurrentUserWithOn_1 = require("./filterByCurrentUserWithOn/");
const item_1 = require("./item/");
/**
 * Mapper for query parameters from symbol name to serialization name represented as a constant.
 */
const ApprovalsRequestBuilderGetQueryParametersMapper = {
    "count": "%24count",
    "expand": "%24expand",
    "filter": "%24filter",
    "orderby": "%24orderby",
    "search": "%24search",
    "select": "%24select",
    "skip": "%24skip",
    "top": "%24top",
};
/**
 * Metadata for all the navigation properties in the request builder.
 */
exports.ApprovalsRequestBuilderNavigationMetadata = {
    byApprovalId: {
        uriTemplate: item_1.ApprovalItemRequestBuilderUriTemplate,
        requestsMetadata: item_1.ApprovalItemRequestBuilderRequestsMetadata,
        navigationMetadata: item_1.ApprovalItemRequestBuilderNavigationMetadata,
        pathParametersMappings: ["approval%2Did"],
    },
    filterByCurrentUserWithOn: {
        uriTemplate: filterByCurrentUserWithOn_1.FilterByCurrentUserWithOnRequestBuilderUriTemplate,
        requestsMetadata: filterByCurrentUserWithOn_1.FilterByCurrentUserWithOnRequestBuilderRequestsMetadata,
    },
    count: {
        uriTemplate: count_1.CountRequestBuilderUriTemplate,
        requestsMetadata: count_1.CountRequestBuilderRequestsMetadata,
    },
};
/**
 * Metadata for all the requests in the request builder.
 */
exports.ApprovalsRequestBuilderRequestsMetadata = {
    get: {
        responseBodyContentType: "application/json",
        errorMappings: {
            _4XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
            _5XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "sendAsync",
        responseBodyFactory: models_1.createApprovalCollectionResponseFromDiscriminatorValue,
        queryParametersMapper: ApprovalsRequestBuilderGetQueryParametersMapper,
    },
    post: {
        responseBodyContentType: "application/json",
        errorMappings: {
            _4XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
            _5XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "sendAsync",
        responseBodyFactory: models_1.createApprovalFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: models_1.serializeApproval,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/**
 * Uri template for the request builder.
 */
exports.ApprovalsRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/approvals{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}";
/* tslint:enable */
/* eslint-enable */
