UNPKG

@microsoft/msgraph-beta-sdk

Version:
510 lines 26.5 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { createKeyValuePairFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, deserializeIntoEntity, serializeBaseCollectionPaginationCountResponse, serializeEntity, serializeKeyValuePair } from '../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 {AlertImpact} */ // @ts-ignore export function createAlertImpactFromDiscriminatorValue(parseNode) { return deserializeIntoAlertImpact; } /** * 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 {AlertRecordCollectionResponse} */ // @ts-ignore export function createAlertRecordCollectionResponseFromDiscriminatorValue(parseNode) { return deserializeIntoAlertRecordCollectionResponse; } /** * 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 {AlertRecord} */ // @ts-ignore export function createAlertRecordFromDiscriminatorValue(parseNode) { return deserializeIntoAlertRecord; } /** * 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 {AlertRuleCollectionResponse} */ // @ts-ignore export function createAlertRuleCollectionResponseFromDiscriminatorValue(parseNode) { return deserializeIntoAlertRuleCollectionResponse; } /** * 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 {AlertRule} */ // @ts-ignore export function createAlertRuleFromDiscriminatorValue(parseNode) { return deserializeIntoAlertRule; } /** * 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 {Monitoring} */ // @ts-ignore export function createMonitoringFromDiscriminatorValue(parseNode) { return deserializeIntoMonitoring; } /** * 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 {NotificationChannel} */ // @ts-ignore export function createNotificationChannelFromDiscriminatorValue(parseNode) { return deserializeIntoNotificationChannel; } /** * 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 {NotificationReceiver} */ // @ts-ignore export function createNotificationReceiverFromDiscriminatorValue(parseNode) { return deserializeIntoNotificationReceiver; } /** * 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 {PortalNotification} */ // @ts-ignore export function createPortalNotificationFromDiscriminatorValue(parseNode) { return deserializeIntoPortalNotification; } /** * 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 {RuleCondition} */ // @ts-ignore export function createRuleConditionFromDiscriminatorValue(parseNode) { return deserializeIntoRuleCondition; } /** * 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 {RuleThreshold} */ // @ts-ignore export function createRuleThresholdFromDiscriminatorValue(parseNode) { return deserializeIntoRuleThreshold; } /** * The deserialization information for the current model * @param AlertImpact The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoAlertImpact(alertImpact = {}) { return { "aggregationType": n => { alertImpact.aggregationType = n.getEnumValue(AggregationTypeObject); }, "alertImpactDetails": n => { alertImpact.alertImpactDetails = n.getCollectionOfObjectValues(createKeyValuePairFromDiscriminatorValue); }, "backingStoreEnabled": n => { alertImpact.backingStoreEnabled = true; }, "@odata.type": n => { alertImpact.odataType = n.getStringValue(); }, "value": n => { alertImpact.value = n.getNumberValue(); }, }; } /** * The deserialization information for the current model * @param AlertRecord The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoAlertRecord(alertRecord = {}) { return Object.assign(Object.assign({}, deserializeIntoEntity(alertRecord)), { "alertImpact": n => { alertRecord.alertImpact = n.getObjectValue(createAlertImpactFromDiscriminatorValue); }, "alertRuleId": n => { alertRecord.alertRuleId = n.getStringValue(); }, "alertRuleTemplate": n => { alertRecord.alertRuleTemplate = n.getEnumValue(AlertRuleTemplateObject); }, "detectedDateTime": n => { alertRecord.detectedDateTime = n.getDateValue(); }, "displayName": n => { alertRecord.displayName = n.getStringValue(); }, "lastUpdatedDateTime": n => { alertRecord.lastUpdatedDateTime = n.getDateValue(); }, "resolvedDateTime": n => { alertRecord.resolvedDateTime = n.getDateValue(); }, "severity": n => { alertRecord.severity = n.getEnumValue(RuleSeverityTypeObject); }, "status": n => { alertRecord.status = n.getEnumValue(AlertStatusTypeObject); } }); } /** * The deserialization information for the current model * @param AlertRecordCollectionResponse The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoAlertRecordCollectionResponse(alertRecordCollectionResponse = {}) { return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(alertRecordCollectionResponse)), { "value": n => { alertRecordCollectionResponse.value = n.getCollectionOfObjectValues(createAlertRecordFromDiscriminatorValue); } }); } /** * The deserialization information for the current model * @param AlertRule The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoAlertRule(alertRule = {}) { return Object.assign(Object.assign({}, deserializeIntoEntity(alertRule)), { "alertRuleTemplate": n => { alertRule.alertRuleTemplate = n.getEnumValue(AlertRuleTemplateObject); }, "conditions": n => { alertRule.conditions = n.getCollectionOfObjectValues(createRuleConditionFromDiscriminatorValue); }, "description": n => { alertRule.description = n.getStringValue(); }, "displayName": n => { alertRule.displayName = n.getStringValue(); }, "enabled": n => { alertRule.enabled = n.getBooleanValue(); }, "isSystemRule": n => { alertRule.isSystemRule = n.getBooleanValue(); }, "notificationChannels": n => { alertRule.notificationChannels = n.getCollectionOfObjectValues(createNotificationChannelFromDiscriminatorValue); }, "severity": n => { alertRule.severity = n.getEnumValue(RuleSeverityTypeObject); }, "threshold": n => { alertRule.threshold = n.getObjectValue(createRuleThresholdFromDiscriminatorValue); } }); } /** * The deserialization information for the current model * @param AlertRuleCollectionResponse The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoAlertRuleCollectionResponse(alertRuleCollectionResponse = {}) { return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(alertRuleCollectionResponse)), { "value": n => { alertRuleCollectionResponse.value = n.getCollectionOfObjectValues(createAlertRuleFromDiscriminatorValue); } }); } /** * The deserialization information for the current model * @param Monitoring The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoMonitoring(monitoring = {}) { return Object.assign(Object.assign({}, deserializeIntoEntity(monitoring)), { "alertRecords": n => { monitoring.alertRecords = n.getCollectionOfObjectValues(createAlertRecordFromDiscriminatorValue); }, "alertRules": n => { monitoring.alertRules = n.getCollectionOfObjectValues(createAlertRuleFromDiscriminatorValue); } }); } /** * The deserialization information for the current model * @param NotificationChannel The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoNotificationChannel(notificationChannel = {}) { return { "backingStoreEnabled": n => { notificationChannel.backingStoreEnabled = true; }, "notificationChannelType": n => { notificationChannel.notificationChannelType = n.getEnumValue(NotificationChannelTypeObject); }, "notificationReceivers": n => { notificationChannel.notificationReceivers = n.getCollectionOfObjectValues(createNotificationReceiverFromDiscriminatorValue); }, "@odata.type": n => { notificationChannel.odataType = n.getStringValue(); }, }; } /** * The deserialization information for the current model * @param NotificationReceiver The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoNotificationReceiver(notificationReceiver = {}) { return { "backingStoreEnabled": n => { notificationReceiver.backingStoreEnabled = true; }, "contactInformation": n => { notificationReceiver.contactInformation = n.getStringValue(); }, "locale": n => { notificationReceiver.locale = n.getStringValue(); }, "@odata.type": n => { notificationReceiver.odataType = n.getStringValue(); }, }; } /** * The deserialization information for the current model * @param PortalNotification The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoPortalNotification(portalNotification = {}) { return { "alertImpact": n => { portalNotification.alertImpact = n.getObjectValue(createAlertImpactFromDiscriminatorValue); }, "alertRecordId": n => { portalNotification.alertRecordId = n.getStringValue(); }, "alertRuleId": n => { portalNotification.alertRuleId = n.getStringValue(); }, "alertRuleName": n => { portalNotification.alertRuleName = n.getStringValue(); }, "alertRuleTemplate": n => { portalNotification.alertRuleTemplate = n.getEnumValue(AlertRuleTemplateObject); }, "backingStoreEnabled": n => { portalNotification.backingStoreEnabled = true; }, "id": n => { portalNotification.id = n.getStringValue(); }, "isPortalNotificationSent": n => { portalNotification.isPortalNotificationSent = n.getBooleanValue(); }, "@odata.type": n => { portalNotification.odataType = n.getStringValue(); }, "severity": n => { portalNotification.severity = n.getEnumValue(RuleSeverityTypeObject); }, }; } /** * The deserialization information for the current model * @param RuleCondition The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoRuleCondition(ruleCondition = {}) { return { "aggregation": n => { ruleCondition.aggregation = n.getEnumValue(AggregationTypeObject); }, "backingStoreEnabled": n => { ruleCondition.backingStoreEnabled = true; }, "conditionCategory": n => { ruleCondition.conditionCategory = n.getEnumValue(ConditionCategoryObject); }, "@odata.type": n => { ruleCondition.odataType = n.getStringValue(); }, "operator": n => { ruleCondition.operator = n.getEnumValue(OperatorTypeObject); }, "relationshipType": n => { ruleCondition.relationshipType = n.getEnumValue(RelationshipTypeObject); }, "thresholdValue": n => { ruleCondition.thresholdValue = n.getStringValue(); }, }; } /** * The deserialization information for the current model * @param RuleThreshold The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoRuleThreshold(ruleThreshold = {}) { return { "aggregation": n => { ruleThreshold.aggregation = n.getEnumValue(AggregationTypeObject); }, "backingStoreEnabled": n => { ruleThreshold.backingStoreEnabled = true; }, "@odata.type": n => { ruleThreshold.odataType = n.getStringValue(); }, "operator": n => { ruleThreshold.operator = n.getEnumValue(OperatorTypeObject); }, "target": n => { ruleThreshold.target = n.getNumberValue(); }, }; } /** * Serializes information the current object * @param AlertImpact 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 serializeAlertImpact(writer, alertImpact = {}, isSerializingDerivedType = false) { if (!alertImpact || isSerializingDerivedType) { return; } writer.writeEnumValue("aggregationType", alertImpact.aggregationType); writer.writeCollectionOfObjectValues("alertImpactDetails", alertImpact.alertImpactDetails, serializeKeyValuePair); writer.writeStringValue("@odata.type", alertImpact.odataType); writer.writeNumberValue("value", alertImpact.value); writer.writeAdditionalData(alertImpact.additionalData); } /** * Serializes information the current object * @param AlertRecord 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 serializeAlertRecord(writer, alertRecord = {}, isSerializingDerivedType = false) { if (!alertRecord || isSerializingDerivedType) { return; } serializeEntity(writer, alertRecord, isSerializingDerivedType); writer.writeObjectValue("alertImpact", alertRecord.alertImpact, serializeAlertImpact); writer.writeStringValue("alertRuleId", alertRecord.alertRuleId); writer.writeEnumValue("alertRuleTemplate", alertRecord.alertRuleTemplate); writer.writeDateValue("detectedDateTime", alertRecord.detectedDateTime); writer.writeStringValue("displayName", alertRecord.displayName); writer.writeDateValue("lastUpdatedDateTime", alertRecord.lastUpdatedDateTime); writer.writeDateValue("resolvedDateTime", alertRecord.resolvedDateTime); writer.writeEnumValue("severity", alertRecord.severity); writer.writeEnumValue("status", alertRecord.status); } /** * Serializes information the current object * @param AlertRecordCollectionResponse 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 serializeAlertRecordCollectionResponse(writer, alertRecordCollectionResponse = {}, isSerializingDerivedType = false) { if (!alertRecordCollectionResponse || isSerializingDerivedType) { return; } serializeBaseCollectionPaginationCountResponse(writer, alertRecordCollectionResponse, isSerializingDerivedType); writer.writeCollectionOfObjectValues("value", alertRecordCollectionResponse.value, serializeAlertRecord); } /** * Serializes information the current object * @param AlertRule 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 serializeAlertRule(writer, alertRule = {}, isSerializingDerivedType = false) { if (!alertRule || isSerializingDerivedType) { return; } serializeEntity(writer, alertRule, isSerializingDerivedType); writer.writeEnumValue("alertRuleTemplate", alertRule.alertRuleTemplate); writer.writeCollectionOfObjectValues("conditions", alertRule.conditions, serializeRuleCondition); writer.writeStringValue("description", alertRule.description); writer.writeStringValue("displayName", alertRule.displayName); writer.writeBooleanValue("enabled", alertRule.enabled); writer.writeBooleanValue("isSystemRule", alertRule.isSystemRule); writer.writeCollectionOfObjectValues("notificationChannels", alertRule.notificationChannels, serializeNotificationChannel); writer.writeEnumValue("severity", alertRule.severity); writer.writeObjectValue("threshold", alertRule.threshold, serializeRuleThreshold); } /** * Serializes information the current object * @param AlertRuleCollectionResponse 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 serializeAlertRuleCollectionResponse(writer, alertRuleCollectionResponse = {}, isSerializingDerivedType = false) { if (!alertRuleCollectionResponse || isSerializingDerivedType) { return; } serializeBaseCollectionPaginationCountResponse(writer, alertRuleCollectionResponse, isSerializingDerivedType); writer.writeCollectionOfObjectValues("value", alertRuleCollectionResponse.value, serializeAlertRule); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param Monitoring The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeMonitoring(writer, monitoring = {}, isSerializingDerivedType = false) { if (!monitoring || isSerializingDerivedType) { return; } serializeEntity(writer, monitoring, isSerializingDerivedType); writer.writeCollectionOfObjectValues("alertRecords", monitoring.alertRecords, serializeAlertRecord); writer.writeCollectionOfObjectValues("alertRules", monitoring.alertRules, serializeAlertRule); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param NotificationChannel The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeNotificationChannel(writer, notificationChannel = {}, isSerializingDerivedType = false) { if (!notificationChannel || isSerializingDerivedType) { return; } writer.writeEnumValue("notificationChannelType", notificationChannel.notificationChannelType); writer.writeCollectionOfObjectValues("notificationReceivers", notificationChannel.notificationReceivers, serializeNotificationReceiver); writer.writeStringValue("@odata.type", notificationChannel.odataType); writer.writeAdditionalData(notificationChannel.additionalData); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param NotificationReceiver The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeNotificationReceiver(writer, notificationReceiver = {}, isSerializingDerivedType = false) { if (!notificationReceiver || isSerializingDerivedType) { return; } writer.writeStringValue("contactInformation", notificationReceiver.contactInformation); writer.writeStringValue("locale", notificationReceiver.locale); writer.writeStringValue("@odata.type", notificationReceiver.odataType); writer.writeAdditionalData(notificationReceiver.additionalData); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param PortalNotification The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializePortalNotification(writer, portalNotification = {}, isSerializingDerivedType = false) { if (!portalNotification || isSerializingDerivedType) { return; } writer.writeObjectValue("alertImpact", portalNotification.alertImpact, serializeAlertImpact); writer.writeStringValue("alertRecordId", portalNotification.alertRecordId); writer.writeStringValue("alertRuleId", portalNotification.alertRuleId); writer.writeStringValue("alertRuleName", portalNotification.alertRuleName); writer.writeEnumValue("alertRuleTemplate", portalNotification.alertRuleTemplate); writer.writeStringValue("id", portalNotification.id); writer.writeBooleanValue("isPortalNotificationSent", portalNotification.isPortalNotificationSent); writer.writeStringValue("@odata.type", portalNotification.odataType); writer.writeEnumValue("severity", portalNotification.severity); writer.writeAdditionalData(portalNotification.additionalData); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param RuleCondition The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeRuleCondition(writer, ruleCondition = {}, isSerializingDerivedType = false) { if (!ruleCondition || isSerializingDerivedType) { return; } writer.writeEnumValue("aggregation", ruleCondition.aggregation); writer.writeEnumValue("conditionCategory", ruleCondition.conditionCategory); writer.writeStringValue("@odata.type", ruleCondition.odataType); writer.writeEnumValue("operator", ruleCondition.operator); writer.writeEnumValue("relationshipType", ruleCondition.relationshipType); writer.writeStringValue("thresholdValue", ruleCondition.thresholdValue); writer.writeAdditionalData(ruleCondition.additionalData); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param RuleThreshold The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeRuleThreshold(writer, ruleThreshold = {}, isSerializingDerivedType = false) { if (!ruleThreshold || isSerializingDerivedType) { return; } writer.writeEnumValue("aggregation", ruleThreshold.aggregation); writer.writeStringValue("@odata.type", ruleThreshold.odataType); writer.writeEnumValue("operator", ruleThreshold.operator); writer.writeNumberValue("target", ruleThreshold.target); writer.writeAdditionalData(ruleThreshold.additionalData); } export const AggregationTypeObject = { Count: "count", Percentage: "percentage", AffectedCloudPcCount: "affectedCloudPcCount", AffectedCloudPcPercentage: "affectedCloudPcPercentage", UnknownFutureValue: "unknownFutureValue", DurationInMinutes: "durationInMinutes", }; export const AlertRuleTemplateObject = { CloudPcProvisionScenario: "cloudPcProvisionScenario", CloudPcImageUploadScenario: "cloudPcImageUploadScenario", CloudPcOnPremiseNetworkConnectionCheckScenario: "cloudPcOnPremiseNetworkConnectionCheckScenario", UnknownFutureValue: "unknownFutureValue", CloudPcInGracePeriodScenario: "cloudPcInGracePeriodScenario", CloudPcFrontlineInsufficientLicensesScenario: "cloudPcFrontlineInsufficientLicensesScenario", CloudPcInaccessibleScenario: "cloudPcInaccessibleScenario", CloudPcFrontlineConcurrencyScenario: "cloudPcFrontlineConcurrencyScenario", CloudPcUserSettingsPersistenceScenario: "cloudPcUserSettingsPersistenceScenario", CloudPcDeprovisionFailedScenario: "cloudPcDeprovisionFailedScenario", }; export const AlertStatusTypeObject = { Active: "active", Resolved: "resolved", UnknownFutureValue: "unknownFutureValue", }; export const ConditionCategoryObject = { ProvisionFailures: "provisionFailures", ImageUploadFailures: "imageUploadFailures", AzureNetworkConnectionCheckFailures: "azureNetworkConnectionCheckFailures", CloudPcInGracePeriod: "cloudPcInGracePeriod", FrontlineInsufficientLicenses: "frontlineInsufficientLicenses", CloudPcConnectionErrors: "cloudPcConnectionErrors", CloudPcHostHealthCheckFailures: "cloudPcHostHealthCheckFailures", CloudPcZoneOutage: "cloudPcZoneOutage", UnknownFutureValue: "unknownFutureValue", FrontlineBufferUsageDuration: "frontlineBufferUsageDuration", FrontlineBufferUsageThreshold: "frontlineBufferUsageThreshold", CloudPcUserSettingsPersistenceUsageThreshold: "cloudPcUserSettingsPersistenceUsageThreshold", CloudPcDeprovisionedThreshold: "cloudPcDeprovisionedThreshold", CloudPcReserveDeprovisionFailedThreshold: "cloudPcReserveDeprovisionFailedThreshold", }; export const NotificationChannelTypeObject = { Portal: "portal", Email: "email", PhoneCall: "phoneCall", Sms: "sms", UnknownFutureValue: "unknownFutureValue", }; export const OperatorTypeObject = { GreaterOrEqual: "greaterOrEqual", Equal: "equal", Greater: "greater", Less: "less", LessOrEqual: "lessOrEqual", NotEqual: "notEqual", UnknownFutureValue: "unknownFutureValue", }; export const RelationshipTypeObject = { And: "and", Or: "or", UnknownFutureValue: "unknownFutureValue", }; export const RuleSeverityTypeObject = { Unknown: "unknown", Informational: "informational", Warning: "warning", Critical: "critical", UnknownFutureValue: "unknownFutureValue", }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map