UNPKG

@microsoft/msgraph-beta-sdk-security

Version:
98 lines 4.6 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { createAlertFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, serializeAlert, serializeBaseCollectionPaginationCountResponse } 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 {UpdateAlertsPostRequestBody} */ // @ts-ignore export function createUpdateAlertsPostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoUpdateAlertsPostRequestBody; } /** * 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 {UpdateAlertsPostResponse} */ // @ts-ignore export function createUpdateAlertsPostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoUpdateAlertsPostResponse; } /** * The deserialization information for the current model * @param UpdateAlertsPostRequestBody The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoUpdateAlertsPostRequestBody(updateAlertsPostRequestBody = {}) { return { "backingStoreEnabled": n => { updateAlertsPostRequestBody.backingStoreEnabled = true; }, "value": n => { updateAlertsPostRequestBody.value = n.getCollectionOfObjectValues(createAlertFromDiscriminatorValue); }, }; } /** * The deserialization information for the current model * @param UpdateAlertsPostResponse The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoUpdateAlertsPostResponse(updateAlertsPostResponse = {}) { return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(updateAlertsPostResponse)), { "value": n => { updateAlertsPostResponse.value = n.getCollectionOfObjectValues(createAlertFromDiscriminatorValue); } }); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param UpdateAlertsPostRequestBody The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeUpdateAlertsPostRequestBody(writer, updateAlertsPostRequestBody = {}, isSerializingDerivedType = false) { if (!updateAlertsPostRequestBody || isSerializingDerivedType) { return; } writer.writeCollectionOfObjectValues("value", updateAlertsPostRequestBody.value, serializeAlert); writer.writeAdditionalData(updateAlertsPostRequestBody.additionalData); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param UpdateAlertsPostResponse The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeUpdateAlertsPostResponse(writer, updateAlertsPostResponse = {}, isSerializingDerivedType = false) { if (!updateAlertsPostResponse || isSerializingDerivedType) { return; } serializeBaseCollectionPaginationCountResponse(writer, updateAlertsPostResponse, isSerializingDerivedType); writer.writeCollectionOfObjectValues("value", updateAlertsPostResponse.value, serializeAlert); } /** * Uri template for the request builder. */ export const UpdateAlertsRequestBuilderUriTemplate = "{+baseurl}/security/alerts/updateAlerts"; /** * Metadata for all the requests in the request builder. */ export const UpdateAlertsRequestBuilderRequestsMetadata = { post: { uriTemplate: UpdateAlertsRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createUpdateAlertsPostResponseFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeUpdateAlertsPostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map