@microsoft/msgraph-beta-sdk-devicemanagement
Version:
DeviceManagement fluent API for Microsoft Graph
100 lines • 5.62 kB
JavaScript
/* 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
* @param ImportDeviceIdentityListPostRequestBody The instance to deserialize into.
* @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
* @param ImportDeviceIdentityListPostResponse The instance to deserialize into.
* @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 ImportDeviceIdentityListPostRequestBody The instance to serialize from.
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeImportDeviceIdentityListPostRequestBody(writer, importDeviceIdentityListPostRequestBody = {}, isSerializingDerivedType = false) {
if (!importDeviceIdentityListPostRequestBody || isSerializingDerivedType) {
return;
}
writer.writeCollectionOfObjectValues("importedDeviceIdentities", importDeviceIdentityListPostRequestBody.importedDeviceIdentities, serializeImportedDeviceIdentity);
writer.writeBooleanValue("overwriteImportedDeviceIdentities", importDeviceIdentityListPostRequestBody.overwriteImportedDeviceIdentities);
writer.writeAdditionalData(importDeviceIdentityListPostRequestBody.additionalData);
}
/**
* Serializes information the current object
* @param ImportDeviceIdentityListPostResponse The instance to serialize from.
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeImportDeviceIdentityListPostResponse(writer, importDeviceIdentityListPostResponse = {}, isSerializingDerivedType = false) {
if (!importDeviceIdentityListPostResponse || isSerializingDerivedType) {
return;
}
serializeBaseCollectionPaginationCountResponse(writer, importDeviceIdentityListPostResponse, isSerializingDerivedType);
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