UNPKG

@microsoft/msgraph-beta-sdk-devices

Version:
100 lines 4.63 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { createDirectoryObjectFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, serializeDirectoryObject } 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 {GetByIdsPostRequestBody} */ // @ts-ignore export function createGetByIdsPostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoGetByIdsPostRequestBody; } /** * 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 {GetByIdsPostResponse} */ // @ts-ignore export function createGetByIdsPostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoGetByIdsPostResponse; } /** * The deserialization information for the current model * @param GetByIdsPostRequestBody The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoGetByIdsPostRequestBody(getByIdsPostRequestBody = {}) { return { "backingStoreEnabled": n => { getByIdsPostRequestBody.backingStoreEnabled = true; }, "ids": n => { getByIdsPostRequestBody.ids = n.getCollectionOfPrimitiveValues(); }, "types": n => { getByIdsPostRequestBody.types = n.getCollectionOfPrimitiveValues(); }, }; } /** * The deserialization information for the current model * @param GetByIdsPostResponse The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoGetByIdsPostResponse(getByIdsPostResponse = {}) { return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(getByIdsPostResponse)), { "value": n => { getByIdsPostResponse.value = n.getCollectionOfObjectValues(createDirectoryObjectFromDiscriminatorValue); } }); } /** * Serializes information the current object * @param GetByIdsPostRequestBody 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 serializeGetByIdsPostRequestBody(writer, getByIdsPostRequestBody = {}, isSerializingDerivedType = false) { if (!getByIdsPostRequestBody || isSerializingDerivedType) { return; } writer.writeCollectionOfPrimitiveValues("ids", getByIdsPostRequestBody.ids); writer.writeCollectionOfPrimitiveValues("types", getByIdsPostRequestBody.types); writer.writeAdditionalData(getByIdsPostRequestBody.additionalData); } /** * Serializes information the current object * @param GetByIdsPostResponse 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 serializeGetByIdsPostResponse(writer, getByIdsPostResponse = {}, isSerializingDerivedType = false) { if (!getByIdsPostResponse || isSerializingDerivedType) { return; } serializeBaseCollectionPaginationCountResponse(writer, getByIdsPostResponse, isSerializingDerivedType); writer.writeCollectionOfObjectValues("value", getByIdsPostResponse.value, serializeDirectoryObject); } /** * Uri template for the request builder. */ export const GetByIdsRequestBuilderUriTemplate = "{+baseurl}/devices/getByIds"; /** * Metadata for all the requests in the request builder. */ export const GetByIdsRequestBuilderRequestsMetadata = { post: { uriTemplate: GetByIdsRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createGetByIdsPostResponseFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeGetByIdsPostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map