"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SendActivityNotificationRequestBuilderUriTemplate = exports.SendActivityNotificationRequestBuilderRequestsMetadata = exports.serializeSendActivityNotificationPostRequestBody = exports.deserializeIntoSendActivityNotificationPostRequestBody = exports.createSendActivityNotificationPostRequestBodyFromDiscriminatorValue = 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 sendActivityNotificationPostRequestBody
 */
function createSendActivityNotificationPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoSendActivityNotificationPostRequestBody;
}
exports.createSendActivityNotificationPostRequestBodyFromDiscriminatorValue = createSendActivityNotificationPostRequestBodyFromDiscriminatorValue;
/**
 * The deserialization information for the current model
 * @returns a Record<string, (node: ParseNode) => void>
 */
function deserializeIntoSendActivityNotificationPostRequestBody(sendActivityNotificationPostRequestBody = {}) {
    return {
        "activityType": n => { sendActivityNotificationPostRequestBody.activityType = n.getStringValue(); },
        "backingStoreEnabled": n => { sendActivityNotificationPostRequestBody.backingStoreEnabled = true; },
        "chainId": n => { sendActivityNotificationPostRequestBody.chainId = n.getNumberValue(); },
        "previewText": n => { sendActivityNotificationPostRequestBody.previewText = n.getObjectValue(models_1.createItemBodyFromDiscriminatorValue); },
        "recipient": n => { sendActivityNotificationPostRequestBody.recipient = n.getObjectValue(models_1.createTeamworkNotificationRecipientFromDiscriminatorValue); },
        "teamsAppId": n => { sendActivityNotificationPostRequestBody.teamsAppId = n.getStringValue(); },
        "templateParameters": n => { sendActivityNotificationPostRequestBody.templateParameters = n.getCollectionOfObjectValues(models_1.createKeyValuePairFromDiscriminatorValue); },
        "topic": n => { sendActivityNotificationPostRequestBody.topic = n.getObjectValue(models_1.createTeamworkActivityTopicFromDiscriminatorValue); },
    };
}
exports.deserializeIntoSendActivityNotificationPostRequestBody = deserializeIntoSendActivityNotificationPostRequestBody;
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
function serializeSendActivityNotificationPostRequestBody(writer, sendActivityNotificationPostRequestBody = {}) {
    writer.writeStringValue("activityType", sendActivityNotificationPostRequestBody.activityType);
    writer.writeNumberValue("chainId", sendActivityNotificationPostRequestBody.chainId);
    writer.writeObjectValue("previewText", sendActivityNotificationPostRequestBody.previewText, models_1.serializeItemBody);
    writer.writeObjectValue("recipient", sendActivityNotificationPostRequestBody.recipient, models_1.serializeTeamworkNotificationRecipient);
    writer.writeStringValue("teamsAppId", sendActivityNotificationPostRequestBody.teamsAppId);
    writer.writeCollectionOfObjectValues("templateParameters", sendActivityNotificationPostRequestBody.templateParameters, models_1.serializeKeyValuePair);
    writer.writeObjectValue("topic", sendActivityNotificationPostRequestBody.topic, models_1.serializeTeamworkActivityTopic);
    writer.writeAdditionalData(sendActivityNotificationPostRequestBody.additionalData);
}
exports.serializeSendActivityNotificationPostRequestBody = serializeSendActivityNotificationPostRequestBody;
/**
 * Metadata for all the requests in the request builder.
 */
exports.SendActivityNotificationRequestBuilderRequestsMetadata = {
    post: {
        responseBodyContentType: "application/json",
        errorMappings: {
            _4XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
            _5XX: oDataErrors_1.createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "sendNoResponseContentAsync",
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeSendActivityNotificationPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/**
 * Uri template for the request builder.
 */
exports.SendActivityNotificationRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/chats/{chat%2Did}/sendActivityNotification";
/* tslint:enable */
/* eslint-enable */
