UNPKG

@microsoft/msgraph-beta-sdk-devicemanagement

Version:
92 lines 4.92 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { createImportedDeviceIdentityFromDiscriminatorValue, createImportedDeviceIdentityResultFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, serializeImportedDeviceIdentity, serializeImportedDeviceIdentityResult } 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 {ImportDeviceIdentityListPostRequestBody} */ // @ts-ignore export function createImportDeviceIdentityListPostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoImportDeviceIdentityListPostRequestBody; } /** * 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 {ImportDeviceIdentityListPostResponse} */ // @ts-ignore export function createImportDeviceIdentityListPostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoImportDeviceIdentityListPostResponse; } /** * The deserialization information for the current model * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoImportDeviceIdentityListPostRequestBody(importDeviceIdentityListPostRequestBody = {}) { return { "backingStoreEnabled": n => { importDeviceIdentityListPostRequestBody.backingStoreEnabled = true; }, "importedDeviceIdentities": n => { importDeviceIdentityListPostRequestBody.importedDeviceIdentities = n.getCollectionOfObjectValues(createImportedDeviceIdentityFromDiscriminatorValue); }, "overwriteImportedDeviceIdentities": n => { importDeviceIdentityListPostRequestBody.overwriteImportedDeviceIdentities = n.getBooleanValue(); }, }; } /** * The deserialization information for the current model * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoImportDeviceIdentityListPostResponse(importDeviceIdentityListPostResponse = {}) { return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(importDeviceIdentityListPostResponse)), { "value": n => { importDeviceIdentityListPostResponse.value = n.getCollectionOfObjectValues(createImportedDeviceIdentityResultFromDiscriminatorValue); } }); } /** * Serializes information the current object * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeImportDeviceIdentityListPostRequestBody(writer, importDeviceIdentityListPostRequestBody = {}) { if (importDeviceIdentityListPostRequestBody) { writer.writeCollectionOfObjectValues("importedDeviceIdentities", importDeviceIdentityListPostRequestBody.importedDeviceIdentities, serializeImportedDeviceIdentity); writer.writeBooleanValue("overwriteImportedDeviceIdentities", importDeviceIdentityListPostRequestBody.overwriteImportedDeviceIdentities); writer.writeAdditionalData(importDeviceIdentityListPostRequestBody.additionalData); } } /** * Serializes information the current object * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeImportDeviceIdentityListPostResponse(writer, importDeviceIdentityListPostResponse = {}) { if (importDeviceIdentityListPostResponse) { serializeBaseCollectionPaginationCountResponse(writer, importDeviceIdentityListPostResponse); writer.writeCollectionOfObjectValues("value", importDeviceIdentityListPostResponse.value, serializeImportedDeviceIdentityResult); } } /** * Uri template for the request builder. */ export const ImportDeviceIdentityListRequestBuilderUriTemplate = "{+baseurl}/deviceManagement/importedDeviceIdentities/importDeviceIdentityList"; /** * Metadata for all the requests in the request builder. */ export const ImportDeviceIdentityListRequestBuilderRequestsMetadata = { post: { uriTemplate: ImportDeviceIdentityListRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createImportDeviceIdentityListPostResponseFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeImportDeviceIdentityListPostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map