Files
stack/releases/sdks/go/pkg/models/shared/workflowinstance.go

87 lines
1.7 KiB
Go

// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package shared
import (
"github.com/formancehq/formance-sdk-go/v2/pkg/utils"
"time"
)
type WorkflowInstance struct {
CreatedAt time.Time `json:"createdAt"`
Error *string `json:"error,omitempty"`
ID string `json:"id"`
Status []StageStatus `json:"status,omitempty"`
Terminated bool `json:"terminated"`
TerminatedAt *time.Time `json:"terminatedAt,omitempty"`
UpdatedAt time.Time `json:"updatedAt"`
WorkflowID string `json:"workflowID"`
}
func (w WorkflowInstance) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(w, "", false)
}
func (w *WorkflowInstance) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &w, "", false, false); err != nil {
return err
}
return nil
}
func (o *WorkflowInstance) GetCreatedAt() time.Time {
if o == nil {
return time.Time{}
}
return o.CreatedAt
}
func (o *WorkflowInstance) GetError() *string {
if o == nil {
return nil
}
return o.Error
}
func (o *WorkflowInstance) GetID() string {
if o == nil {
return ""
}
return o.ID
}
func (o *WorkflowInstance) GetStatus() []StageStatus {
if o == nil {
return nil
}
return o.Status
}
func (o *WorkflowInstance) GetTerminated() bool {
if o == nil {
return false
}
return o.Terminated
}
func (o *WorkflowInstance) GetTerminatedAt() *time.Time {
if o == nil {
return nil
}
return o.TerminatedAt
}
func (o *WorkflowInstance) GetUpdatedAt() time.Time {
if o == nil {
return time.Time{}
}
return o.UpdatedAt
}
func (o *WorkflowInstance) GetWorkflowID() string {
if o == nil {
return ""
}
return o.WorkflowID
}