UNPKG

@microsoft/msgraph-beta-sdk-devicemanagement

Version:
98 lines 5.27 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { createDeviceConfigurationTargetedUserAndDeviceFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, serializeDeviceConfigurationTargetedUserAndDevice } 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 {GetTargetedUsersAndDevicesPostRequestBody} */ // @ts-ignore export function createGetTargetedUsersAndDevicesPostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoGetTargetedUsersAndDevicesPostRequestBody; } /** * 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 {GetTargetedUsersAndDevicesPostResponse} */ // @ts-ignore export function createGetTargetedUsersAndDevicesPostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoGetTargetedUsersAndDevicesPostResponse; } /** * The deserialization information for the current model * @param GetTargetedUsersAndDevicesPostRequestBody The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoGetTargetedUsersAndDevicesPostRequestBody(getTargetedUsersAndDevicesPostRequestBody = {}) { return { "backingStoreEnabled": n => { getTargetedUsersAndDevicesPostRequestBody.backingStoreEnabled = true; }, "deviceConfigurationIds": n => { getTargetedUsersAndDevicesPostRequestBody.deviceConfigurationIds = n.getCollectionOfPrimitiveValues(); }, }; } /** * The deserialization information for the current model * @param GetTargetedUsersAndDevicesPostResponse The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoGetTargetedUsersAndDevicesPostResponse(getTargetedUsersAndDevicesPostResponse = {}) { return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(getTargetedUsersAndDevicesPostResponse)), { "value": n => { getTargetedUsersAndDevicesPostResponse.value = n.getCollectionOfObjectValues(createDeviceConfigurationTargetedUserAndDeviceFromDiscriminatorValue); } }); } /** * Serializes information the current object * @param GetTargetedUsersAndDevicesPostRequestBody 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 serializeGetTargetedUsersAndDevicesPostRequestBody(writer, getTargetedUsersAndDevicesPostRequestBody = {}, isSerializingDerivedType = false) { if (!getTargetedUsersAndDevicesPostRequestBody || isSerializingDerivedType) { return; } writer.writeCollectionOfPrimitiveValues("deviceConfigurationIds", getTargetedUsersAndDevicesPostRequestBody.deviceConfigurationIds); writer.writeAdditionalData(getTargetedUsersAndDevicesPostRequestBody.additionalData); } /** * Serializes information the current object * @param GetTargetedUsersAndDevicesPostResponse 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 serializeGetTargetedUsersAndDevicesPostResponse(writer, getTargetedUsersAndDevicesPostResponse = {}, isSerializingDerivedType = false) { if (!getTargetedUsersAndDevicesPostResponse || isSerializingDerivedType) { return; } serializeBaseCollectionPaginationCountResponse(writer, getTargetedUsersAndDevicesPostResponse, isSerializingDerivedType); writer.writeCollectionOfObjectValues("value", getTargetedUsersAndDevicesPostResponse.value, serializeDeviceConfigurationTargetedUserAndDevice); } /** * Uri template for the request builder. */ export const GetTargetedUsersAndDevicesRequestBuilderUriTemplate = "{+baseurl}/deviceManagement/deviceConfigurations/getTargetedUsersAndDevices"; /** * Metadata for all the requests in the request builder. */ export const GetTargetedUsersAndDevicesRequestBuilderRequestsMetadata = { post: { uriTemplate: GetTargetedUsersAndDevicesRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createGetTargetedUsersAndDevicesPostResponseFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeGetTargetedUsersAndDevicesPostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map