@microsoft/msgraph-beta-sdk-admin
Version:
Admin fluent API for Microsoft Graph
91 lines • 3.56 kB
JavaScript
/* 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
* @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
* @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 writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeMarkUnreadPostRequestBody(writer, markUnreadPostRequestBody = {}) {
if (markUnreadPostRequestBody) {
writer.writeCollectionOfPrimitiveValues("messageIds", markUnreadPostRequestBody.messageIds);
writer.writeAdditionalData(markUnreadPostRequestBody.additionalData);
}
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeMarkUnreadPostResponse(writer, markUnreadPostResponse = {}) {
if (markUnreadPostResponse) {
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