/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @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 {SetPresencePostRequestBody}
 */
// @ts-ignore
export function createSetPresencePostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoSetPresencePostRequestBody;
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoSetPresencePostRequestBody(setPresencePostRequestBody = {}) {
    return {
        "activity": n => { setPresencePostRequestBody.activity = n.getStringValue(); },
        "availability": n => { setPresencePostRequestBody.availability = n.getStringValue(); },
        "backingStoreEnabled": n => { setPresencePostRequestBody.backingStoreEnabled = true; },
        "expirationDuration": n => { setPresencePostRequestBody.expirationDuration = n.getDurationValue(); },
        "sessionId": n => { setPresencePostRequestBody.sessionId = n.getStringValue(); },
    };
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeSetPresencePostRequestBody(writer, setPresencePostRequestBody = {}) {
    if (setPresencePostRequestBody) {
        writer.writeStringValue("activity", setPresencePostRequestBody.activity);
        writer.writeStringValue("availability", setPresencePostRequestBody.availability);
        writer.writeDurationValue("expirationDuration", setPresencePostRequestBody.expirationDuration);
        writer.writeStringValue("sessionId", setPresencePostRequestBody.sessionId);
        writer.writeAdditionalData(setPresencePostRequestBody.additionalData);
    }
}
/**
 * Uri template for the request builder.
 */
export const SetPresenceRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/presence/setPresence";
/**
 * Metadata for all the requests in the request builder.
 */
export const SetPresenceRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: SetPresenceRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "sendNoResponseContent",
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeSetPresencePostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map