UNPKG

@microsoft/msgraph-beta-sdk-devicemanagement

Version:
69 lines 3.43 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { ScheduledRetireStateObject } 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 {SetScheduledRetireStatePostRequestBody} */ // @ts-ignore export function createSetScheduledRetireStatePostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoSetScheduledRetireStatePostRequestBody; } /** * The deserialization information for the current model * @param SetScheduledRetireStatePostRequestBody The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoSetScheduledRetireStatePostRequestBody(setScheduledRetireStatePostRequestBody = {}) { return { "backingStoreEnabled": n => { setScheduledRetireStatePostRequestBody.backingStoreEnabled = true; }, "managedDeviceIds": n => { setScheduledRetireStatePostRequestBody.managedDeviceIds = n.getCollectionOfPrimitiveValues(); }, "scopedToAllDevices": n => { setScheduledRetireStatePostRequestBody.scopedToAllDevices = n.getBooleanValue(); }, "state": n => { setScheduledRetireStatePostRequestBody.state = n.getEnumValue(ScheduledRetireStateObject); }, }; } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param SetScheduledRetireStatePostRequestBody The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeSetScheduledRetireStatePostRequestBody(writer, setScheduledRetireStatePostRequestBody = {}, isSerializingDerivedType = false) { if (!setScheduledRetireStatePostRequestBody || isSerializingDerivedType) { return; } writer.writeCollectionOfPrimitiveValues("managedDeviceIds", setScheduledRetireStatePostRequestBody.managedDeviceIds); writer.writeBooleanValue("scopedToAllDevices", setScheduledRetireStatePostRequestBody.scopedToAllDevices); writer.writeEnumValue("state", setScheduledRetireStatePostRequestBody.state); writer.writeAdditionalData(setScheduledRetireStatePostRequestBody.additionalData); } /** * Uri template for the request builder. */ export const SetScheduledRetireStateRequestBuilderUriTemplate = "{+baseurl}/deviceManagement/deviceCompliancePolicies/setScheduledRetireState"; /** * Metadata for all the requests in the request builder. */ export const SetScheduledRetireStateRequestBuilderRequestsMetadata = { post: { uriTemplate: SetScheduledRetireStateRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "sendNoResponseContent", requestBodyContentType: "application/json", requestBodySerializer: serializeSetScheduledRetireStatePostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map