UNPKG

@microsoft/msgraph-beta-sdk-admin

Version:
91 lines 3.5 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 * @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 * @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 writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeMarkReadPostRequestBody(writer, markReadPostRequestBody = {}) { if (markReadPostRequestBody) { writer.writeCollectionOfPrimitiveValues("messageIds", markReadPostRequestBody.messageIds); writer.writeAdditionalData(markReadPostRequestBody.additionalData); } } /** * Serializes information the current object * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeMarkReadPostResponse(writer, markReadPostResponse = {}) { if (markReadPostResponse) { 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