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 {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 * @param UnfavoritePostRequestBody The instance to deserialize into. * @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 * @param UnfavoritePostResponse The instance to deserialize into. * @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 isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param UnfavoritePostRequestBody The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeUnfavoritePostRequestBody(writer, unfavoritePostRequestBody = {}, isSerializingDerivedType = false) { if (!unfavoritePostRequestBody || isSerializingDerivedType) { return; } writer.writeCollectionOfPrimitiveValues("messageIds", unfavoritePostRequestBody.messageIds); writer.writeAdditionalData(unfavoritePostRequestBody.additionalData); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param UnfavoritePostResponse The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeUnfavoritePostResponse(writer, unfavoritePostResponse = {}, isSerializingDerivedType = false) { if (!unfavoritePostResponse || isSerializingDerivedType) { return; } 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