/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createActionResultPartFromDiscriminatorValue, createConversationMemberFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, serializeActionResultPart, serializeBaseCollectionPaginationCountResponse, serializeConversationMember } 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 {AddPostRequestBody}
 */
// @ts-ignore
export function createAddPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoAddPostRequestBody;
}
/**
 * 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 {AddPostResponse}
 */
// @ts-ignore
export function createAddPostResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoAddPostResponse;
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoAddPostRequestBody(addPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { addPostRequestBody.backingStoreEnabled = true; },
        "values": n => { addPostRequestBody.values = n.getCollectionOfObjectValues(createConversationMemberFromDiscriminatorValue); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoAddPostResponse(addPostResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(addPostResponse)), { "value": n => { addPostResponse.value = n.getCollectionOfObjectValues(createActionResultPartFromDiscriminatorValue); } });
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeAddPostRequestBody(writer, addPostRequestBody = {}) {
    if (addPostRequestBody) {
        writer.writeCollectionOfObjectValues("values", addPostRequestBody.values, serializeConversationMember);
        writer.writeAdditionalData(addPostRequestBody.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeAddPostResponse(writer, addPostResponse = {}) {
    if (addPostResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, addPostResponse);
        writer.writeCollectionOfObjectValues("value", addPostResponse.value, serializeActionResultPart);
    }
}
/**
 * Uri template for the request builder.
 */
export const AddRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/chats/{chat%2Did}/members/add";
/**
 * Metadata for all the requests in the request builder.
 */
export const AddRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: AddRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: createAddPostResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeAddPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map