UNPKG

@microsoft/msgraph-beta-sdk-admin

Version:
91 lines 3.56 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 {UnfavoritePostRequestBody} */ // @ts-ignore export function createUnfavoritePostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoUnfavoritePostRequestBody; } /** * 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 {UnfavoritePostResponse} */ // @ts-ignore export function createUnfavoritePostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoUnfavoritePostResponse; } /** * The deserialization information for the current model * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoUnfavoritePostRequestBody(unfavoritePostRequestBody = {}) { return { "backingStoreEnabled": n => { unfavoritePostRequestBody.backingStoreEnabled = true; }, "messageIds": n => { unfavoritePostRequestBody.messageIds = n.getCollectionOfPrimitiveValues(); }, }; } /** * The deserialization information for the current model * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoUnfavoritePostResponse(unfavoritePostResponse = {}) { return { "backingStoreEnabled": n => { unfavoritePostResponse.backingStoreEnabled = true; }, "value": n => { unfavoritePostResponse.value = n.getBooleanValue(); }, }; } /** * Serializes information the current object * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeUnfavoritePostRequestBody(writer, unfavoritePostRequestBody = {}) { if (unfavoritePostRequestBody) { writer.writeCollectionOfPrimitiveValues("messageIds", unfavoritePostRequestBody.messageIds); writer.writeAdditionalData(unfavoritePostRequestBody.additionalData); } } /** * Serializes information the current object * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeUnfavoritePostResponse(writer, unfavoritePostResponse = {}) { if (unfavoritePostResponse) { writer.writeBooleanValue("value", unfavoritePostResponse.value); writer.writeAdditionalData(unfavoritePostResponse.additionalData); } } /** * Uri template for the request builder. */ export const UnfavoriteRequestBuilderUriTemplate = "{+baseurl}/admin/serviceAnnouncement/messages/unfavorite"; /** * Metadata for all the requests in the request builder. */ export const UnfavoriteRequestBuilderRequestsMetadata = { post: { uriTemplate: UnfavoriteRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createUnfavoritePostResponseFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeUnfavoritePostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map