/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { deserializeIntoBaseCollectionPaginationCountResponse, deserializeIntoDictionary, deserializeIntoEntity, serializeBaseCollectionPaginationCountResponse, serializeDictionary, serializeEntity } 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 {ActivityLog}
 */
// @ts-ignore
export function createActivityLogFromDiscriminatorValue(parseNode) {
    return deserializeIntoActivityLog;
}
/**
 * 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 {AdditionalDataDictionary}
 */
// @ts-ignore
export function createAdditionalDataDictionaryFromDiscriminatorValue(parseNode) {
    return deserializeIntoAdditionalDataDictionary;
}
/**
 * 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 {AdminsMfaEnforcedSecurityRequirement}
 */
// @ts-ignore
export function createAdminsMfaEnforcedSecurityRequirementFromDiscriminatorValue(parseNode) {
    return deserializeIntoAdminsMfaEnforcedSecurityRequirement;
}
/**
 * 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 {AffectedResource}
 */
// @ts-ignore
export function createAffectedResourceFromDiscriminatorValue(parseNode) {
    return deserializeIntoAffectedResource;
}
/**
 * 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 {CustomerInsightCollectionResponse}
 */
// @ts-ignore
export function createCustomerInsightCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomerInsightCollectionResponse;
}
/**
 * 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 {CustomerInsight}
 */
// @ts-ignore
export function createCustomerInsightFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomerInsight;
}
/**
 * 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 {CustomerMfaInsight}
 */
// @ts-ignore
export function createCustomerMfaInsightFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomerMfaInsight;
}
/**
 * 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 {CustomersMfaEnforcedSecurityRequirement}
 */
// @ts-ignore
export function createCustomersMfaEnforcedSecurityRequirementFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomersMfaEnforcedSecurityRequirement;
}
/**
 * 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 {CustomersSpendingBudgetSecurityRequirement}
 */
// @ts-ignore
export function createCustomersSpendingBudgetSecurityRequirementFromDiscriminatorValue(parseNode) {
    return deserializeIntoCustomersSpendingBudgetSecurityRequirement;
}
/**
 * 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 {PartnerSecurityAlertCollectionResponse}
 */
// @ts-ignore
export function createPartnerSecurityAlertCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoPartnerSecurityAlertCollectionResponse;
}
/**
 * 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 {PartnerSecurityAlert}
 */
// @ts-ignore
export function createPartnerSecurityAlertFromDiscriminatorValue(parseNode) {
    return deserializeIntoPartnerSecurityAlert;
}
/**
 * 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 {PartnerSecurity}
 */
// @ts-ignore
export function createPartnerSecurityFromDiscriminatorValue(parseNode) {
    return deserializeIntoPartnerSecurity;
}
/**
 * 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 {PartnerSecurityScore}
 */
// @ts-ignore
export function createPartnerSecurityScoreFromDiscriminatorValue(parseNode) {
    return deserializeIntoPartnerSecurityScore;
}
/**
 * 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 {ResponseTimeSecurityRequirement}
 */
// @ts-ignore
export function createResponseTimeSecurityRequirementFromDiscriminatorValue(parseNode) {
    return deserializeIntoResponseTimeSecurityRequirement;
}
/**
 * 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 {SecurityRequirementCollectionResponse}
 */
// @ts-ignore
export function createSecurityRequirementCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoSecurityRequirementCollectionResponse;
}
/**
 * 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 {SecurityRequirement}
 */
// @ts-ignore
export function createSecurityRequirementFromDiscriminatorValue(parseNode) {
    if (!parseNode)
        throw new Error("parseNode cannot be undefined");
    const mappingValueNode = parseNode === null || parseNode === void 0 ? void 0 : parseNode.getChildNode("@odata.type");
    if (mappingValueNode) {
        const mappingValue = mappingValueNode.getStringValue();
        if (mappingValue) {
            switch (mappingValue) {
                case "#microsoft.graph.partner.security.adminsMfaEnforcedSecurityRequirement":
                    return deserializeIntoAdminsMfaEnforcedSecurityRequirement;
                case "#microsoft.graph.partner.security.customersMfaEnforcedSecurityRequirement":
                    return deserializeIntoCustomersMfaEnforcedSecurityRequirement;
                case "#microsoft.graph.partner.security.customersSpendingBudgetSecurityRequirement":
                    return deserializeIntoCustomersSpendingBudgetSecurityRequirement;
                case "#microsoft.graph.partner.security.responseTimeSecurityRequirement":
                    return deserializeIntoResponseTimeSecurityRequirement;
            }
        }
    }
    return deserializeIntoSecurityRequirement;
}
/**
 * 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 {SecurityScoreHistoryCollectionResponse}
 */
