package models

import (
    i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time"
    i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go"
    i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)

// Alert provides operations to manage the collection of agreement entities.
type Alert struct {
    Entity
    // Name or alias of the activity group (attacker) this alert is attributed to.
    activityGroupName *string
    // The alertDetections property
    alertDetections []AlertDetectionable
    // Name of the analyst the alert is assigned to for triage, investigation, or remediation (supports update).
    assignedTo *string
    // Azure subscription ID, present if this alert is related to an Azure resource.
    azureSubscriptionId *string
    // Azure Active Directory tenant ID. Required.
    azureTenantId *string
    // Category of the alert (for example, credentialTheft, ransomware, etc.).
    category *string
    // Time at which the alert was closed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z (supports update).
    closedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
    // Security-related stateful information generated by the provider about the cloud application/s related to this alert.
    cloudAppStates []CloudAppSecurityStateable
    // Customer-provided comments on alert (for customer alert management) (supports update).
    comments []string
    // Confidence of the detection logic (percentage between 1-100).
    confidence *int32
    // Time at which the alert was created by the alert provider. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required.
    createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
    // Alert description.
    description *string
    // Set of alerts related to this alert entity (each alert is pushed to the SIEM as a separate record).
    detectionIds []string
    // Time at which the event(s) that served as the trigger(s) to generate the alert occurred. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required.
    eventDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
    // Analyst feedback on the alert. Possible values are: unknown, truePositive, falsePositive, benignPositive. (supports update)
    feedback *AlertFeedback
    // Security-related stateful information generated by the provider about the file(s) related to this alert.
    fileStates []FileSecurityStateable
    // The historyStates property
    historyStates []AlertHistoryStateable
    // Security-related stateful information generated by the provider about the host(s) related to this alert.
    hostStates []HostSecurityStateable
    // IDs of incidents related to current alert.
    incidentIds []string
    // The investigationSecurityStates property
    investigationSecurityStates []InvestigationSecurityStateable
    // The lastEventDateTime property
    lastEventDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
    // Time at which the alert entity was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
    lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
    // Threat Intelligence pertaining to malware related to this alert.
    malwareStates []MalwareStateable
    // The messageSecurityStates property
    messageSecurityStates []MessageSecurityStateable
    // Security-related stateful information generated by the provider about the network connection(s) related to this alert.
    networkConnections []NetworkConnectionable
    // Security-related stateful information generated by the provider about the process or processes related to this alert.
    processes []Processable
    // Vendor/provider recommended action(s) to take as a result of the alert (for example, isolate machine, enforce2FA, reimage host).
    recommendedActions []string
    // Security-related stateful information generated by the provider about the registry keys related to this alert.
    registryKeyStates []RegistryKeyStateable
    // Resources related to current alert. For example, for some alerts this can have the Azure Resource value.
    securityResources []SecurityResourceable
    // The severity property
    severity *AlertSeverity
    // Hyperlinks (URIs) to the source material related to the alert, for example, provider's user interface for alerts or log search, etc.
    sourceMaterials []string
    // The status property
    status *AlertStatus
    // User-definable labels that can be applied to an alert and can serve as filter conditions (for example 'HVA', 'SAW', etc.) (supports update).
    tags []string
    // Alert title. Required.
    title *string
    // Security-related information about the specific properties that triggered the alert (properties appearing in the alert). Alerts might contain information about multiple users, hosts, files, ip addresses. This field indicates which properties triggered the alert generation.
    triggers []AlertTriggerable
    // The uriClickSecurityStates property
    uriClickSecurityStates []UriClickSecurityStateable
    // Security-related stateful information generated by the provider about the user accounts related to this alert.
    userStates []UserSecurityStateable
    // Complex type containing details about the security product/service vendor, provider, and subprovider (for example, vendor=Microsoft; provider=Windows Defender ATP; subProvider=AppLocker). Required.
    vendorInformation SecurityVendorInformationable
    // Threat intelligence pertaining to one or more vulnerabilities related to this alert.
    vulnerabilityStates []VulnerabilityStateable
}
// NewAlert instantiates a new alert and sets the default values.
func NewAlert()(*Alert) {
    m := &Alert{
        Entity: *NewEntity(),
    }
    return m
}
// CreateAlertFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateAlertFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
    return NewAlert(), nil
}
// GetActivityGroupName gets the activityGroupName property value. Name or alias of the activity group (attacker) this alert is attributed to.
func (m *Alert) GetActivityGroupName()(*string) {
    return m.activityGroupName
}
// GetAlertDetections gets the alertDetections property value. The alertDetections property
func (m *Alert) GetAlertDetections()([]AlertDetectionable) {
    return m.alertDetections
}
// GetAssignedTo gets the assignedTo property value. Name of the analyst the alert is assigned to for triage, investigation, or remediation (supports update).
func (m *Alert) GetAssignedTo()(*string) {
    return m.assignedTo
}
// GetAzureSubscriptionId gets the azureSubscriptionId property value. Azure subscription ID, present if this alert is related to an Azure resource.
func (m *Alert) GetAzureSubscriptionId()(*string) {
    return m.azureSubscriptionId
}
// GetAzureTenantId gets the azureTenantId property value. Azure Active Directory tenant ID. Required.
func (m *Alert) GetAzureTenantId()(*string) {
    return m.azureTenantId
}
// GetCategory gets the category property value. Category of the alert (for example, credentialTheft, ransomware, etc.).
func (m *Alert) GetCategory()(*string) {
    return m.category
}
// GetClosedDateTime gets the closedDateTime property value. Time at which the alert was closed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z (supports update).
func (m *Alert) GetClosedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
    return m.closedDateTime
}
// GetCloudAppStates gets the cloudAppStates property value. Security-related stateful information generated by the provider about the cloud application/s related to this alert.
func (m *Alert) GetCloudAppStates()([]CloudAppSecurityStateable) {
    return m.cloudAppStates
}
// GetComments gets the comments property value. Customer-provided comments on alert (for customer alert management) (supports update).
func (m *Alert) GetComments()([]string) {
    return m.comments
}
// GetConfidence gets the confidence property value. Confidence of the detection logic (percentage between 1-100).
func (m *Alert) GetConfidence()(*int32) {
    return m.confidence
}
// GetCreatedDateTime gets the createdDateTime property value. Time at which the alert was created by the alert provider. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required.
func (m *Alert) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
    return m.createdDateTime
}
// GetDescription gets the description property value. Alert description.
func (m *Alert) GetDescription()(*string) {
    return m.description
}
// GetDetectionIds gets the detectionIds property value. Set of alerts related to this alert entity (each alert is pushed to the SIEM as a separate record).
func (m *Alert) GetDetectionIds()([]string) {
    return m.detectionIds
}
// GetEventDateTime gets the eventDateTime property value. Time at which the event(s) that served as the trigger(s) to generate the alert occurred. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required.
func (m *Alert) GetEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
    return m.eventDateTime
}
// GetFeedback gets the feedback property value. Analyst feedback on the alert. Possible values are: unknown, truePositive, falsePositive, benignPositive. (supports update)
func (m *Alert) GetFeedback()(*AlertFeedback) {
    return m.feedback
}
// GetFieldDeserializers the deserialization information for the current model
func (m *Alert) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
    res := m.Entity.GetFieldDeserializers()
    res["activityGroupName"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetStringValue(m.SetActivityGroupName)
    res["alertDetections"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateAlertDetectionFromDiscriminatorValue , m.SetAlertDetections)
    res["assignedTo"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetStringValue(m.SetAssignedTo)
    res["azureSubscriptionId"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetStringValue(m.SetAzureSubscriptionId)
    res["azureTenantId"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetStringValue(m.SetAzureTenantId)
    res["category"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetStringValue(m.SetCategory)
    res["closedDateTime"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetTimeValue(m.SetClosedDateTime)
    res["cloudAppStates"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateCloudAppSecurityStateFromDiscriminatorValue , m.SetCloudAppStates)
    res["comments"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfPrimitiveValues("string" , m.SetComments)
    res["confidence"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetInt32Value(m.SetConfidence)
    res["createdDateTime"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetTimeValue(m.SetCreatedDateTime)
    res["description"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetStringValue(m.SetDescription)
    res["detectionIds"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfPrimitiveValues("string" , m.SetDetectionIds)
    res["eventDateTime"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetTimeValue(m.SetEventDateTime)
    res["feedback"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetEnumValue(ParseAlertFeedback , m.SetFeedback)
    res["fileStates"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateFileSecurityStateFromDiscriminatorValue , m.SetFileStates)
    res["historyStates"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateAlertHistoryStateFromDiscriminatorValue , m.SetHistoryStates)
    res["hostStates"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateHostSecurityStateFromDiscriminatorValue , m.SetHostStates)
    res["incidentIds"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfPrimitiveValues("string" , m.SetIncidentIds)
    res["investigationSecurityStates"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateInvestigationSecurityStateFromDiscriminatorValue , m.SetInvestigationSecurityStates)
    res["lastEventDateTime"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetTimeValue(m.SetLastEventDateTime)
    res["lastModifiedDateTime"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetTimeValue(m.SetLastModifiedDateTime)
    res["malwareStates"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateMalwareStateFromDiscriminatorValue , m.SetMalwareStates)
    res["messageSecurityStates"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateMessageSecurityStateFromDiscriminatorValue , m.SetMessageSecurityStates)
    res["networkConnections"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateNetworkConnectionFromDiscriminatorValue , m.SetNetworkConnections)
    res["processes"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateProcessFromDiscriminatorValue , m.SetProcesses)
    res["recommendedActions"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfPrimitiveValues("string" , m.SetRecommendedActions)
    res["registryKeyStates"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateRegistryKeyStateFromDiscriminatorValue , m.SetRegistryKeyStates)
    res["securityResources"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateSecurityResourceFromDiscriminatorValue , m.SetSecurityResources)
    res["severity"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetEnumValue(ParseAlertSeverity , m.SetSeverity)
    res["sourceMaterials"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfPrimitiveValues("string" , m.SetSourceMaterials)
    res["status"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetEnumValue(ParseAlertStatus , m.SetStatus)
    res["tags"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfPrimitiveValues("string" , m.SetTags)
    res["title"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetStringValue(m.SetTitle)
    res["triggers"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateAlertTriggerFromDiscriminatorValue , m.SetTriggers)
    res["uriClickSecurityStates"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateUriClickSecurityStateFromDiscriminatorValue , m.SetUriClickSecurityStates)
    res["userStates"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateUserSecurityStateFromDiscriminatorValue , m.SetUserStates)
    res["vendorInformation"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetObjectValue(CreateSecurityVendorInformationFromDiscriminatorValue , m.SetVendorInformation)
    res["vulnerabilityStates"] = i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.SetCollectionOfObjectValues(CreateVulnerabilityStateFromDiscriminatorValue , m.SetVulnerabilityStates)
    return res
}
// GetFileStates gets the fileStates property value. Security-related stateful information generated by the provider about the file(s) related to this alert.
func (m *Alert) GetFileStates()([]FileSecurityStateable) {
    return m.fileStates
}
// GetHistoryStates gets the historyStates property value. The historyStates property
func (m *Alert) GetHistoryStates()([]AlertHistoryStateable) {
    return m.historyStates
}
// GetHostStates gets the hostStates property value. Security-related stateful information generated by the provider about the host(s) related to this alert.
func (m *Alert) GetHostStates()([]HostSecurityStateable) {
    return m.hostStates
}
// GetIncidentIds gets the incidentIds property value. IDs of incidents related to current alert.
func (m *Alert) GetIncidentIds()([]string) {
    return m.incidentIds
}
// GetInvestigationSecurityStates gets the investigationSecurityStates property value. The investigationSecurityStates property
func (m *Alert) GetInvestigationSecurityStates()([]InvestigationSecurityStateable) {
    return m.investigationSecurityStates
}
// GetLastEventDateTime gets the lastEventDateTime property value. The lastEventDateTime property
func (m *Alert) GetLastEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
    return m.lastEventDateTime
}
// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Time at which the alert entity was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
func (m *Alert) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
    return m.lastModifiedDateTime
}
// GetMalwareStates gets the malwareStates property value. Threat Intelligence pertaining to malware related to this alert.
func (m *Alert) GetMalwareStates()([]MalwareStateable) {
    return m.malwareStates
}
// GetMessageSecurityStates gets the messageSecurityStates property value. The messageSecurityStates property
func (m *Alert) GetMessageSecurityStates()([]MessageSecurityStateable) {
    return m.messageSecurityStates
}
// GetNetworkConnections gets the networkConnections property value. Security-related stateful information generated by the provider about the network connection(s) related to this alert.
func (m *Alert) GetNetworkConnections()([]NetworkConnectionable) {
    return m.networkConnections
}
// GetProcesses gets the processes property value. Security-related stateful information generated by the provider about the process or processes related to this alert.
func (m *Alert) GetProcesses()([]Processable) {
    return m.processes
}
// GetRecommendedActions gets the recommendedActions property value. Vendor/provider recommended action(s) to take as a result of the alert (for example, isolate machine, enforce2FA, reimage host).
func (m *Alert) GetRecommendedActions()([]string) {
    return m.recommendedActions
}
// GetRegistryKeyStates gets the registryKeyStates property value. Security-related stateful information generated by the provider about the registry keys related to this alert.
func (m *Alert) GetRegistryKeyStates()([]RegistryKeyStateable) {
    return m.registryKeyStates
}
// GetSecurityResources gets the securityResources property value. Resources related to current alert. For example, for some alerts this can have the Azure Resource value.
func (m *Alert) GetSecurityResources()([]SecurityResourceable) {
    return m.securityResources
}
// GetSeverity gets the severity property value. The severity property
func (m *Alert) GetSeverity()(*AlertSeverity) {
    return m.severity
}
// GetSourceMaterials gets the sourceMaterials property value. Hyperlinks (URIs) to the source material related to the alert, for example, provider's user interface for alerts or log search, etc.
func (m *Alert) GetSourceMaterials()([]string) {
    return m.sourceMaterials
}
// GetStatus gets the status property value. The status property
func (m *Alert) GetStatus()(*AlertStatus) {
    return m.status
}
// GetTags gets the tags property value. User-definable labels that can be applied to an alert and can serve as filter conditions (for example 'HVA', 'SAW', etc.) (supports update).
func (m *Alert) GetTags()([]string) {
    return m.tags
}
// GetTitle gets the title property value. Alert title. Required.
func (m *Alert) GetTitle()(*string) {
    return m.title
}
// GetTriggers gets the triggers property value. Security-related information about the specific properties that triggered the alert (properties appearing in the alert). Alerts might contain information about multiple users, hosts, files, ip addresses. This field indicates which properties triggered the alert generation.
func (m *Alert) GetTriggers()([]AlertTriggerable) {
    return m.triggers
}
// GetUriClickSecurityStates gets the uriClickSecurityStates property value. The uriClickSecurityStates property
func (m *Alert) GetUriClickSecurityStates()([]UriClickSecurityStateable) {
    return m.uriClickSecurityStates
}
// GetUserStates gets the userStates property value. Security-related stateful information generated by the provider about the user accounts related to this alert.
func (m *Alert) GetUserStates()([]UserSecurityStateable) {
    return m.userStates
}
// GetVendorInformation gets the vendorInformation property value. Complex type containing details about the security product/service vendor, provider, and subprovider (for example, vendor=Microsoft; provider=Windows Defender ATP; subProvider=AppLocker). Required.
func (m *Alert) GetVendorInformation()(SecurityVendorInformationable) {
    return m.vendorInformation
}
// GetVulnerabilityStates gets the vulnerabilityStates property value. Threat intelligence pertaining to one or more vulnerabilities related to this alert.
func (m *Alert) GetVulnerabilityStates()([]VulnerabilityStateable) {
    return m.vulnerabilityStates
}
// Serialize serializes information the current object
func (m *Alert) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
    err := m.Entity.Serialize(writer)
    if err != nil {
        return err
    }
    {
        err = writer.WriteStringValue("activityGroupName", m.GetActivityGroupName())
        if err != nil {
            return err
        }
    }
    if m.GetAlertDetections() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetAlertDetections())
        err = writer.WriteCollectionOfObjectValues("alertDetections", cast)
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteStringValue("assignedTo", m.GetAssignedTo())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteStringValue("azureSubscriptionId", m.GetAzureSubscriptionId())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteStringValue("azureTenantId", m.GetAzureTenantId())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteStringValue("category", m.GetCategory())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteTimeValue("closedDateTime", m.GetClosedDateTime())
        if err != nil {
            return err
        }
    }
    if m.GetCloudAppStates() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetCloudAppStates())
        err = writer.WriteCollectionOfObjectValues("cloudAppStates", cast)
        if err != nil {
            return err
        }
    }
    if m.GetComments() != nil {
        err = writer.WriteCollectionOfStringValues("comments", m.GetComments())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteInt32Value("confidence", m.GetConfidence())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteStringValue("description", m.GetDescription())
        if err != nil {
            return err
        }
    }
    if m.GetDetectionIds() != nil {
        err = writer.WriteCollectionOfStringValues("detectionIds", m.GetDetectionIds())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteTimeValue("eventDateTime", m.GetEventDateTime())
        if err != nil {
            return err
        }
    }
    if m.GetFeedback() != nil {
        cast := (*m.GetFeedback()).String()
        err = writer.WriteStringValue("feedback", &cast)
        if err != nil {
            return err
        }
    }
    if m.GetFileStates() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetFileStates())
        err = writer.WriteCollectionOfObjectValues("fileStates", cast)
        if err != nil {
            return err
        }
    }
    if m.GetHistoryStates() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetHistoryStates())
        err = writer.WriteCollectionOfObjectValues("historyStates", cast)
        if err != nil {
            return err
        }
    }
    if m.GetHostStates() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetHostStates())
        err = writer.WriteCollectionOfObjectValues("hostStates", cast)
        if err != nil {
            return err
        }
    }
    if m.GetIncidentIds() != nil {
        err = writer.WriteCollectionOfStringValues("incidentIds", m.GetIncidentIds())
        if err != nil {
            return err
        }
    }
    if m.GetInvestigationSecurityStates() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetInvestigationSecurityStates())
        err = writer.WriteCollectionOfObjectValues("investigationSecurityStates", cast)
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteTimeValue("lastEventDateTime", m.GetLastEventDateTime())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime())
        if err != nil {
            return err
        }
    }
    if m.GetMalwareStates() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetMalwareStates())
        err = writer.WriteCollectionOfObjectValues("malwareStates", cast)
        if err != nil {
            return err
        }
    }
    if m.GetMessageSecurityStates() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetMessageSecurityStates())
        err = writer.WriteCollectionOfObjectValues("messageSecurityStates", cast)
        if err != nil {
            return err
        }
    }
    if m.GetNetworkConnections() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetNetworkConnections())
        err = writer.WriteCollectionOfObjectValues("networkConnections", cast)
        if err != nil {
            return err
        }
    }
    if m.GetProcesses() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetProcesses())
        err = writer.WriteCollectionOfObjectValues("processes", cast)
        if err != nil {
            return err
        }
    }
    if m.GetRecommendedActions() != nil {
        err = writer.WriteCollectionOfStringValues("recommendedActions", m.GetRecommendedActions())
        if err != nil {
            return err
        }
    }
    if m.GetRegistryKeyStates() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetRegistryKeyStates())
        err = writer.WriteCollectionOfObjectValues("registryKeyStates", cast)
        if err != nil {
            return err
        }
    }
    if m.GetSecurityResources() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetSecurityResources())
        err = writer.WriteCollectionOfObjectValues("securityResources", cast)
        if err != nil {
            return err
        }
    }
    if m.GetSeverity() != nil {
        cast := (*m.GetSeverity()).String()
        err = writer.WriteStringValue("severity", &cast)
        if err != nil {
            return err
        }
    }
    if m.GetSourceMaterials() != nil {
        err = writer.WriteCollectionOfStringValues("sourceMaterials", m.GetSourceMaterials())
        if err != nil {
            return err
        }
    }
    if m.GetStatus() != nil {
        cast := (*m.GetStatus()).String()
        err = writer.WriteStringValue("status", &cast)
        if err != nil {
            return err
        }
    }
    if m.GetTags() != nil {
        err = writer.WriteCollectionOfStringValues("tags", m.GetTags())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteStringValue("title", m.GetTitle())
        if err != nil {
            return err
        }
    }
    if m.GetTriggers() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetTriggers())
        err = writer.WriteCollectionOfObjectValues("triggers", cast)
        if err != nil {
            return err
        }
    }
    if m.GetUriClickSecurityStates() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetUriClickSecurityStates())
        err = writer.WriteCollectionOfObjectValues("uriClickSecurityStates", cast)
        if err != nil {
            return err
        }
    }
    if m.GetUserStates() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetUserStates())
        err = writer.WriteCollectionOfObjectValues("userStates", cast)
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteObjectValue("vendorInformation", m.GetVendorInformation())
        if err != nil {
            return err
        }
    }
    if m.GetVulnerabilityStates() != nil {
        cast := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.CollectionCast[i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable](m.GetVulnerabilityStates())
        err = writer.WriteCollectionOfObjectValues("vulnerabilityStates", cast)
        if err != nil {
            return err
        }
    }
    return nil
}
// SetActivityGroupName sets the activityGroupName property value. Name or alias of the activity group (attacker) this alert is attributed to.
func (m *Alert) SetActivityGroupName(value *string)() {
    m.activityGroupName = value
}
// SetAlertDetections sets the alertDetections property value. The alertDetections property
func (m *Alert) SetAlertDetections(value []AlertDetectionable)() {
    m.alertDetections = value
}
// SetAssignedTo sets the assignedTo property value. Name of the analyst the alert is assigned to for triage, investigation, or remediation (supports update).
func (m *Alert) SetAssignedTo(value *string)() {
    m.assignedTo = value
}
// SetAzureSubscriptionId sets the azureSubscriptionId property value. Azure subscription ID, present if this alert is related to an Azure resource.
func (m *Alert) SetAzureSubscriptionId(value *string)() {
    m.azureSubscriptionId = value
}
// SetAzureTenantId sets the azureTenantId property value. Azure Active Directory tenant ID. Required.
func (m *Alert) SetAzureTenantId(value *string)() {
    m.azureTenantId = value
}
// SetCategory sets the category property value. Category of the alert (for example, credentialTheft, ransomware, etc.).
func (m *Alert) SetCategory(value *string)() {
    m.category = value
}
// SetClosedDateTime sets the closedDateTime property value. Time at which the alert was closed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z (supports update).
func (m *Alert) SetClosedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
    m.closedDateTime = value
}
// SetCloudAppStates sets the cloudAppStates property value. Security-related stateful information generated by the provider about the cloud application/s related to this alert.
func (m *Alert) SetCloudAppStates(value []CloudAppSecurityStateable)() {
    m.cloudAppStates = value
}
// SetComments sets the comments property value. Customer-provided comments on alert (for customer alert management) (supports update).
func (m *Alert) SetComments(value []string)() {
    m.comments = value
}
// SetConfidence sets the confidence property value. Confidence of the detection logic (percentage between 1-100).
func (m *Alert) SetConfidence(value *int32)() {
    m.confidence = value
}
// SetCreatedDateTime sets the createdDateTime property value. Time at which the alert was created by the alert provider. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required.
func (m *Alert) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
    m.createdDateTime = value
}
// SetDescription sets the description property value. Alert description.
func (m *Alert) SetDescription(value *string)() {
    m.description = value
}
// SetDetectionIds sets the detectionIds property value. Set of alerts related to this alert entity (each alert is pushed to the SIEM as a separate record).
func (m *Alert) SetDetectionIds(value []string)() {
    m.detectionIds = value
}
// SetEventDateTime sets the eventDateTime property value. Time at which the event(s) that served as the trigger(s) to generate the alert occurred. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required.
func (m *Alert) SetEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
    m.eventDateTime = value
}
// SetFeedback sets the feedback property value. Analyst feedback on the alert. Possible values are: unknown, truePositive, falsePositive, benignPositive. (supports update)
func (m *Alert) SetFeedback(value *AlertFeedback)() {
    m.feedback = value
}
// SetFileStates sets the fileStates property value. Security-related stateful information generated by the provider about the file(s) related to this alert.
func (m *Alert) SetFileStates(value []FileSecurityStateable)() {
    m.fileStates = value
}
// SetHistoryStates sets the historyStates property value. The historyStates property
func (m *Alert) SetHistoryStates(value []AlertHistoryStateable)() {
    m.historyStates = value
}
// SetHostStates sets the hostStates property value. Security-related stateful information generated by the provider about the host(s) related to this alert.
func (m *Alert) SetHostStates(value []HostSecurityStateable)() {
    m.hostStates = value
}
// SetIncidentIds sets the incidentIds property value. IDs of incidents related to current alert.
func (m *Alert) SetIncidentIds(value []string)() {
    m.incidentIds = value
}
// SetInvestigationSecurityStates sets the investigationSecurityStates property value. The investigationSecurityStates property
func (m *Alert) SetInvestigationSecurityStates(value []InvestigationSecurityStateable)() {
    m.investigationSecurityStates = value
}
// SetLastEventDateTime sets the lastEventDateTime property value. The lastEventDateTime property
func (m *Alert) SetLastEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
    m.lastEventDateTime = value
}
// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Time at which the alert entity was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
func (m *Alert) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
    m.lastModifiedDateTime = value
}
// SetMalwareStates sets the malwareStates property value. Threat Intelligence pertaining to malware related to this alert.
func (m *Alert) SetMalwareStates(value []MalwareStateable)() {
    m.malwareStates = value
}
// SetMessageSecurityStates sets the messageSecurityStates property value. The messageSecurityStates property
func (m *Alert) SetMessageSecurityStates(value []MessageSecurityStateable)() {
    m.messageSecurityStates = value
}
// SetNetworkConnections sets the networkConnections property value. Security-related stateful information generated by the provider about the network connection(s) related to this alert.
func (m *Alert) SetNetworkConnections(value []NetworkConnectionable)() {
    m.networkConnections = value
}
// SetProcesses sets the processes property value. Security-related stateful information generated by the provider about the process or processes related to this alert.
func (m *Alert) SetProcesses(value []Processable)() {
    m.processes = value
}
// SetRecommendedActions sets the recommendedActions property value. Vendor/provider recommended action(s) to take as a result of the alert (for example, isolate machine, enforce2FA, reimage host).
func (m *Alert) SetRecommendedActions(value []string)() {
    m.recommendedActions = value
}
// SetRegistryKeyStates sets the registryKeyStates property value. Security-related stateful information generated by the provider about the registry keys related to this alert.
func (m *Alert) SetRegistryKeyStates(value []RegistryKeyStateable)() {
    m.registryKeyStates = value
}
// SetSecurityResources sets the securityResources property value. Resources related to current alert. For example, for some alerts this can have the Azure Resource value.
func (m *Alert) SetSecurityResources(value []SecurityResourceable)() {
    m.securityResources = value
}
// SetSeverity sets the severity property value. The severity property
func (m *Alert) SetSeverity(value *AlertSeverity)() {
    m.severity = value
}
// SetSourceMaterials sets the sourceMaterials property value. Hyperlinks (URIs) to the source material related to the alert, for example, provider's user interface for alerts or log search, etc.
func (m *Alert) SetSourceMaterials(value []string)() {
    m.sourceMaterials = value
}
// SetStatus sets the status property value. The status property
func (m *Alert) SetStatus(value *AlertStatus)() {
    m.status = value
}
// SetTags sets the tags property value. User-definable labels that can be applied to an alert and can serve as filter conditions (for example 'HVA', 'SAW', etc.) (supports update).
func (m *Alert) SetTags(value []string)() {
    m.tags = value
}
// SetTitle sets the title property value. Alert title. Required.
func (m *Alert) SetTitle(value *string)() {
    m.title = value
}
// SetTriggers sets the triggers property value. Security-related information about the specific properties that triggered the alert (properties appearing in the alert). Alerts might contain information about multiple users, hosts, files, ip addresses. This field indicates which properties triggered the alert generation.
func (m *Alert) SetTriggers(value []AlertTriggerable)() {
    m.triggers = value
}
// SetUriClickSecurityStates sets the uriClickSecurityStates property value. The uriClickSecurityStates property
func (m *Alert) SetUriClickSecurityStates(value []UriClickSecurityStateable)() {
    m.uriClickSecurityStates = value
}
// SetUserStates sets the userStates property value. Security-related stateful information generated by the provider about the user accounts related to this alert.
func (m *Alert) SetUserStates(value []UserSecurityStateable)() {
    m.userStates = value
}
// SetVendorInformation sets the vendorInformation property value. Complex type containing details about the security product/service vendor, provider, and subprovider (for example, vendor=Microsoft; provider=Windows Defender ATP; subProvider=AppLocker). Required.
func (m *Alert) SetVendorInformation(value SecurityVendorInformationable)() {
    m.vendorInformation = value
}
// SetVulnerabilityStates sets the vulnerabilityStates property value. Threat intelligence pertaining to one or more vulnerabilities related to this alert.
func (m *Alert) SetVulnerabilityStates(value []VulnerabilityStateable)() {
    m.vulnerabilityStates = value
}
