UNPKG

@microsoft/msgraph-beta-sdk-admin

Version:
99 lines 4.18 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 {MarkUnreadPostRequestBody} */ // @ts-ignore export function createMarkUnreadPostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoMarkUnreadPostRequestBody; } /** * 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 {MarkUnreadPostResponse} */ // @ts-ignore export function createMarkUnreadPostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoMarkUnreadPostResponse; } /** * The deserialization information for the current model * @param MarkUnreadPostRequestBody The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoMarkUnreadPostRequestBody(markUnreadPostRequestBody = {}) { return { "backingStoreEnabled": n => { markUnreadPostRequestBody.backingStoreEnabled = true; }, "messageIds": n => { markUnreadPostRequestBody.messageIds = n.getCollectionOfPrimitiveValues(); }, }; } /** * The deserialization information for the current model * @param MarkUnreadPostResponse The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoMarkUnreadPostResponse(markUnreadPostResponse = {}) { return { "backingStoreEnabled": n => { markUnreadPostResponse.backingStoreEnabled = true; }, "value": n => { markUnreadPostResponse.value = n.getBooleanValue(); }, }; } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param MarkUnreadPostRequestBody The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeMarkUnreadPostRequestBody(writer, markUnreadPostRequestBody = {}, isSerializingDerivedType = false) { if (!markUnreadPostRequestBody || isSerializingDerivedType) { return; } writer.writeCollectionOfPrimitiveValues("messageIds", markUnreadPostRequestBody.messageIds); writer.writeAdditionalData(markUnreadPostRequestBody.additionalData); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param MarkUnreadPostResponse The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeMarkUnreadPostResponse(writer, markUnreadPostResponse = {}, isSerializingDerivedType = false) { if (!markUnreadPostResponse || isSerializingDerivedType) { return; } writer.writeBooleanValue("value", markUnreadPostResponse.value); writer.writeAdditionalData(markUnreadPostResponse.additionalData); } /** * Uri template for the request builder. */ export const MarkUnreadRequestBuilderUriTemplate = "{+baseurl}/admin/serviceAnnouncement/messages/markUnread"; /** * Metadata for all the requests in the request builder. */ export const MarkUnreadRequestBuilderRequestsMetadata = { post: { uriTemplate: MarkUnreadRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createMarkUnreadPostResponseFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeMarkUnreadPostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map