/
githubmirror
/
origin
Обзор
Документация
Войти
/
githubmirror
/
origin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
vendor/github.com/microsoftgraph/msgraph-sdk-go/models/identitygovernance/task.go
401 строка
15 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 identitygovernance import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242 "github.com/microsoftgraph/msgraph-sdk-go/models" ) type Task struct { iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Entity } // NewTask instantiates a new Task and sets the default values. func NewTask()(*Task) { m := &Task{ Entity: *iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.NewEntity(), } return m } // CreateTaskFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful func CreateTaskFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewTask(), nil } // GetArguments gets the arguments property value. Arguments included within the task. For guidance to configure this property, see Configure the arguments for built-in Lifecycle Workflow tasks. Required. // returns a []KeyValuePairable when successful func (m *Task) GetArguments()([]iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.KeyValuePairable) { val, err := m.GetBackingStore().Get("arguments") if err != nil { panic(err) } if val != nil { return val.([]iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.KeyValuePairable) } return nil } // GetCategory gets the category property value. The category property // returns a *LifecycleTaskCategory when successful func (m *Task) GetCategory()(*LifecycleTaskCategory) { val, err := m.GetBackingStore().Get("category") if err != nil { panic(err) } if val != nil { return val.(*LifecycleTaskCategory) } return nil } // GetContinueOnError gets the continueOnError property value. A Boolean value that specifies whether, if this task fails, the workflow stops, and subsequent tasks aren't run. Optional. // returns a *bool when successful func (m *Task) GetContinueOnError()(*bool) { val, err := m.GetBackingStore().Get("continueOnError") if err != nil { panic(err) } if val != nil { return val.(*bool) } return nil } // GetDescription gets the description property value. A string that describes the purpose of the task for administrative use. Optional. // returns a *string when successful func (m *Task) 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. A unique string that identifies the task. Required.Supports $filter(eq, ne) and orderBy. // returns a *string when successful func (m *Task) GetDisplayName()(*string) { val, err := m.GetBackingStore().Get("displayName") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetExecutionSequence gets the executionSequence property value. An integer that states in what order the task runs in a workflow.Supports $orderby. // returns a *int32 when successful func (m *Task) GetExecutionSequence()(*int32) { val, err := m.GetBackingStore().Get("executionSequence") if err != nil { panic(err) } if val != nil { return val.(*int32) } return nil } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *Task) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.Entity.GetFieldDeserializers() res["arguments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.CreateKeyValuePairFromDiscriminatorValue) if err != nil { return err } if val != nil { res := make([]iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.KeyValuePairable, len(val)) for i, v := range val { if v != nil { res[i] = v.(iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.KeyValuePairable) } } m.SetArguments(res) } return nil } res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseLifecycleTaskCategory) if err != nil { return err } if val != nil { m.SetCategory(val.(*LifecycleTaskCategory)) } return nil } res["continueOnError"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { return err } if val != nil { m.SetContinueOnError(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["executionSequence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetInt32Value() if err != nil { return err } if val != nil { m.SetExecutionSequence(val) } return nil } res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { return err } if val != nil { m.SetIsEnabled(val) } return nil } res["taskDefinitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetTaskDefinitionId(val) } return nil } res["taskProcessingResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetCollectionOfObjectValues(CreateTaskProcessingResultFromDiscriminatorValue) if err != nil { return err } if val != nil { res := make([]TaskProcessingResultable, len(val)) for i, v := range val { if v != nil { res[i] = v.(TaskProcessingResultable) } } m.SetTaskProcessingResults(res) } return nil } return res } // GetIsEnabled gets the isEnabled property value. A Boolean value that denotes whether the task is set to run or not. Optional.Supports $filter(eq, ne) and orderBy. // returns a *bool when successful func (m *Task) GetIsEnabled()(*bool) { val, err := m.GetBackingStore().Get("isEnabled") if err != nil { panic(err) } if val != nil { return val.(*bool) } return nil } // GetTaskDefinitionId gets the taskDefinitionId property value. A unique template identifier for the task. For more information about the tasks that Lifecycle Workflows currently supports and their unique identifiers, see Configure the arguments for built-in Lifecycle Workflow tasks. Required.Supports $filter(eq, ne). // returns a *string when successful func (m *Task) GetTaskDefinitionId()(*string) { val, err := m.GetBackingStore().Get("taskDefinitionId") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetTaskProcessingResults gets the taskProcessingResults property value. The result of processing the task. // returns a []TaskProcessingResultable when successful func (m *Task) GetTaskProcessingResults()([]TaskProcessingResultable) { val, err := m.GetBackingStore().Get("taskProcessingResults") if err != nil { panic(err) } if val != nil { return val.([]TaskProcessingResultable) } return nil } // Serialize serializes information the current object func (m *Task) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.Entity.Serialize(writer) if err != nil { return err } if m.GetArguments() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetArguments())) for i, v := range m.GetArguments() { if v != nil { cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) } } err = writer.WriteCollectionOfObjectValues("arguments", cast) if err != nil { return err } } if m.GetCategory() != nil { cast := (*m.GetCategory()).String() err = writer.WriteStringValue("category", &cast) if err != nil { return err } } { err = writer.WriteBoolValue("continueOnError", m.GetContinueOnError()) 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.WriteInt32Value("executionSequence", m.GetExecutionSequence()) if err != nil { return err } } { err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) if err != nil { return err } } { err = writer.WriteStringValue("taskDefinitionId", m.GetTaskDefinitionId()) if err != nil { return err } } if m.GetTaskProcessingResults() != nil { cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTaskProcessingResults())) for i, v := range m.GetTaskProcessingResults() { if v != nil { cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) } } err = writer.WriteCollectionOfObjectValues("taskProcessingResults", cast) if err != nil { return err } } return nil } // SetArguments sets the arguments property value. Arguments included within the task. For guidance to configure this property, see Configure the arguments for built-in Lifecycle Workflow tasks. Required. func (m *Task) SetArguments(value []iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.KeyValuePairable)() { err := m.GetBackingStore().Set("arguments", value) if err != nil { panic(err) } } // SetCategory sets the category property value. The category property func (m *Task) SetCategory(value *LifecycleTaskCategory)() { err := m.GetBackingStore().Set("category", value) if err != nil { panic(err) } } // SetContinueOnError sets the continueOnError property value. A Boolean value that specifies whether, if this task fails, the workflow stops, and subsequent tasks aren't run. Optional. func (m *Task) SetContinueOnError(value *bool)() { err := m.GetBackingStore().Set("continueOnError", value) if err != nil { panic(err) } } // SetDescription sets the description property value. A string that describes the purpose of the task for administrative use. Optional. func (m *Task) SetDescription(value *string)() { err := m.GetBackingStore().Set("description", value) if err != nil { panic(err) } } // SetDisplayName sets the displayName property value. A unique string that identifies the task. Required.Supports $filter(eq, ne) and orderBy. func (m *Task) SetDisplayName(value *string)() { err := m.GetBackingStore().Set("displayName", value) if err != nil { panic(err) } } // SetExecutionSequence sets the executionSequence property value. An integer that states in what order the task runs in a workflow.Supports $orderby. func (m *Task) SetExecutionSequence(value *int32)() { err := m.GetBackingStore().Set("executionSequence", value) if err != nil { panic(err) } } // SetIsEnabled sets the isEnabled property value. A Boolean value that denotes whether the task is set to run or not. Optional.Supports $filter(eq, ne) and orderBy. func (m *Task) SetIsEnabled(value *bool)() { err := m.GetBackingStore().Set("isEnabled", value) if err != nil { panic(err) } } // SetTaskDefinitionId sets the taskDefinitionId property value. A unique template identifier for the task. For more information about the tasks that Lifecycle Workflows currently supports and their unique identifiers, see Configure the arguments for built-in Lifecycle Workflow tasks. Required.Supports $filter(eq, ne). func (m *Task) SetTaskDefinitionId(value *string)() { err := m.GetBackingStore().Set("taskDefinitionId", value) if err != nil { panic(err) } } // SetTaskProcessingResults sets the taskProcessingResults property value. The result of processing the task. func (m *Task) SetTaskProcessingResults(value []TaskProcessingResultable)() { err := m.GetBackingStore().Set("taskProcessingResults", value) if err != nil { panic(err) } } type Taskable interface { iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.Entityable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetArguments()([]iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.KeyValuePairable) GetCategory()(*LifecycleTaskCategory) GetContinueOnError()(*bool) GetDescription()(*string) GetDisplayName()(*string) GetExecutionSequence()(*int32) GetIsEnabled()(*bool) GetTaskDefinitionId()(*string) GetTaskProcessingResults()([]TaskProcessingResultable) SetArguments(value []iadcd81124412c61e647227ecfc4449d8bba17de0380ddda76f641a29edf2b242.KeyValuePairable)() SetCategory(value *LifecycleTaskCategory)() SetContinueOnError(value *bool)() SetDescription(value *string)() SetDisplayName(value *string)() SetExecutionSequence(value *int32)() SetIsEnabled(value *bool)() SetTaskDefinitionId(value *string)() SetTaskProcessingResults(value []TaskProcessingResultable)() }