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 {FavoritePostRequestBody} */ // @ts-ignore export function createFavoritePostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoFavoritePostRequestBody; } /** * 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 {FavoritePostResponse} */ // @ts-ignore export function createFavoritePostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoFavoritePostResponse; } /** * The deserialization information for the current model * @param FavoritePostRequestBody The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoFavoritePostRequestBody(favoritePostRequestBody = {}) { return { "backingStoreEnabled": n => { favoritePostRequestBody.backingStoreEnabled = true; }, "messageIds": n => { favoritePostRequestBody.messageIds = n.getCollectionOfPrimitiveValues(); }, }; } /** * The deserialization information for the current model * @param FavoritePostResponse The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoFavoritePostResponse(favoritePostResponse = {}) { return { "backingStoreEnabled": n => { favoritePostResponse.backingStoreEnabled = true; }, "value": n => { favoritePostResponse.value = n.getBooleanValue(); }, }; } /** * Serializes information the current object * @param FavoritePostRequestBody The instance to serialize from. * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeFavoritePostRequestBody(writer, favoritePostRequestBody = {}, isSerializingDerivedType = false) { if (!favoritePostRequestBody || isSerializingDerivedType) { return; } writer.writeCollectionOfPrimitiveValues("messageIds", favoritePostRequestBody.messageIds); writer.writeAdditionalData(favoritePostRequestBody.additionalData); } /** * Serializes information the current object * @param FavoritePostResponse The instance to serialize from. * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeFavoritePostResponse(writer, favoritePostResponse = {}, isSerializingDerivedType = false) { if (!favoritePostResponse || isSerializingDerivedType) { return; } writer.writeBooleanValue("value", favoritePostResponse.value); writer.writeAdditionalData(favoritePostResponse.additionalData); } /** * Uri template for the request builder. */ export const FavoriteRequestBuilderUriTemplate = "{+baseurl}/admin/serviceAnnouncement/messages/favorite"; /** * Metadata for all the requests in the request builder. */ export const FavoriteRequestBuilderRequestsMetadata = { post: { uriTemplate: FavoriteRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createFavoritePostResponseFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeFavoritePostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map