/
githubmirror
/
origin
Обзор
Документация
Войти
/
githubmirror
/
origin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
vendor/github.com/microsoftgraph/msgraph-sdk-go/models/simulation_automation.go
426 строк
16 KB
Justin Pierce
Add compat_otp package with openshift-tests-private (OTP) util implementations
11 авг 2025, 18:00
11 авг 2025, 18:00
80ac5c1
Код
Авторство
О чём код?
// Code generated by Microsoft Kiota - DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. package models import ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) type SimulationAutomation struct { Entity } // NewSimulationAutomation instantiates a new SimulationAutomation and sets the default values. func NewSimulationAutomation()(*SimulationAutomation) { m := &SimulationAutomation{ Entity: *NewEntity(), } return m } // CreateSimulationAutomationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful func CreateSimulationAutomationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewSimulationAutomation(), nil } // GetCreatedBy gets the createdBy property value. Identity of the user who created the attack simulation automation. // returns a EmailIdentityable when successful func (m *SimulationAutomation) GetCreatedBy()(EmailIdentityable) { val, err := m.GetBackingStore().Get("createdBy") if err != nil { panic(err) } if val != nil { return val.(EmailIdentityable) } return nil } // GetCreatedDateTime gets the createdDateTime property value. Date and time when the attack simulation automation was created. // returns a *Time when successful func (m *SimulationAutomation) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("createdDateTime") if err != nil { panic(err) } if val != nil { return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) } return nil } // GetDescription gets the description property value. Description of the attack simulation automation. // returns a *string when successful func (m *SimulationAutomation) GetDescription()(*string) { val, err := m.GetBackingStore().Get("description") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetDisplayName gets the displayName property value. Display name of the attack simulation automation. Supports $filter and $orderby. // returns a *string when successful func (m *SimulationAutomation) GetDisplayName()(*string) { val, err := m.GetBackingStore().Get("displayName") 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 *SimulationAutomation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.Entity.GetFieldDeserializers() res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateEmailIdentityFromDiscriminatorValue) if err != nil { return err } if val != nil { m.SetCreatedBy(val.(EmailIdentityable)) } return nil } res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { return err } if val != nil { m.SetCreatedDateTime(val) } return nil } res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetDescription(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["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateEmailIdentityFromDiscriminatorValue) if err != nil { return err } if val != nil { m.SetLastModifiedBy(val.(EmailIdentityable)) } return nil } res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { return err } if val != nil { m.SetLastModifiedDateTime(val) } return nil } res["lastRunDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { return err } if val != nil { m.SetLastRunDateTime(val) } return nil } res["nextRunDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { return err } if val != nil { m.SetNextRunDateTime(val) } return nil } res["runs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreateSimulationAutomationRunFromDiscriminatorValue) if err != nil { return err } if val != nil { res := make([]SimulationAutomationRunable, len(val)) for i, v := range val { if v != nil { res[i] = v.(SimulationAutomationRunable) } } m.SetRuns(res) } return nil } res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseSimulationAutomationStatus) if err != nil { return err } if val != nil { m.SetStatus(val.(*SimulationAutomationStatus)) } return nil } return res } // GetLastModifiedBy gets the lastModifiedBy property value. Identity of the user who most recently modified the attack simulation automation. // returns a EmailIdentityable when successful func (m *SimulationAutomation) GetLastModifiedBy()(EmailIdentityable) { val, err := m.GetBackingStore().Get("lastModifiedBy") if err != nil { panic(err) } if val != nil { return val.(EmailIdentityable) } return nil } // GetLastModifiedDateTime gets the lastModifiedDateTime property value. Date and time when the attack simulation automation was most recently modified. // returns a *Time when successful func (m *SimulationAutomation) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("lastModifiedDateTime") if err != nil { panic(err) } if val != nil { return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) } return nil } // GetLastRunDateTime gets the lastRunDateTime property value. Date and time of the latest run of the attack simulation automation. // returns a *Time when successful func (m *SimulationAutomation) GetLastRunDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("lastRunDateTime") if err != nil { panic(err) } if val != nil { return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) } return nil } // GetNextRunDateTime gets the nextRunDateTime property value. Date and time of the upcoming run of the attack simulation automation. // returns a *Time when successful func (m *SimulationAutomation) GetNextRunDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("nextRunDateTime") if err != nil { panic(err) } if val != nil { return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) } return nil } // GetRuns gets the runs property value. A collection of simulation automation runs. // returns a []SimulationAutomationRunable when successful func (m *SimulationAutomation) GetRuns()([]SimulationAutomationRunable) { val, err := m.GetBackingStore().Get("runs") if err != nil { panic(err) } if val != nil { return val.([]SimulationAutomationRunable) } return nil } // GetStatus gets the status property value. Status of the attack simulation automation. Supports $filter and $orderby. The possible values are: unknown, draft, notRunning, running, completed, unknownFutureValue. // returns a *SimulationAutomationStatus when successful func (m *SimulationAutomation) GetStatus()(*SimulationAutomationStatus) { val, err := m.GetBackingStore().Get("status") if err != nil { panic(err) } if val != nil { return val.(*SimulationAutomationStatus) } return nil } // Serialize serializes information the current object func (m *SimulationAutomation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.Entity.Serialize(writer) if err != nil { return err } { err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) 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 } } { err = writer.WriteStringValue("displayName", m.GetDisplayName()) if err != nil { return err } } { err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) if err != nil { return err } } { err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) if err != nil { return err } } { err = writer.WriteTimeValue("lastRunDateTime", m.GetLastRunDateTime()) if err != nil { return err } } { err = writer.WriteTimeValue("nextRunDateTime", m.GetNextRunDateTime()) if err != nil { return err } } if m.GetRuns() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRuns())) for i, v := range m.GetRuns() { if v != nil { cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) } } err = writer.WriteCollectionOfObjectValues("runs", cast) if err != nil { return err } } if m.GetStatus() != nil { cast := (*m.GetStatus()).String() err = writer.WriteStringValue("status", &cast) if err != nil { return err } } return nil } // SetCreatedBy sets the createdBy property value. Identity of the user who created the attack simulation automation. func (m *SimulationAutomation) SetCreatedBy(value EmailIdentityable)() { err := m.GetBackingStore().Set("createdBy", value) if err != nil { panic(err) } } // SetCreatedDateTime sets the createdDateTime property value. Date and time when the attack simulation automation was created. func (m *SimulationAutomation) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("createdDateTime", value) if err != nil { panic(err) } } // SetDescription sets the description property value. Description of the attack simulation automation. func (m *SimulationAutomation) SetDescription(value *string)() { err := m.GetBackingStore().Set("description", value) if err != nil { panic(err) } } // SetDisplayName sets the displayName property value. Display name of the attack simulation automation. Supports $filter and $orderby. func (m *SimulationAutomation) SetDisplayName(value *string)() { err := m.GetBackingStore().Set("displayName", value) if err != nil { panic(err) } } // SetLastModifiedBy sets the lastModifiedBy property value. Identity of the user who most recently modified the attack simulation automation. func (m *SimulationAutomation) SetLastModifiedBy(value EmailIdentityable)() { err := m.GetBackingStore().Set("lastModifiedBy", value) if err != nil { panic(err) } } // SetLastModifiedDateTime sets the lastModifiedDateTime property value. Date and time when the attack simulation automation was most recently modified. func (m *SimulationAutomation) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("lastModifiedDateTime", value) if err != nil { panic(err) } } // SetLastRunDateTime sets the lastRunDateTime property value. Date and time of the latest run of the attack simulation automation. func (m *SimulationAutomation) SetLastRunDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("lastRunDateTime", value) if err != nil { panic(err) } } // SetNextRunDateTime sets the nextRunDateTime property value. Date and time of the upcoming run of the attack simulation automation. func (m *SimulationAutomation) SetNextRunDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("nextRunDateTime", value) if err != nil { panic(err) } } // SetRuns sets the runs property value. A collection of simulation automation runs. func (m *SimulationAutomation) SetRuns(value []SimulationAutomationRunable)() { err := m.GetBackingStore().Set("runs", value) if err != nil { panic(err) } } // SetStatus sets the status property value. Status of the attack simulation automation. Supports $filter and $orderby. The possible values are: unknown, draft, notRunning, running, completed, unknownFutureValue. func (m *SimulationAutomation) SetStatus(value *SimulationAutomationStatus)() { err := m.GetBackingStore().Set("status", value) if err != nil { panic(err) } } type SimulationAutomationable interface { Entityable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetCreatedBy()(EmailIdentityable) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetDescription()(*string) GetDisplayName()(*string) GetLastModifiedBy()(EmailIdentityable) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetLastRunDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetNextRunDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetRuns()([]SimulationAutomationRunable) GetStatus()(*SimulationAutomationStatus) SetCreatedBy(value EmailIdentityable)() SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetDescription(value *string)() SetDisplayName(value *string)() SetLastModifiedBy(value EmailIdentityable)() SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetLastRunDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetNextRunDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetRuns(value []SimulationAutomationRunable)() SetStatus(value *SimulationAutomationStatus)() }