UNPKG

@microsoft/msgraph-beta-sdk-admin

Version:
99 lines 4.12 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @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 {MarkReadPostRequestBody} */ // @ts-ignore export function createMarkReadPostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoMarkReadPostRequestBody; } /** * 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 {MarkReadPostResponse} */ // @ts-ignore export function createMarkReadPostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoMarkReadPostResponse; } /** * The deserialization information for the current model * @param MarkReadPostRequestBody The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoMarkReadPostRequestBody(markReadPostRequestBody = {}) { return { "backingStoreEnabled": n => { markReadPostRequestBody.backingStoreEnabled = true; }, "messageIds": n => { markReadPostRequestBody.messageIds = n.getCollectionOfPrimitiveValues(); }, }; } /** * The deserialization information for the current model * @param MarkReadPostResponse The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoMarkReadPostResponse(markReadPostResponse = {}) { return { "backingStoreEnabled": n => { markReadPostResponse.backingStoreEnabled = true; }, "value": n => { markReadPostResponse.value = n.getBooleanValue(); }, }; } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param MarkReadPostRequestBody The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeMarkReadPostRequestBody(writer, markReadPostRequestBody = {}, isSerializingDerivedType = false) { if (!markReadPostRequestBody || isSerializingDerivedType) { return; } writer.writeCollectionOfPrimitiveValues("messageIds", markReadPostRequestBody.messageIds); writer.writeAdditionalData(markReadPostRequestBody.additionalData); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param MarkReadPostResponse The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeMarkReadPostResponse(writer, markReadPostResponse = {}, isSerializingDerivedType = false) { if (!markReadPostResponse || isSerializingDerivedType) { return; } writer.writeBooleanValue("value", markReadPostResponse.value); writer.writeAdditionalData(markReadPostResponse.additionalData); } /** * Uri template for the request builder. */ export const MarkReadRequestBuilderUriTemplate = "{+baseurl}/admin/serviceAnnouncement/messages/markRead"; /** * Metadata for all the requests in the request builder. */ export const MarkReadRequestBuilderRequestsMetadata = { post: { uriTemplate: MarkReadRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createMarkReadPostResponseFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeMarkReadPostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map