/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createItemBodyFromDiscriminatorValue, createKeyValuePairFromDiscriminatorValue, createTeamworkActivityTopicFromDiscriminatorValue, serializeItemBody, serializeKeyValuePair, serializeTeamworkActivityTopic } from '@microsoft/msgraph-beta-sdk/models/index.js';
// @ts-ignore
import { createODataErrorFromDiscriminatorValue } from '@microsoft/msgraph-beta-sdk/models/oDataErrors/index.js';
/**
 * 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 {SendActivityNotificationPostRequestBody}
 */
// @ts-ignore
export function createSendActivityNotificationPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoSendActivityNotificationPostRequestBody;
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export 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(createItemBodyFromDiscriminatorValue); },
        "teamsAppId": n => { sendActivityNotificationPostRequestBody.teamsAppId = n.getStringValue(); },
        "templateParameters": n => { sendActivityNotificationPostRequestBody.templateParameters = n.getCollectionOfObjectValues(createKeyValuePairFromDiscriminatorValue); },
        "topic": n => { sendActivityNotificationPostRequestBody.topic = n.getObjectValue(createTeamworkActivityTopicFromDiscriminatorValue); },
    };
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeSendActivityNotificationPostRequestBody(writer, sendActivityNotificationPostRequestBody = {}) {
    if (sendActivityNotificationPostRequestBody) {
        writer.writeStringValue("activityType", sendActivityNotificationPostRequestBody.activityType);
        writer.writeNumberValue("chainId", sendActivityNotificationPostRequestBody.chainId);
        writer.writeObjectValue("previewText", sendActivityNotificationPostRequestBody.previewText, serializeItemBody);
        writer.writeStringValue("teamsAppId", sendActivityNotificationPostRequestBody.teamsAppId);
        writer.writeCollectionOfObjectValues("templateParameters", sendActivityNotificationPostRequestBody.templateParameters, serializeKeyValuePair);
        writer.writeObjectValue("topic", sendActivityNotificationPostRequestBody.topic, serializeTeamworkActivityTopic);
        writer.writeAdditionalData(sendActivityNotificationPostRequestBody.additionalData);
    }
}
/**
 * Uri template for the request builder.
 */
export const SendActivityNotificationRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/teamwork/sendActivityNotification";
/**
 * Metadata for all the requests in the request builder.
 */
export const SendActivityNotificationRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: SendActivityNotificationRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "sendNoResponseContent",
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeSendActivityNotificationPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map