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

package identity

import (
    i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
    iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models"
    ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store"
)

type ConditionalAccessEvaluatePostRequestBody struct {
    // Stores model information.
    backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore
}
// NewConditionalAccessEvaluatePostRequestBody instantiates a new ConditionalAccessEvaluatePostRequestBody and sets the default values.
func NewConditionalAccessEvaluatePostRequestBody()(*ConditionalAccessEvaluatePostRequestBody) {
    m := &ConditionalAccessEvaluatePostRequestBody{
    }
    m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance();
    m.SetAdditionalData(make(map[string]any))
    return m
}
// CreateConditionalAccessEvaluatePostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateConditionalAccessEvaluatePostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
    return NewConditionalAccessEvaluatePostRequestBody(), nil
}
// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
// returns a map[string]any when successful
func (m *ConditionalAccessEvaluatePostRequestBody) GetAdditionalData()(map[string]any) {
    val , err :=  m.backingStore.Get("additionalData")
    if err != nil {
        panic(err)
    }
    if val == nil {
        var value = make(map[string]any);
        m.SetAdditionalData(value);
    }
    return val.(map[string]any)
}
// GetAppliedPoliciesOnly gets the appliedPoliciesOnly property value. The appliedPoliciesOnly property
// returns a *bool when successful
func (m *ConditionalAccessEvaluatePostRequestBody) GetAppliedPoliciesOnly()(*bool) {
    val, err := m.GetBackingStore().Get("appliedPoliciesOnly")
    if err != nil {
        panic(err)
    }
    if val != nil {
        return val.(*bool)
    }
    return nil
}
// GetBackingStore gets the BackingStore property value. Stores model information.
// returns a BackingStore when successful
func (m *ConditionalAccessEvaluatePostRequestBody) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) {
    return m.backingStore
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *ConditionalAccessEvaluatePostRequestBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
    res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
    res["appliedPoliciesOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
        val, err := n.GetBoolValue()
        if err != nil {
            return err
        }
        if val != nil {
            m.SetAppliedPoliciesOnly(val)
        }
        return nil
    }
    res["signInConditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
        val, err := n.GetObjectValue(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateSignInConditionsFromDiscriminatorValue)
        if err != nil {
            return err
        }
        if val != nil {
            m.SetSignInConditions(val.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInConditionsable))
        }
        return nil
    }
    res["signInContext"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
        val, err := n.GetObjectValue(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateSignInContextFromDiscriminatorValue)
        if err != nil {
            return err
        }
        if val != nil {
            m.SetSignInContext(val.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInContextable))
        }
        return nil
    }
    res["signInIdentity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
        val, err := n.GetObjectValue(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateSignInIdentityFromDiscriminatorValue)
        if err != nil {
            return err
        }
        if val != nil {
            m.SetSignInIdentity(val.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInIdentityable))
        }
        return nil
    }
    return res
}
// GetSignInConditions gets the signInConditions property value. The signInConditions property
// returns a SignInConditionsable when successful
func (m *ConditionalAccessEvaluatePostRequestBody) GetSignInConditions()(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInConditionsable) {
    val, err := m.GetBackingStore().Get("signInConditions")
    if err != nil {
        panic(err)
    }
    if val != nil {
        return val.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInConditionsable)
    }
    return nil
}
// GetSignInContext gets the signInContext property value. The signInContext property
// returns a SignInContextable when successful
func (m *ConditionalAccessEvaluatePostRequestBody) GetSignInContext()(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInContextable) {
    val, err := m.GetBackingStore().Get("signInContext")
    if err != nil {
        panic(err)
    }
    if val != nil {
        return val.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInContextable)
    }
    return nil
}
// GetSignInIdentity gets the signInIdentity property value. The signInIdentity property
// returns a SignInIdentityable when successful
func (m *ConditionalAccessEvaluatePostRequestBody) GetSignInIdentity()(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInIdentityable) {
    val, err := m.GetBackingStore().Get("signInIdentity")
    if err != nil {
        panic(err)
    }
    if val != nil {
        return val.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInIdentityable)
    }
    return nil
}
// Serialize serializes information the current object
func (m *ConditionalAccessEvaluatePostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
    {
        err := writer.WriteBoolValue("appliedPoliciesOnly", m.GetAppliedPoliciesOnly())
        if err != nil {
            return err
        }
    }
    {
        err := writer.WriteObjectValue("signInConditions", m.GetSignInConditions())
        if err != nil {
            return err
        }
    }
    {
        err := writer.WriteObjectValue("signInContext", m.GetSignInContext())
        if err != nil {
            return err
        }
    }
    {
        err := writer.WriteObjectValue("signInIdentity", m.GetSignInIdentity())
        if err != nil {
            return err
        }
    }
    {
        err := writer.WriteAdditionalData(m.GetAdditionalData())
        if err != nil {
            return err
        }
    }
    return nil
}
// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *ConditionalAccessEvaluatePostRequestBody) SetAdditionalData(value map[string]any)() {
    err := m.GetBackingStore().Set("additionalData", value)
    if err != nil {
        panic(err)
    }
}
// SetAppliedPoliciesOnly sets the appliedPoliciesOnly property value. The appliedPoliciesOnly property
func (m *ConditionalAccessEvaluatePostRequestBody) SetAppliedPoliciesOnly(value *bool)() {
    err := m.GetBackingStore().Set("appliedPoliciesOnly", value)
    if err != nil {
        panic(err)
    }
}
// SetBackingStore sets the BackingStore property value. Stores model information.
func (m *ConditionalAccessEvaluatePostRequestBody) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() {
    m.backingStore = value
}
// SetSignInConditions sets the signInConditions property value. The signInConditions property
func (m *ConditionalAccessEvaluatePostRequestBody) SetSignInConditions(value iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInConditionsable)() {
    err := m.GetBackingStore().Set("signInConditions", value)
    if err != nil {
        panic(err)
    }
}
// SetSignInContext sets the signInContext property value. The signInContext property
func (m *ConditionalAccessEvaluatePostRequestBody) SetSignInContext(value iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInContextable)() {
    err := m.GetBackingStore().Set("signInContext", value)
    if err != nil {
        panic(err)
    }
}
// SetSignInIdentity sets the signInIdentity property value. The signInIdentity property
func (m *ConditionalAccessEvaluatePostRequestBody) SetSignInIdentity(value iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInIdentityable)() {
    err := m.GetBackingStore().Set("signInIdentity", value)
    if err != nil {
        panic(err)
    }
}
type ConditionalAccessEvaluatePostRequestBodyable interface {
    i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
    ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel
    i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
    GetAppliedPoliciesOnly()(*bool)
    GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)
    GetSignInConditions()(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInConditionsable)
    GetSignInContext()(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInContextable)
    GetSignInIdentity()(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInIdentityable)
    SetAppliedPoliciesOnly(value *bool)()
    SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)()
    SetSignInConditions(value iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInConditionsable)()
    SetSignInContext(value iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInContextable)()
    SetSignInIdentity(value iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.SignInIdentityable)()
}