// @ts-ignore
export function createSecurityScoreHistoryCollectionResponseFromDiscriminatorValue(parseNode) {
    return deserializeIntoSecurityScoreHistoryCollectionResponse;
}
/**
 * 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 {SecurityScoreHistory}
 */
// @ts-ignore
export function createSecurityScoreHistoryFromDiscriminatorValue(parseNode) {
    return deserializeIntoSecurityScoreHistory;
}
/**
 * The deserialization information for the current model
 * @param ActivityLog The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoActivityLog(activityLog = {}) {
    return {
        "backingStoreEnabled": n => { activityLog.backingStoreEnabled = true; },
        "@odata.type": n => { activityLog.odataType = n.getStringValue(); },
        "statusFrom": n => { activityLog.statusFrom = n.getEnumValue(SecurityAlertStatusObject); },
        "statusTo": n => { activityLog.statusTo = n.getEnumValue(SecurityAlertStatusObject); },
        "updatedBy": n => { activityLog.updatedBy = n.getStringValue(); },
        "updatedDateTime": n => { activityLog.updatedDateTime = n.getDateValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @param AdditionalDataDictionary The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoAdditionalDataDictionary(additionalDataDictionary = {}) {
    return Object.assign({}, deserializeIntoDictionary(additionalDataDictionary));
}
/**
 * The deserialization information for the current model
 * @param AdminsMfaEnforcedSecurityRequirement The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoAdminsMfaEnforcedSecurityRequirement(adminsMfaEnforcedSecurityRequirement = {}) {
    return Object.assign(Object.assign({}, deserializeIntoSecurityRequirement(adminsMfaEnforcedSecurityRequirement)), { "adminsRequiredNotUsingMfaCount": n => { adminsMfaEnforcedSecurityRequirement.adminsRequiredNotUsingMfaCount = n.getNumberValue(); }, "legacyPerUserMfaStatus": n => { adminsMfaEnforcedSecurityRequirement.legacyPerUserMfaStatus = n.getEnumValue(PolicyStatusObject); }, "mfaConditionalAccessPolicyStatus": n => { adminsMfaEnforcedSecurityRequirement.mfaConditionalAccessPolicyStatus = n.getEnumValue(PolicyStatusObject); }, "mfaEnabledAdminsCount": n => { adminsMfaEnforcedSecurityRequirement.mfaEnabledAdminsCount = n.getNumberValue(); }, "mfaEnabledUsersCount": n => { adminsMfaEnforcedSecurityRequirement.mfaEnabledUsersCount = n.getNumberValue(); }, "securityDefaultsStatus": n => { adminsMfaEnforcedSecurityRequirement.securityDefaultsStatus = n.getEnumValue(PolicyStatusObject); }, "totalAdminsCount": n => { adminsMfaEnforcedSecurityRequirement.totalAdminsCount = n.getNumberValue(); }, "totalUsersCount": n => { adminsMfaEnforcedSecurityRequirement.totalUsersCount = n.getNumberValue(); }, "usersRequiredNotUsingMfaCount": n => { adminsMfaEnforcedSecurityRequirement.usersRequiredNotUsingMfaCount = n.getNumberValue(); } });
}
/**
 * The deserialization information for the current model
 * @param AffectedResource The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoAffectedResource(affectedResource = {}) {
    return {
        "backingStoreEnabled": n => { affectedResource.backingStoreEnabled = true; },
        "@odata.type": n => { affectedResource.odataType = n.getStringValue(); },
        "resourceId": n => { affectedResource.resourceId = n.getStringValue(); },
        "resourceType": n => { affectedResource.resourceType = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @param CustomerInsight The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCustomerInsight(customerInsight = {}) {
    return {
        "backingStoreEnabled": n => { customerInsight.backingStoreEnabled = true; },
        "mfa": n => { customerInsight.mfa = n.getObjectValue(createCustomerMfaInsightFromDiscriminatorValue); },
        "@odata.type": n => { customerInsight.odataType = n.getStringValue(); },
        "tenantId": n => { customerInsight.tenantId = n.getStringValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @param CustomerInsightCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCustomerInsightCollectionResponse(customerInsightCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(customerInsightCollectionResponse)), { "value": n => { customerInsightCollectionResponse.value = n.getCollectionOfObjectValues(createCustomerInsightFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param CustomerMfaInsight The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCustomerMfaInsight(customerMfaInsight = {}) {
    return {
        "backingStoreEnabled": n => { customerMfaInsight.backingStoreEnabled = true; },
        "compliantAdminsCount": n => { customerMfaInsight.compliantAdminsCount = n.getNumberValue(); },
        "compliantNonAdminsCount": n => { customerMfaInsight.compliantNonAdminsCount = n.getNumberValue(); },
        "legacyPerUserMfaStatus": n => { customerMfaInsight.legacyPerUserMfaStatus = n.getEnumValue(PolicyStatusObject); },
        "mfaConditionalAccessPolicyStatus": n => { customerMfaInsight.mfaConditionalAccessPolicyStatus = n.getEnumValue(PolicyStatusObject); },
        "@odata.type": n => { customerMfaInsight.odataType = n.getStringValue(); },
        "securityDefaultsStatus": n => { customerMfaInsight.securityDefaultsStatus = n.getEnumValue(PolicyStatusObject); },
        "totalUsersCount": n => { customerMfaInsight.totalUsersCount = n.getNumberValue(); },
    };
}
/**
 * The deserialization information for the current model
 * @param CustomersMfaEnforcedSecurityRequirement The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCustomersMfaEnforcedSecurityRequirement(customersMfaEnforcedSecurityRequirement = {}) {
    return Object.assign(Object.assign({}, deserializeIntoSecurityRequirement(customersMfaEnforcedSecurityRequirement)), { "compliantTenantCount": n => { customersMfaEnforcedSecurityRequirement.compliantTenantCount = n.getNumberValue(); }, "totalTenantCount": n => { customersMfaEnforcedSecurityRequirement.totalTenantCount = n.getNumberValue(); } });
}
/**
 * The deserialization information for the current model
 * @param CustomersSpendingBudgetSecurityRequirement The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoCustomersSpendingBudgetSecurityRequirement(customersSpendingBudgetSecurityRequirement = {}) {
    return Object.assign(Object.assign({}, deserializeIntoSecurityRequirement(customersSpendingBudgetSecurityRequirement)), { "customersWithSpendBudgetCount": n => { customersSpendingBudgetSecurityRequirement.customersWithSpendBudgetCount = n.getNumberValue(); }, "totalCustomersCount": n => { customersSpendingBudgetSecurityRequirement.totalCustomersCount = n.getNumberValue(); } });
}
/**
 * The deserialization information for the current model
 * @param PartnerSecurity The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoPartnerSecurity(partnerSecurity = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(partnerSecurity)), { "securityAlerts": n => { partnerSecurity.securityAlerts = n.getCollectionOfObjectValues(createPartnerSecurityAlertFromDiscriminatorValue); }, "securityScore": n => { partnerSecurity.securityScore = n.getObjectValue(createPartnerSecurityScoreFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param PartnerSecurityAlert The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoPartnerSecurityAlert(partnerSecurityAlert = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(partnerSecurityAlert)), { "activityLogs": n => { partnerSecurityAlert.activityLogs = n.getCollectionOfObjectValues(createActivityLogFromDiscriminatorValue); }, "additionalDetails": n => { partnerSecurityAlert.additionalDetails = n.getObjectValue(createAdditionalDataDictionaryFromDiscriminatorValue); }, "affectedResources": n => { partnerSecurityAlert.affectedResources = n.getCollectionOfObjectValues(createAffectedResourceFromDiscriminatorValue); }, "alertType": n => { partnerSecurityAlert.alertType = n.getStringValue(); }, "catalogOfferId": n => { partnerSecurityAlert.catalogOfferId = n.getStringValue(); }, "confidenceLevel": n => { partnerSecurityAlert.confidenceLevel = n.getEnumValue(SecurityAlertConfidenceObject); }, "customerTenantId": n => { partnerSecurityAlert.customerTenantId = n.getStringValue(); }, "description": n => { partnerSecurityAlert.description = n.getStringValue(); }, "detectedDateTime": n => { partnerSecurityAlert.detectedDateTime = n.getDateValue(); }, "displayName": n => { partnerSecurityAlert.displayName = n.getStringValue(); }, "firstObservedDateTime": n => { partnerSecurityAlert.firstObservedDateTime = n.getDateValue(); }, "isTest": n => { partnerSecurityAlert.isTest = n.getBooleanValue(); }, "lastObservedDateTime": n => { partnerSecurityAlert.lastObservedDateTime = n.getDateValue(); }, "resolvedBy": n => { partnerSecurityAlert.resolvedBy = n.getStringValue(); }, "resolvedOnDateTime": n => { partnerSecurityAlert.resolvedOnDateTime = n.getDateValue(); }, "resolvedReason": n => { partnerSecurityAlert.resolvedReason = n.getEnumValue(SecurityAlertResolvedReasonObject); }, "severity": n => { partnerSecurityAlert.severity = n.getEnumValue(SecurityAlertSeverityObject); }, "status": n => { partnerSecurityAlert.status = n.getEnumValue(SecurityAlertStatusObject); }, "subscriptionId": n => { partnerSecurityAlert.subscriptionId = n.getStringValue(); }, "valueAddedResellerTenantId": n => { partnerSecurityAlert.valueAddedResellerTenantId = n.getStringValue(); } });
}
/**
 * The deserialization information for the current model
 * @param PartnerSecurityAlertCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoPartnerSecurityAlertCollectionResponse(partnerSecurityAlertCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(partnerSecurityAlertCollectionResponse)), { "value": n => { partnerSecurityAlertCollectionResponse.value = n.getCollectionOfObjectValues(createPartnerSecurityAlertFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param PartnerSecurityScore The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoPartnerSecurityScore(partnerSecurityScore = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(partnerSecurityScore)), { "currentScore": n => { partnerSecurityScore.currentScore = n.getNumberValue(); }, "customerInsights": n => { partnerSecurityScore.customerInsights = n.getCollectionOfObjectValues(createCustomerInsightFromDiscriminatorValue); }, "history": n => { partnerSecurityScore.history = n.getCollectionOfObjectValues(createSecurityScoreHistoryFromDiscriminatorValue); }, "lastRefreshDateTime": n => { partnerSecurityScore.lastRefreshDateTime = n.getDateValue(); }, "maxScore": n => { partnerSecurityScore.maxScore = n.getNumberValue(); }, "requirements": n => { partnerSecurityScore.requirements = n.getCollectionOfObjectValues(createSecurityRequirementFromDiscriminatorValue); }, "updatedDateTime": n => { partnerSecurityScore.updatedDateTime = n.getDateValue(); } });
}
/**
 * The deserialization information for the current model
 * @param ResponseTimeSecurityRequirement The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoResponseTimeSecurityRequirement(responseTimeSecurityRequirement = {}) {
    return Object.assign(Object.assign({}, deserializeIntoSecurityRequirement(responseTimeSecurityRequirement)), { "averageResponseTimeInHours": n => { responseTimeSecurityRequirement.averageResponseTimeInHours = n.getNumberValue(); } });
}
/**
 * The deserialization information for the current model
 * @param SecurityRequirement The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoSecurityRequirement(securityRequirement = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(securityRequirement)), { "actionUrl": n => { securityRequirement.actionUrl = n.getStringValue(); }, "complianceStatus": n => { securityRequirement.complianceStatus = n.getEnumValue(ComplianceStatusObject); }, "helpUrl": n => { securityRequirement.helpUrl = n.getStringValue(); }, "maxScore": n => { securityRequirement.maxScore = n.getNumberValue(); }, "requirementType": n => { securityRequirement.requirementType = n.getEnumValue(SecurityRequirementTypeObject); }, "score": n => { securityRequirement.score = n.getNumberValue(); }, "state": n => { securityRequirement.state = n.getEnumValue(SecurityRequirementStateObject); }, "updatedDateTime": n => { securityRequirement.updatedDateTime = n.getDateValue(); } });
}
/**
 * The deserialization information for the current model
 * @param SecurityRequirementCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoSecurityRequirementCollectionResponse(securityRequirementCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(securityRequirementCollectionResponse)), { "value": n => { securityRequirementCollectionResponse.value = n.getCollectionOfObjectValues(createSecurityRequirementFromDiscriminatorValue); } });
}
/**
 * The deserialization information for the current model
 * @param SecurityScoreHistory The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoSecurityScoreHistory(securityScoreHistory = {}) {
    return Object.assign(Object.assign({}, deserializeIntoEntity(securityScoreHistory)), { "compliantRequirementsCount": n => { securityScoreHistory.compliantRequirementsCount = n.getNumberValue(); }, "createdDateTime": n => { securityScoreHistory.createdDateTime = n.getDateValue(); }, "score": n => { securityScoreHistory.score = n.getNumberValue(); }, "totalRequirementsCount": n => { securityScoreHistory.totalRequirementsCount = n.getNumberValue(); } });
}
/**
 * The deserialization information for the current model
 * @param SecurityScoreHistoryCollectionResponse The instance to deserialize into.
 * @returns {Record<string, (node: ParseNode) => void>}
 */
