/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createHasPayloadLinkResultItemFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, serializeHasPayloadLinkResultItem } 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 {HasPayloadLinksPostRequestBody}
 */
// @ts-ignore
export function createHasPayloadLinksPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoHasPayloadLinksPostRequestBody;
}
/**
 * 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 {HasPayloadLinksPostResponse}
 */
// @ts-ignore
export function createHasPayloadLinksPostResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoHasPayloadLinksPostResponse;
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoHasPayloadLinksPostRequestBody(hasPayloadLinksPostRequestBody = {}) {
    return {
        "backingStoreEnabled": n => { hasPayloadLinksPostRequestBody.backingStoreEnabled = true; },
        "payloadIds": n => { hasPayloadLinksPostRequestBody.payloadIds = n.getCollectionOfPrimitiveValues(); },
    };
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoHasPayloadLinksPostResponse(hasPayloadLinksPostResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(hasPayloadLinksPostResponse)), { "value": n => { hasPayloadLinksPostResponse.value = n.getCollectionOfObjectValues(createHasPayloadLinkResultItemFromDiscriminatorValue); } });
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeHasPayloadLinksPostRequestBody(writer, hasPayloadLinksPostRequestBody = {}) {
    if (hasPayloadLinksPostRequestBody) {
        writer.writeCollectionOfPrimitiveValues("payloadIds", hasPayloadLinksPostRequestBody.payloadIds);
        writer.writeAdditionalData(hasPayloadLinksPostRequestBody.additionalData);
    }
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeHasPayloadLinksPostResponse(writer, hasPayloadLinksPostResponse = {}) {
    if (hasPayloadLinksPostResponse) {
        serializeBaseCollectionPaginationCountResponse(writer, hasPayloadLinksPostResponse);
        writer.writeCollectionOfObjectValues("value", hasPayloadLinksPostResponse.value, serializeHasPayloadLinkResultItem);
    }
}
/**
 * Uri template for the request builder.
 */
export const HasPayloadLinksRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/deviceEnrollmentConfigurations/hasPayloadLinks";
/**
 * Metadata for all the requests in the request builder.
 */
export const HasPayloadLinksRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: HasPayloadLinksRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: createHasPayloadLinksPostResponseFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeHasPayloadLinksPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map