@microsoft/msgraph-beta-sdk-communications
Version:
Communications fluent API for Microsoft Graph
98 lines • 4.83 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createPresenceFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, serializePresence } from '@microsoft/msgraph-beta-sdk/models/index.js';
// @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 {GetPresencesByUserIdPostRequestBody}
*/
// @ts-ignore
export function createGetPresencesByUserIdPostRequestBodyFromDiscriminatorValue(parseNode) {
return deserializeIntoGetPresencesByUserIdPostRequestBody;
}
/**
* 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 {GetPresencesByUserIdPostResponse}
*/
// @ts-ignore
export function createGetPresencesByUserIdPostResponseFromDiscriminatorValue(parseNode) {
return deserializeIntoGetPresencesByUserIdPostResponse;
}
/**
* The deserialization information for the current model
* @param GetPresencesByUserIdPostRequestBody The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoGetPresencesByUserIdPostRequestBody(getPresencesByUserIdPostRequestBody = {}) {
return {
"backingStoreEnabled": n => { getPresencesByUserIdPostRequestBody.backingStoreEnabled = true; },
"ids": n => { getPresencesByUserIdPostRequestBody.ids = n.getCollectionOfPrimitiveValues(); },
};
}
/**
* The deserialization information for the current model
* @param GetPresencesByUserIdPostResponse The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoGetPresencesByUserIdPostResponse(getPresencesByUserIdPostResponse = {}) {
return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(getPresencesByUserIdPostResponse)), { "value": n => { getPresencesByUserIdPostResponse.value = n.getCollectionOfObjectValues(createPresenceFromDiscriminatorValue); } });
}
/**
* Serializes information the current object
* @param GetPresencesByUserIdPostRequestBody 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 serializeGetPresencesByUserIdPostRequestBody(writer, getPresencesByUserIdPostRequestBody = {}, isSerializingDerivedType = false) {
if (!getPresencesByUserIdPostRequestBody || isSerializingDerivedType) {
return;
}
writer.writeCollectionOfPrimitiveValues("ids", getPresencesByUserIdPostRequestBody.ids);
writer.writeAdditionalData(getPresencesByUserIdPostRequestBody.additionalData);
}
/**
* Serializes information the current object
* @param GetPresencesByUserIdPostResponse 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 serializeGetPresencesByUserIdPostResponse(writer, getPresencesByUserIdPostResponse = {}, isSerializingDerivedType = false) {
if (!getPresencesByUserIdPostResponse || isSerializingDerivedType) {
return;
}
serializeBaseCollectionPaginationCountResponse(writer, getPresencesByUserIdPostResponse, isSerializingDerivedType);
writer.writeCollectionOfObjectValues("value", getPresencesByUserIdPostResponse.value, serializePresence);
}
/**
* Uri template for the request builder.
*/
export const GetPresencesByUserIdRequestBuilderUriTemplate = "{+baseurl}/communications/getPresencesByUserId";
/**
* Metadata for all the requests in the request builder.
*/
export const GetPresencesByUserIdRequestBuilderRequestsMetadata = {
post: {
uriTemplate: GetPresencesByUserIdRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
errorMappings: {
XXX: createODataErrorFromDiscriminatorValue,
},
adapterMethodName: "send",
responseBodyFactory: createGetPresencesByUserIdPostResponseFromDiscriminatorValue,
requestBodyContentType: "application/json",
requestBodySerializer: serializeGetPresencesByUserIdPostRequestBody,
requestInformationContentSetMethod: "setContentFromParsable",
},
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map