// @ts-ignore
export function deserializeIntoSecurityScoreHistoryCollectionResponse(securityScoreHistoryCollectionResponse = {}) {
    return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(securityScoreHistoryCollectionResponse)), { "value": n => { securityScoreHistoryCollectionResponse.value = n.getCollectionOfObjectValues(createSecurityScoreHistoryFromDiscriminatorValue); } });
}
/**
 * Serializes information the current object
 * @param ActivityLog 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 serializeActivityLog(writer, activityLog = {}, isSerializingDerivedType = false) {
    if (!activityLog || isSerializingDerivedType) {
        return;
    }
    writer.writeStringValue("@odata.type", activityLog.odataType);
    writer.writeEnumValue("statusFrom", activityLog.statusFrom);
    writer.writeEnumValue("statusTo", activityLog.statusTo);
    writer.writeStringValue("updatedBy", activityLog.updatedBy);
    writer.writeDateValue("updatedDateTime", activityLog.updatedDateTime);
    writer.writeAdditionalData(activityLog.additionalData);
}
/**
 * Serializes information the current object
 * @param AdditionalDataDictionary 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 serializeAdditionalDataDictionary(writer, additionalDataDictionary = {}, isSerializingDerivedType = false) {
    if (!additionalDataDictionary || isSerializingDerivedType) {
        return;
    }
    serializeDictionary(writer, additionalDataDictionary, isSerializingDerivedType);
}
/**
 * Serializes information the current object
 * @param AdminsMfaEnforcedSecurityRequirement 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 serializeAdminsMfaEnforcedSecurityRequirement(writer, adminsMfaEnforcedSecurityRequirement = {}, isSerializingDerivedType = false) {
    if (!adminsMfaEnforcedSecurityRequirement || isSerializingDerivedType) {
        return;
    }
    serializeSecurityRequirement(writer, adminsMfaEnforcedSecurityRequirement, isSerializingDerivedType);
    writer.writeNumberValue("adminsRequiredNotUsingMfaCount", adminsMfaEnforcedSecurityRequirement.adminsRequiredNotUsingMfaCount);
    writer.writeEnumValue("legacyPerUserMfaStatus", adminsMfaEnforcedSecurityRequirement.legacyPerUserMfaStatus);
    writer.writeEnumValue("mfaConditionalAccessPolicyStatus", adminsMfaEnforcedSecurityRequirement.mfaConditionalAccessPolicyStatus);
    writer.writeNumberValue("mfaEnabledAdminsCount", adminsMfaEnforcedSecurityRequirement.mfaEnabledAdminsCount);
    writer.writeNumberValue("mfaEnabledUsersCount", adminsMfaEnforcedSecurityRequirement.mfaEnabledUsersCount);
    writer.writeEnumValue("securityDefaultsStatus", adminsMfaEnforcedSecurityRequirement.securityDefaultsStatus);
    writer.writeNumberValue("totalAdminsCount", adminsMfaEnforcedSecurityRequirement.totalAdminsCount);
    writer.writeNumberValue("totalUsersCount", adminsMfaEnforcedSecurityRequirement.totalUsersCount);
    writer.writeNumberValue("usersRequiredNotUsingMfaCount", adminsMfaEnforcedSecurityRequirement.usersRequiredNotUsingMfaCount);
}
/**
 * Serializes information the current object
 * @param AffectedResource 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 serializeAffectedResource(writer, affectedResource = {}, isSerializingDerivedType = false) {
    if (!affectedResource || isSerializingDerivedType) {
        return;
    }
    writer.writeStringValue("@odata.type", affectedResource.odataType);
    writer.writeStringValue("resourceId", affectedResource.resourceId);
    writer.writeStringValue("resourceType", affectedResource.resourceType);
    writer.writeAdditionalData(affectedResource.additionalData);
}
/**
 * Serializes information the current object
 * @param CustomerInsight 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 serializeCustomerInsight(writer, customerInsight = {}, isSerializingDerivedType = false) {
    if (!customerInsight || isSerializingDerivedType) {
        return;
    }
    writer.writeObjectValue("mfa", customerInsight.mfa, serializeCustomerMfaInsight);
    writer.writeStringValue("@odata.type", customerInsight.odataType);
    writer.writeStringValue("tenantId", customerInsight.tenantId);
    writer.writeAdditionalData(customerInsight.additionalData);
}
/**
 * Serializes information the current object
 * @param CustomerInsightCollectionResponse 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 serializeCustomerInsightCollectionResponse(writer, customerInsightCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!customerInsightCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, customerInsightCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", customerInsightCollectionResponse.value, serializeCustomerInsight);
}
/**
 * Serializes information the current object
 * @param CustomerMfaInsight 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 serializeCustomerMfaInsight(writer, customerMfaInsight = {}, isSerializingDerivedType = false) {
    if (!customerMfaInsight || isSerializingDerivedType) {
        return;
    }
    writer.writeNumberValue("compliantAdminsCount", customerMfaInsight.compliantAdminsCount);
    writer.writeNumberValue("compliantNonAdminsCount", customerMfaInsight.compliantNonAdminsCount);
    writer.writeEnumValue("legacyPerUserMfaStatus", customerMfaInsight.legacyPerUserMfaStatus);
    writer.writeEnumValue("mfaConditionalAccessPolicyStatus", customerMfaInsight.mfaConditionalAccessPolicyStatus);
    writer.writeStringValue("@odata.type", customerMfaInsight.odataType);
    writer.writeEnumValue("securityDefaultsStatus", customerMfaInsight.securityDefaultsStatus);
    writer.writeNumberValue("totalUsersCount", customerMfaInsight.totalUsersCount);
    writer.writeAdditionalData(customerMfaInsight.additionalData);
}
/**
 * Serializes information the current object
 * @param CustomersMfaEnforcedSecurityRequirement 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 serializeCustomersMfaEnforcedSecurityRequirement(writer, customersMfaEnforcedSecurityRequirement = {}, isSerializingDerivedType = false) {
    if (!customersMfaEnforcedSecurityRequirement || isSerializingDerivedType) {
        return;
    }
    serializeSecurityRequirement(writer, customersMfaEnforcedSecurityRequirement, isSerializingDerivedType);
    writer.writeNumberValue("compliantTenantCount", customersMfaEnforcedSecurityRequirement.compliantTenantCount);
    writer.writeNumberValue("totalTenantCount", customersMfaEnforcedSecurityRequirement.totalTenantCount);
}
/**
 * Serializes information the current object
 * @param CustomersSpendingBudgetSecurityRequirement 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 serializeCustomersSpendingBudgetSecurityRequirement(writer, customersSpendingBudgetSecurityRequirement = {}, isSerializingDerivedType = false) {
    if (!customersSpendingBudgetSecurityRequirement || isSerializingDerivedType) {
        return;
    }
    serializeSecurityRequirement(writer, customersSpendingBudgetSecurityRequirement, isSerializingDerivedType);
    writer.writeNumberValue("customersWithSpendBudgetCount", customersSpendingBudgetSecurityRequirement.customersWithSpendBudgetCount);
    writer.writeNumberValue("totalCustomersCount", customersSpendingBudgetSecurityRequirement.totalCustomersCount);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param PartnerSecurity The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializePartnerSecurity(writer, partnerSecurity = {}, isSerializingDerivedType = false) {
    if (!partnerSecurity || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, partnerSecurity, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("securityAlerts", partnerSecurity.securityAlerts, serializePartnerSecurityAlert);
    writer.writeObjectValue("securityScore", partnerSecurity.securityScore, serializePartnerSecurityScore);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param PartnerSecurityAlert The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializePartnerSecurityAlert(writer, partnerSecurityAlert = {}, isSerializingDerivedType = false) {
    if (!partnerSecurityAlert || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, partnerSecurityAlert, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("activityLogs", partnerSecurityAlert.activityLogs, serializeActivityLog);
    writer.writeObjectValue("additionalDetails", partnerSecurityAlert.additionalDetails, serializeAdditionalDataDictionary);
    writer.writeCollectionOfObjectValues("affectedResources", partnerSecurityAlert.affectedResources, serializeAffectedResource);
    writer.writeStringValue("alertType", partnerSecurityAlert.alertType);
    writer.writeStringValue("catalogOfferId", partnerSecurityAlert.catalogOfferId);
    writer.writeEnumValue("confidenceLevel", partnerSecurityAlert.confidenceLevel);
    writer.writeStringValue("customerTenantId", partnerSecurityAlert.customerTenantId);
    writer.writeStringValue("description", partnerSecurityAlert.description);
    writer.writeDateValue("detectedDateTime", partnerSecurityAlert.detectedDateTime);
    writer.writeStringValue("displayName", partnerSecurityAlert.displayName);
    writer.writeDateValue("firstObservedDateTime", partnerSecurityAlert.firstObservedDateTime);
    writer.writeBooleanValue("isTest", partnerSecurityAlert.isTest);
    writer.writeDateValue("lastObservedDateTime", partnerSecurityAlert.lastObservedDateTime);
    writer.writeStringValue("resolvedBy", partnerSecurityAlert.resolvedBy);
    writer.writeDateValue("resolvedOnDateTime", partnerSecurityAlert.resolvedOnDateTime);
    writer.writeEnumValue("resolvedReason", partnerSecurityAlert.resolvedReason);
    writer.writeEnumValue("severity", partnerSecurityAlert.severity);
    writer.writeEnumValue("status", partnerSecurityAlert.status);
    writer.writeStringValue("subscriptionId", partnerSecurityAlert.subscriptionId);
    writer.writeStringValue("valueAddedResellerTenantId", partnerSecurityAlert.valueAddedResellerTenantId);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param PartnerSecurityAlertCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializePartnerSecurityAlertCollectionResponse(writer, partnerSecurityAlertCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!partnerSecurityAlertCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, partnerSecurityAlertCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", partnerSecurityAlertCollectionResponse.value, serializePartnerSecurityAlert);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param PartnerSecurityScore The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializePartnerSecurityScore(writer, partnerSecurityScore = {}, isSerializingDerivedType = false) {
    if (!partnerSecurityScore || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, partnerSecurityScore, isSerializingDerivedType);
    writer.writeNumberValue("currentScore", partnerSecurityScore.currentScore);
    writer.writeCollectionOfObjectValues("customerInsights", partnerSecurityScore.customerInsights, serializeCustomerInsight);
    writer.writeCollectionOfObjectValues("history", partnerSecurityScore.history, serializeSecurityScoreHistory);
    writer.writeDateValue("lastRefreshDateTime", partnerSecurityScore.lastRefreshDateTime);
    writer.writeNumberValue("maxScore", partnerSecurityScore.maxScore);
    writer.writeCollectionOfObjectValues("requirements", partnerSecurityScore.requirements, serializeSecurityRequirement);
    writer.writeDateValue("updatedDateTime", partnerSecurityScore.updatedDateTime);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param ResponseTimeSecurityRequirement The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeResponseTimeSecurityRequirement(writer, responseTimeSecurityRequirement = {}, isSerializingDerivedType = false) {
    if (!responseTimeSecurityRequirement || isSerializingDerivedType) {
        return;
    }
    serializeSecurityRequirement(writer, responseTimeSecurityRequirement, isSerializingDerivedType);
    writer.writeNumberValue("averageResponseTimeInHours", responseTimeSecurityRequirement.averageResponseTimeInHours);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param SecurityRequirement The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeSecurityRequirement(writer, securityRequirement = {}, isSerializingDerivedType = false) {
    if (!securityRequirement || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, securityRequirement, isSerializingDerivedType);
    writer.writeStringValue("actionUrl", securityRequirement.actionUrl);
    writer.writeEnumValue("complianceStatus", securityRequirement.complianceStatus);
    writer.writeStringValue("helpUrl", securityRequirement.helpUrl);
    writer.writeNumberValue("maxScore", securityRequirement.maxScore);
    writer.writeEnumValue("requirementType", securityRequirement.requirementType);
    writer.writeNumberValue("score", securityRequirement.score);
    writer.writeEnumValue("state", securityRequirement.state);
    writer.writeDateValue("updatedDateTime", securityRequirement.updatedDateTime);
    switch (securityRequirement.odataType) {
        case "#microsoft.graph.partner.security.adminsMfaEnforcedSecurityRequirement":
            serializeAdminsMfaEnforcedSecurityRequirement(writer, securityRequirement, true);
            break;
        case "#microsoft.graph.partner.security.customersMfaEnforcedSecurityRequirement":
            serializeCustomersMfaEnforcedSecurityRequirement(writer, securityRequirement, true);
            break;
        case "#microsoft.graph.partner.security.customersSpendingBudgetSecurityRequirement":
            serializeCustomersSpendingBudgetSecurityRequirement(writer, securityRequirement, true);
            break;
        case "#microsoft.graph.partner.security.responseTimeSecurityRequirement":
            serializeResponseTimeSecurityRequirement(writer, securityRequirement, true);
            break;
    }
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param SecurityRequirementCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeSecurityRequirementCollectionResponse(writer, securityRequirementCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!securityRequirementCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, securityRequirementCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", securityRequirementCollectionResponse.value, serializeSecurityRequirement);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param SecurityScoreHistory The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeSecurityScoreHistory(writer, securityScoreHistory = {}, isSerializingDerivedType = false) {
    if (!securityScoreHistory || isSerializingDerivedType) {
        return;
    }
    serializeEntity(writer, securityScoreHistory, isSerializingDerivedType);
    writer.writeNumberValue("compliantRequirementsCount", securityScoreHistory.compliantRequirementsCount);
    writer.writeDateValue("createdDateTime", securityScoreHistory.createdDateTime);
    writer.writeNumberValue("score", securityScoreHistory.score);
    writer.writeNumberValue("totalRequirementsCount", securityScoreHistory.totalRequirementsCount);
}
/**
 * Serializes information the current object
 * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
 * @param SecurityScoreHistoryCollectionResponse The instance to serialize from.
 * @param writer Serialization writer to use to serialize this model
 */
