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