UNPKG

@microsoft/msgraph-beta-sdk-admin

Version:
91 lines 3.53 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 {UnarchivePostRequestBody} */ // @ts-ignore export function createUnarchivePostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoUnarchivePostRequestBody; } /** * 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 {UnarchivePostResponse} */ // @ts-ignore export function createUnarchivePostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoUnarchivePostResponse; } /** * The deserialization information for the current model * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoUnarchivePostRequestBody(unarchivePostRequestBody = {}) { return { "backingStoreEnabled": n => { unarchivePostRequestBody.backingStoreEnabled = true; }, "messageIds": n => { unarchivePostRequestBody.messageIds = n.getCollectionOfPrimitiveValues(); }, }; } /** * The deserialization information for the current model * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoUnarchivePostResponse(unarchivePostResponse = {}) { return { "backingStoreEnabled": n => { unarchivePostResponse.backingStoreEnabled = true; }, "value": n => { unarchivePostResponse.value = n.getBooleanValue(); }, }; } /** * Serializes information the current object * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeUnarchivePostRequestBody(writer, unarchivePostRequestBody = {}) { if (unarchivePostRequestBody) { writer.writeCollectionOfPrimitiveValues("messageIds", unarchivePostRequestBody.messageIds); writer.writeAdditionalData(unarchivePostRequestBody.additionalData); } } /** * Serializes information the current object * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeUnarchivePostResponse(writer, unarchivePostResponse = {}) { if (unarchivePostResponse) { writer.writeBooleanValue("value", unarchivePostResponse.value); writer.writeAdditionalData(unarchivePostResponse.additionalData); } } /** * Uri template for the request builder. */ export const UnarchiveRequestBuilderUriTemplate = "{+baseurl}/admin/serviceAnnouncement/messages/unarchive"; /** * Metadata for all the requests in the request builder. */ export const UnarchiveRequestBuilderRequestsMetadata = { post: { uriTemplate: UnarchiveRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createUnarchivePostResponseFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeUnarchivePostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map