// Code generated by Microsoft Kiota - DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

package security

import (
    i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid"
    i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)

type SecurityGroupEvidence struct {
    AlertEvidence
}
// NewSecurityGroupEvidence instantiates a new SecurityGroupEvidence and sets the default values.
func NewSecurityGroupEvidence()(*SecurityGroupEvidence) {
    m := &SecurityGroupEvidence{
        AlertEvidence: *NewAlertEvidence(),
    }
    odataTypeValue := "#microsoft.graph.security.securityGroupEvidence"
    m.SetOdataType(&odataTypeValue)
    return m
}
// CreateSecurityGroupEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateSecurityGroupEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
    return NewSecurityGroupEvidence(), nil
}
// GetActiveDirectoryObjectGuid gets the activeDirectoryObjectGuid property value. The unique group identifier assigned by the on-premises Active Directory.
// returns a *UUID when successful
func (m *SecurityGroupEvidence) GetActiveDirectoryObjectGuid()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) {
    val, err := m.GetBackingStore().Get("activeDirectoryObjectGuid")
    if err != nil {
        panic(err)
    }
    if val != nil {
        return val.(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)
    }
    return nil
}
// GetDisplayName gets the displayName property value. The name of the security group.
// returns a *string when successful
func (m *SecurityGroupEvidence) GetDisplayName()(*string) {
    val, err := m.GetBackingStore().Get("displayName")
    if err != nil {
        panic(err)
    }
    if val != nil {
        return val.(*string)
    }
    return nil
}
// GetDistinguishedName gets the distinguishedName property value. The distinguished name of the security group.
// returns a *string when successful
func (m *SecurityGroupEvidence) GetDistinguishedName()(*string) {
    val, err := m.GetBackingStore().Get("distinguishedName")
    if err != nil {
        panic(err)
    }
    if val != nil {
        return val.(*string)
    }
    return nil
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *SecurityGroupEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
    res := m.AlertEvidence.GetFieldDeserializers()
    res["activeDirectoryObjectGuid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
        val, err := n.GetUUIDValue()
        if err != nil {
            return err
        }
        if val != nil {
            m.SetActiveDirectoryObjectGuid(val)
        }
        return nil
    }
    res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
        val, err := n.GetStringValue()
        if err != nil {
            return err
        }
        if val != nil {
            m.SetDisplayName(val)
        }
        return nil
    }
    res["distinguishedName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
        val, err := n.GetStringValue()
        if err != nil {
            return err
        }
        if val != nil {
            m.SetDistinguishedName(val)
        }
        return nil
    }
    res["friendlyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
        val, err := n.GetStringValue()
        if err != nil {
            return err
        }
        if val != nil {
            m.SetFriendlyName(val)
        }
        return nil
    }
    res["securityGroupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
        val, err := n.GetStringValue()
        if err != nil {
            return err
        }
        if val != nil {
            m.SetSecurityGroupId(val)
        }
        return nil
    }
    res["sid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
        val, err := n.GetStringValue()
        if err != nil {
            return err
        }
        if val != nil {
            m.SetSid(val)
        }
        return nil
    }
    return res
}
// GetFriendlyName gets the friendlyName property value. The friendly name of the security group.
// returns a *string when successful
func (m *SecurityGroupEvidence) GetFriendlyName()(*string) {
    val, err := m.GetBackingStore().Get("friendlyName")
    if err != nil {
        panic(err)
    }
    if val != nil {
        return val.(*string)
    }
    return nil
}
// GetSecurityGroupId gets the securityGroupId property value. Unique identifier of the security group.
// returns a *string when successful
func (m *SecurityGroupEvidence) GetSecurityGroupId()(*string) {
    val, err := m.GetBackingStore().Get("securityGroupId")
    if err != nil {
        panic(err)
    }
    if val != nil {
        return val.(*string)
    }
    return nil
}
// GetSid gets the sid property value. The security identifier of the group.
// returns a *string when successful
func (m *SecurityGroupEvidence) GetSid()(*string) {
    val, err := m.GetBackingStore().Get("sid")
    if err != nil {
        panic(err)
    }
    if val != nil {
        return val.(*string)
    }
    return nil
}
// Serialize serializes information the current object
func (m *SecurityGroupEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
    err := m.AlertEvidence.Serialize(writer)
    if err != nil {
        return err
    }
    {
        err = writer.WriteUUIDValue("activeDirectoryObjectGuid", m.GetActiveDirectoryObjectGuid())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteStringValue("displayName", m.GetDisplayName())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteStringValue("distinguishedName", m.GetDistinguishedName())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteStringValue("friendlyName", m.GetFriendlyName())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteStringValue("securityGroupId", m.GetSecurityGroupId())
        if err != nil {
            return err
        }
    }
    {
        err = writer.WriteStringValue("sid", m.GetSid())
        if err != nil {
            return err
        }
    }
    return nil
}
// SetActiveDirectoryObjectGuid sets the activeDirectoryObjectGuid property value. The unique group identifier assigned by the on-premises Active Directory.
func (m *SecurityGroupEvidence) SetActiveDirectoryObjectGuid(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() {
    err := m.GetBackingStore().Set("activeDirectoryObjectGuid", value)
    if err != nil {
        panic(err)
    }
}
// SetDisplayName sets the displayName property value. The name of the security group.
func (m *SecurityGroupEvidence) SetDisplayName(value *string)() {
    err := m.GetBackingStore().Set("displayName", value)
    if err != nil {
        panic(err)
    }
}
// SetDistinguishedName sets the distinguishedName property value. The distinguished name of the security group.
func (m *SecurityGroupEvidence) SetDistinguishedName(value *string)() {
    err := m.GetBackingStore().Set("distinguishedName", value)
    if err != nil {
        panic(err)
    }
}
// SetFriendlyName sets the friendlyName property value. The friendly name of the security group.
func (m *SecurityGroupEvidence) SetFriendlyName(value *string)() {
    err := m.GetBackingStore().Set("friendlyName", value)
    if err != nil {
        panic(err)
    }
}
// SetSecurityGroupId sets the securityGroupId property value. Unique identifier of the security group.
func (m *SecurityGroupEvidence) SetSecurityGroupId(value *string)() {
    err := m.GetBackingStore().Set("securityGroupId", value)
    if err != nil {
        panic(err)
    }
}
// SetSid sets the sid property value. The security identifier of the group.
func (m *SecurityGroupEvidence) SetSid(value *string)() {
    err := m.GetBackingStore().Set("sid", value)
    if err != nil {
        panic(err)
    }
}
type SecurityGroupEvidenceable interface {
    AlertEvidenceable
    i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
    GetActiveDirectoryObjectGuid()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)
    GetDisplayName()(*string)
    GetDistinguishedName()(*string)
    GetFriendlyName()(*string)
    GetSecurityGroupId()(*string)
    GetSid()(*string)
    SetActiveDirectoryObjectGuid(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)()
    SetDisplayName(value *string)()
    SetDistinguishedName(value *string)()
    SetFriendlyName(value *string)()
    SetSecurityGroupId(value *string)()
    SetSid(value *string)()
}
