"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CreateDeviceLogCollectionRequestRequestBuilderUriTemplate = exports.CreateDeviceLogCollectionRequestRequestBuilderRequestsMetadata = exports.serializeCreateDeviceLogCollectionRequestPostRequestBody = exports.deserializeIntoCreateDeviceLogCollectionRequestPostRequestBody = exports.createCreateDeviceLogCollectionRequestPostRequestBodyFromDiscriminatorValue = 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/");
/**
 * Creates a new instance of the appropriate class based on discriminator value
 * @param parseNode The parse node to use to read the discriminator value and create the object
 * @returns a createDeviceLogCollectionRequestPostRequestBody
 */
function createCreateDeviceLogCollectionRequestPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoCreateDeviceLogCollectionRequestPostRequestBody;
}
exports.createCreateDeviceLogCollectionRequestPostRequestBodyFromDiscriminatorValue = createCreateDeviceLogCollectionRequestPostRequestBodyFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoCreateDeviceLogCollectionRequestPostRequestBody(createDeviceLogCollectionRequestPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { createDeviceLogCollectionRequestPostRequestBody.backingStoreEnabled = true; },
        "templateType": n => { createDeviceLogCollectionRequestPostRequestBody.templateType = n.getObjectValue(models_1.createDeviceLogCollectionRequestFromDiscriminatorValue); },
    };
}
exports.deserializeIntoCreateDeviceLogCollectionRequestPostRequestBody = deserializeIntoCreateDeviceLogCollectionRequestPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeCreateDeviceLogCollectionRequestPostRequestBody(writer, createDeviceLogCollectionRequestPostRequestBody = {}) {
    writer.writeObjectValue("templateType", createDeviceLogCollectionRequestPostRequestBody.templateType, models_1.serializeDeviceLogCollectionRequest);
    writer.writeAdditionalData(createDeviceLogCollectionRequestPostRequestBody.additionalData);
}
exports.serializeCreateDeviceLogCollectionRequestPostRequestBody = serializeCreateDeviceLogCollectionRequestPostRequestBody;
/**
 * Metadata for all the requests in the request builder.
 */
exports.CreateDeviceLogCollectionRequestRequestBuilderRequestsMetadata = {
    post: {
        responseBodyContentType: "application/json",
        errorMappings: {
            _4XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
            _5XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "sendAsync",
        responseBodyFactory: models_1.createDeviceLogCollectionResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeCreateDeviceLogCollectionRequestPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/**
 * Uri template for the request builder.
 */
exports.CreateDeviceLogCollectionRequestRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/managedDevices/{managedDevice%2Did}/createDeviceLogCollectionRequest";
/* tslint:enable */
/* eslint-enable */
