/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createBulkManagedDeviceActionResultFromDiscriminatorValue, ManagedDeviceRemoteActionObject } 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 {ExecuteActionPostRequestBody}
 */
// @ts-ignore
export function createExecuteActionPostRequestBodyFromDiscriminatorValue(parseNode) {
    return deserializeIntoExecuteActionPostRequestBody;
}
/**
 * The deserialization information for the current model
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoExecuteActionPostRequestBody(executeActionPostRequestBody = {}) {
    return {
        "actionName": n => { executeActionPostRequestBody.actionName = n.getEnumValue(ManagedDeviceRemoteActionObject); },
        "backingStoreEnabled": n => { executeActionPostRequestBody.backingStoreEnabled = true; },
        "carrierUrl": n => { executeActionPostRequestBody.carrierUrl = n.getStringValue(); },
        "deprovisionReason": n => { executeActionPostRequestBody.deprovisionReason = n.getStringValue(); },
        "deviceIds": n => { executeActionPostRequestBody.deviceIds = n.getCollectionOfPrimitiveValues(); },
        "deviceName": n => { executeActionPostRequestBody.deviceName = n.getStringValue(); },
        "keepEnrollmentData": n => { executeActionPostRequestBody.keepEnrollmentData = n.getBooleanValue(); },
        "keepUserData": n => { executeActionPostRequestBody.keepUserData = n.getBooleanValue(); },
        "notificationBody": n => { executeActionPostRequestBody.notificationBody = n.getStringValue(); },
        "notificationTitle": n => { executeActionPostRequestBody.notificationTitle = n.getStringValue(); },
        "organizationalUnitPath": n => { executeActionPostRequestBody.organizationalUnitPath = n.getStringValue(); },
        "persistEsimDataPlan": n => { executeActionPostRequestBody.persistEsimDataPlan = n.getBooleanValue(); },
    };
}
/**
 * Serializes information the current object
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeExecuteActionPostRequestBody(writer, executeActionPostRequestBody = {}) {
    if (executeActionPostRequestBody) {
        writer.writeEnumValue("actionName", executeActionPostRequestBody.actionName);
        writer.writeStringValue("carrierUrl", executeActionPostRequestBody.carrierUrl);
        writer.writeStringValue("deprovisionReason", executeActionPostRequestBody.deprovisionReason);
        writer.writeCollectionOfPrimitiveValues("deviceIds", executeActionPostRequestBody.deviceIds);
        writer.writeStringValue("deviceName", executeActionPostRequestBody.deviceName);
        writer.writeBooleanValue("keepEnrollmentData", executeActionPostRequestBody.keepEnrollmentData);
        writer.writeBooleanValue("keepUserData", executeActionPostRequestBody.keepUserData);
        writer.writeStringValue("notificationBody", executeActionPostRequestBody.notificationBody);
        writer.writeStringValue("notificationTitle", executeActionPostRequestBody.notificationTitle);
        writer.writeStringValue("organizationalUnitPath", executeActionPostRequestBody.organizationalUnitPath);
        writer.writeBooleanValue("persistEsimDataPlan", executeActionPostRequestBody.persistEsimDataPlan);
        writer.writeAdditionalData(executeActionPostRequestBody.additionalData);
    }
}
/**
 * Uri template for the request builder.
 */
export const ExecuteActionRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/managedDevices/executeAction";
/**
 * Metadata for all the requests in the request builder.
 */
export const ExecuteActionRequestBuilderRequestsMetadata = {
    post: {
        uriTemplate: ExecuteActionRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: createODataErrorFromDiscriminatorValue,
        },
        adapterMethodName: "send",
        responseBodyFactory: createBulkManagedDeviceActionResultFromDiscriminatorValue,
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeExecuteActionPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map