// @ts-ignore
export function serializeSecurityScoreHistoryCollectionResponse(writer, securityScoreHistoryCollectionResponse = {}, isSerializingDerivedType = false) {
    if (!securityScoreHistoryCollectionResponse || isSerializingDerivedType) {
        return;
    }
    serializeBaseCollectionPaginationCountResponse(writer, securityScoreHistoryCollectionResponse, isSerializingDerivedType);
    writer.writeCollectionOfObjectValues("value", securityScoreHistoryCollectionResponse.value, serializeSecurityScoreHistory);
}
export const ComplianceStatusObject = {
    Compliant: "compliant",
    Noncomplaint: "noncomplaint",
    UnknownFutureValue: "unknownFutureValue",
};
export const PolicyStatusObject = {
    Enabled: "enabled",
    Disabled: "disabled",
    UnknownFutureValue: "unknownFutureValue",
};
export const SecurityAlertConfidenceObject = {
    Low: "low",
    Medium: "medium",
    High: "high",
    UnknownFutureValue: "unknownFutureValue",
};
export const SecurityAlertResolvedReasonObject = {
    Legitimate: "legitimate",
    Ignore: "ignore",
    Fraud: "fraud",
    UnknownFutureValue: "unknownFutureValue",
};
export const SecurityAlertSeverityObject = {
    Informational: "informational",
    High: "high",
    Medium: "medium",
    Low: "low",
    UnknownFutureValue: "unknownFutureValue",
};
export const SecurityAlertStatusObject = {
    Active: "active",
    Resolved: "resolved",
    Investigating: "investigating",
    UnknownFutureValue: "unknownFutureValue",
};
export const SecurityRequirementStateObject = {
    Active: "active",
    Preview: "preview",
    UnknownFutureValue: "unknownFutureValue",
};
export const SecurityRequirementTypeObject = {
    MfaEnforcedForAdmins: "mfaEnforcedForAdmins",
    MfaEnforcedForAdminsOfCustomers: "mfaEnforcedForAdminsOfCustomers",
    SecurityAlertsPromptlyResolved: "securityAlertsPromptlyResolved",
    SecurityContactProvided: "securityContactProvided",
    SpendingBudgetSetForCustomerAzureSubscriptions: "spendingBudgetSetForCustomerAzureSubscriptions",
    UnknownFutureValue: "unknownFutureValue",
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map