UNPKG

@microsoft/msgraph-beta-sdk-users

Version:
92 lines 4.17 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { createMailTipsFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, MailTipsTypeObject, serializeBaseCollectionPaginationCountResponse, serializeMailTips } 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 {GetMailTipsPostRequestBody} */ // @ts-ignore export function createGetMailTipsPostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoGetMailTipsPostRequestBody; } /** * 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 {GetMailTipsPostResponse} */ // @ts-ignore export function createGetMailTipsPostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoGetMailTipsPostResponse; } /** * The deserialization information for the current model * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoGetMailTipsPostRequestBody(getMailTipsPostRequestBody = {}) { return { "backingStoreEnabled": n => { getMailTipsPostRequestBody.backingStoreEnabled = true; }, "EmailAddresses": n => { getMailTipsPostRequestBody.emailAddresses = n.getCollectionOfPrimitiveValues(); }, "MailTipsOptions": n => { getMailTipsPostRequestBody.mailTipsOptions = n.getCollectionOfEnumValues(MailTipsTypeObject); }, }; } /** * The deserialization information for the current model * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoGetMailTipsPostResponse(getMailTipsPostResponse = {}) { return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(getMailTipsPostResponse)), { "value": n => { getMailTipsPostResponse.value = n.getCollectionOfObjectValues(createMailTipsFromDiscriminatorValue); } }); } /** * Serializes information the current object * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeGetMailTipsPostRequestBody(writer, getMailTipsPostRequestBody = {}) { if (getMailTipsPostRequestBody) { writer.writeCollectionOfPrimitiveValues("EmailAddresses", getMailTipsPostRequestBody.emailAddresses); writer.writeEnumValue("MailTipsOptions", getMailTipsPostRequestBody.mailTipsOptions); writer.writeAdditionalData(getMailTipsPostRequestBody.additionalData); } } /** * Serializes information the current object * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeGetMailTipsPostResponse(writer, getMailTipsPostResponse = {}) { if (getMailTipsPostResponse) { serializeBaseCollectionPaginationCountResponse(writer, getMailTipsPostResponse); writer.writeCollectionOfObjectValues("value", getMailTipsPostResponse.value, serializeMailTips); } } /** * Uri template for the request builder. */ export const GetMailTipsRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/getMailTips"; /** * Metadata for all the requests in the request builder. */ export const GetMailTipsRequestBuilderRequestsMetadata = { post: { uriTemplate: GetMailTipsRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createGetMailTipsPostResponseFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeGetMailTipsPostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map