// Code generated by sidekick. DO NOT EDIT.
//
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import Foundation
import GoogleCloudWkt
import GoogleType

/// Represents a single action in a workflow invocation.
public struct WorkflowInvocationAction: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Output only. This action's identifier. Unique within the workflow
  /// invocation.
  public var target: Target? = nil

  /// Output only. The action's identifier if the project had been compiled
  /// without any overrides configured. Unique within the compilation result.
  public var canonicalTarget: Target? = nil

  /// Output only. This action's current state.
  public var state: WorkflowInvocationAction.State = WorkflowInvocationAction.State()

  /// Output only. If and only if action's state is FAILED a failure reason is
  /// set.
  public var failureReason: Swift.String = Swift.String()

  /// Output only. This action's timing details.
  /// `start_time` will be set if the action is in [RUNNING, SUCCEEDED,
  /// CANCELLED, FAILED] state.
  /// `end_time` will be set if the action is in [SUCCEEDED, CANCELLED, FAILED]
  /// state.
  public var invocationTiming: GoogleType.Interval? = nil

  /// Output only. All the metadata information that is used internally to serve
  /// the resource. For example: timestamps, flags, status fields, etc. The
  /// format of this field is a JSON string.
  public var internalMetadata: Swift.String? = nil

  /// The action's details.
  public var action: OneOf_Action? = nil

  /// Initialize a new instance of `WorkflowInvocationAction`.
  public init() {}

  /// Use `config` to return a new instance of this object, with some fields updated.
  ///
  /// Commonly used to initialize the value, for example:
  ///
  /// ```
  /// let value = WorkflowInvocationAction().with { $0.bigqueryAction = ... }
  /// ```
  public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
    var copy = self
    try config(&copy)
    return copy
  }

  private enum CodingKeys: Swift.String, CodingKey {
    case bigqueryAction = "bigqueryAction"
    case notebookAction = "notebookAction"
    case dataPreparationAction = "dataPreparationAction"
    case target = "target"
    case canonicalTarget = "canonicalTarget"
    case state = "state"
    case failureReason = "failureReason"
    case invocationTiming = "invocationTiming"
    case internalMetadata = "internalMetadata"
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
    self.target = try container.decodeIfPresent(Target.self, forKey: .target)
    self.canonicalTarget = try container.decodeIfPresent(Target.self, forKey: .canonicalTarget)
    self.state = try container.decode(WorkflowInvocationAction.State.self, forKey: .state)
    self.failureReason = try container.decode(Swift.String.self, forKey: .failureReason)
    self.invocationTiming = try container.decodeIfPresent(
      GoogleType.Interval.self, forKey: .invocationTiming)
    self.internalMetadata = try container.decodeIfPresent(
      Swift.String.self, forKey: .internalMetadata)

    var action: OneOf_Action? = nil
    let actionCheckAndSet = {
      if action != nil {
        throw DecodingError.dataCorrupted(
          DecodingError.Context(
            codingPath: decoder.codingPath,
            debugDescription: "Multiple values set for oneof 'action'"))
      }
      action = $0
    }
    if let bigqueryAction = try container.decodeIfPresent(
      WorkflowInvocationAction.BigQueryAction?.self, forKey: .bigqueryAction)
    {
      try actionCheckAndSet(.bigqueryAction(bigqueryAction))
    }
    if let notebookAction = try container.decodeIfPresent(
      WorkflowInvocationAction.NotebookAction?.self, forKey: .notebookAction)
    {
      try actionCheckAndSet(.notebookAction(notebookAction))
    }
    if let dataPreparationAction = try container.decodeIfPresent(
      WorkflowInvocationAction.DataPreparationAction?.self, forKey: .dataPreparationAction)
    {
      try actionCheckAndSet(.dataPreparationAction(dataPreparationAction))
    }
    self.action = action
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    try container.encode(self.target, forKey: .target)
    try container.encode(self.canonicalTarget, forKey: .canonicalTarget)
    try container.encode(self.state, forKey: .state)
    try container.encode(self.failureReason, forKey: .failureReason)
    try container.encode(self.invocationTiming, forKey: .invocationTiming)
    try container.encode(self.internalMetadata, forKey: .internalMetadata)

    if let choice = self.action {
      switch choice {
      case .bigqueryAction(let value):
        try container.encode(value, forKey: .bigqueryAction)
      case .notebookAction(let value):
        try container.encode(value, forKey: .notebookAction)
      case .dataPreparationAction(let value):
        try container.encode(value, forKey: .dataPreparationAction)
      }
    }
  }

  /// Represents a workflow action that will run against BigQuery.
  public struct BigQueryAction: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// Output only. The generated BigQuery SQL script that will be executed.
    public var sqlScript: Swift.String = Swift.String()

    /// Output only. The ID of the BigQuery job that executed the SQL in
    /// sql_script. Only set once the job has started to run.
    public var jobId: Swift.String = Swift.String()

    /// Initialize a new instance of `BigQueryAction`.
    public init() {}

    /// Use `config` to return a new instance of this object, with some fields updated.
    ///
    /// Commonly used to initialize the value, for example:
    ///
    /// ```
    /// let value = BigQueryAction().with { $0.sqlScript = ... }
    /// ```
    public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
      var copy = self
      try config(&copy)
      return copy
    }

    public static var _anyTypeUrl: Swift.String {
      return "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.BigQueryAction"
    }
    public init(fromAny any: GoogleCloudWkt.`Any`) throws {
      self = try GoogleCloudWkt._slowAnyDeserialize(Self.self, from: any)
    }
    public func _pack() throws -> GoogleCloudWkt.Struct {
      return try GoogleCloudWkt._slowAnySerialize(message: self)
    }
  }

  /// Represents a workflow action that will run against a Notebook runtime.
  public struct NotebookAction: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// Output only. The code contents of a Notebook to be run.
    public var contents: Swift.String = Swift.String()

    /// Output only. The ID of the Gemini Enterprise Agent Platform job that
    /// executed the notebook in contents and also the ID used for the outputs
    /// created in Google Cloud Storage buckets. Only set once the job has
    /// started to run.
    public var jobId: Swift.String = Swift.String()

    /// Output only. The path to the notebook file in the repository.
    public var filePath: Swift.String = Swift.String()

    /// Initialize a new instance of `NotebookAction`.
    public init() {}

    /// Use `config` to return a new instance of this object, with some fields updated.
    ///
    /// Commonly used to initialize the value, for example:
    ///
    /// ```
    /// let value = NotebookAction().with { $0.contents = ... }
    /// ```
    public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
      var copy = self
      try config(&copy)
      return copy
    }

    public static var _anyTypeUrl: Swift.String {
      return "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.NotebookAction"
    }
    public init(fromAny any: GoogleCloudWkt.`Any`) throws {
      self = try GoogleCloudWkt._slowAnyDeserialize(Self.self, from: any)
    }
    public func _pack() throws -> GoogleCloudWkt.Struct {
      return try GoogleCloudWkt._slowAnySerialize(message: self)
    }
  }

  /// Represents a workflow action that will run a Data Preparation.
  public struct DataPreparationAction: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// Output only. The generated BigQuery SQL script that will be executed. For
    /// reference only.
    public var generatedSql: Swift.String = Swift.String()

    /// Output only. The ID of the BigQuery job that executed the SQL in
    /// sql_script. Only set once the job has started to run.
    public var jobId: Swift.String = Swift.String()

    /// The definition for the data preparation.
    public var definition: OneOf_Definition? = nil

    /// Initialize a new instance of `DataPreparationAction`.
    public init() {}

    /// Use `config` to return a new instance of this object, with some fields updated.
    ///
    /// Commonly used to initialize the value, for example:
    ///
    /// ```
    /// let value = DataPreparationAction().with { $0.contentsYaml = ... }
    /// ```
    public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
      var copy = self
      try config(&copy)
      return copy
    }

    private enum CodingKeys: Swift.String, CodingKey {
      case contentsYaml = "contentsYaml"
      case contentsSql = "contentsSql"
      case generatedSql = "generatedSql"
      case jobId = "jobId"
    }

    public init(from decoder: Decoder) throws {
      let container = try decoder.container(keyedBy: CodingKeys.self)
      self.generatedSql = try container.decode(Swift.String.self, forKey: .generatedSql)
      self.jobId = try container.decode(Swift.String.self, forKey: .jobId)

      var definition: OneOf_Definition? = nil
      let definitionCheckAndSet = {
        if definition != nil {
          throw DecodingError.dataCorrupted(
            DecodingError.Context(
              codingPath: decoder.codingPath,
              debugDescription: "Multiple values set for oneof 'definition'"))
        }
        definition = $0
      }
      if let contentsYaml = try container.decodeIfPresent(Swift.String.self, forKey: .contentsYaml)
      {
        try definitionCheckAndSet(.contentsYaml(contentsYaml))
      }
      if let contentsSql = try container.decodeIfPresent(
        WorkflowInvocationAction.DataPreparationAction.ActionSqlDefinition?.self,
        forKey: .contentsSql)
      {
        try definitionCheckAndSet(.contentsSql(contentsSql))
      }
      self.definition = definition
    }

    public func encode(to encoder: Encoder) throws {
      var container = encoder.container(keyedBy: CodingKeys.self)
      try container.encode(self.generatedSql, forKey: .generatedSql)
      try container.encode(self.jobId, forKey: .jobId)

      if let choice = self.definition {
        switch choice {
        case .contentsYaml(let value):
          try container.encode(value, forKey: .contentsYaml)
        case .contentsSql(let value):
          try container.encode(value, forKey: .contentsSql)
        }
      }
    }

    /// Definition of a SQL Data Preparation
    public struct ActionSqlDefinition: Codable, Equatable, GoogleCloudWkt._AnyPackable,
      Sendable
    {
      /// The SQL query representing the data preparation steps. Formatted as a
      /// Pipe SQL query statement.
      public var query: Swift.String = Swift.String()

      /// Error table configuration,
      public var errorTable: WorkflowInvocationAction.DataPreparationAction.ActionErrorTable? = nil

      /// Load configuration.
      public var loadConfig: WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig? = nil

      /// Initialize a new instance of `ActionSqlDefinition`.
      public init() {}

      /// Use `config` to return a new instance of this object, with some fields updated.
      ///
      /// Commonly used to initialize the value, for example:
      ///
      /// ```
      /// let value = ActionSqlDefinition().with { $0.query = ... }
      /// ```
      public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
        var copy = self
        try config(&copy)
        return copy
      }

      public static var _anyTypeUrl: Swift.String {
        return
          "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSqlDefinition"
      }
      public init(fromAny any: GoogleCloudWkt.`Any`) throws {
        self = try GoogleCloudWkt._slowAnyDeserialize(Self.self, from: any)
      }
      public func _pack() throws -> GoogleCloudWkt.Struct {
        return try GoogleCloudWkt._slowAnySerialize(message: self)
      }
    }

    /// Error table information, used to write error data into a BigQuery
    /// table.
    public struct ActionErrorTable: Codable, Equatable, GoogleCloudWkt._AnyPackable,
      Sendable
    {
      /// Error Table target.
      public var target: Target? = nil

      /// Error table partition expiration in days. Only positive values are
      /// allowed.
      public var retentionDays: Swift.Int32 = Swift.Int32()

      /// Initialize a new instance of `ActionErrorTable`.
      public init() {}

      /// Use `config` to return a new instance of this object, with some fields updated.
      ///
      /// Commonly used to initialize the value, for example:
      ///
      /// ```
      /// let value = ActionErrorTable().with { $0.target = ... }
      /// ```
      public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
        var copy = self
        try config(&copy)
        return copy
      }

      public static var _anyTypeUrl: Swift.String {
        return
          "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionErrorTable"
      }
      public init(fromAny any: GoogleCloudWkt.`Any`) throws {
        self = try GoogleCloudWkt._slowAnyDeserialize(Self.self, from: any)
      }
      public func _pack() throws -> GoogleCloudWkt.Struct {
        return try GoogleCloudWkt._slowAnySerialize(message: self)
      }
    }

    /// Simplified load configuration for actions
    public struct ActionLoadConfig: Codable, Equatable, GoogleCloudWkt._AnyPackable,
      Sendable
    {
      /// Load mode
      public var mode: OneOf_Mode? = nil

      /// Initialize a new instance of `ActionLoadConfig`.
      public init() {}

      /// Use `config` to return a new instance of this object, with some fields updated.
      ///
      /// Commonly used to initialize the value, for example:
      ///
      /// ```
      /// let value = ActionLoadConfig().with { $0.replace = ... }
      /// ```
      public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
        var copy = self
        try config(&copy)
        return copy
      }

      private enum CodingKeys: Swift.String, CodingKey {
        case replace = "replace"
        case append = "append"
        case maximum = "maximum"
        case unique = "unique"
      }

      public init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: CodingKeys.self)

        var mode: OneOf_Mode? = nil
        let modeCheckAndSet = {
          if mode != nil {
            throw DecodingError.dataCorrupted(
              DecodingError.Context(
                codingPath: decoder.codingPath,
                debugDescription: "Multiple values set for oneof 'mode'"))
          }
          mode = $0
        }
        if let replace = try container.decodeIfPresent(
          WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadMode?.self,
          forKey: .replace)
        {
          try modeCheckAndSet(.replace(replace))
        }
        if let append = try container.decodeIfPresent(
          WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadMode?.self, forKey: .append
        ) {
          try modeCheckAndSet(.append(append))
        }
        if let maximum = try container.decodeIfPresent(
          WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadMode?.self,
          forKey: .maximum)
        {
          try modeCheckAndSet(.maximum(maximum))
        }
        if let unique = try container.decodeIfPresent(
          WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadMode?.self,
          forKey: .unique)
        {
          try modeCheckAndSet(.unique(unique))
        }
        self.mode = mode
      }

      public func encode(to encoder: Encoder) throws {
        var container = encoder.container(keyedBy: CodingKeys.self)

        if let choice = self.mode {
          switch choice {
          case .replace(let value):
            try container.encode(value, forKey: .replace)
          case .append(let value):
            try container.encode(value, forKey: .append)
          case .maximum(let value):
            try container.encode(value, forKey: .maximum)
          case .unique(let value):
            try container.encode(value, forKey: .unique)
          }
        }
      }

      /// Load mode
      public enum OneOf_Mode: Codable, Equatable, Sendable {
        /// Replace destination table
        indirect case replace(WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadMode?)
        /// Append into destination table
        indirect case append(WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadMode?)
        /// Insert records where the value exceeds the previous maximum value for
        /// a column in the destination table
        indirect case maximum(
          WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadMode?)
        /// Insert records where the value of a column is not already present in
        /// the destination table
        indirect case unique(
          WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadMode?)
      }

      public static var _anyTypeUrl: Swift.String {
        return
          "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig"
      }
      public init(fromAny any: GoogleCloudWkt.`Any`) throws {
        self = try GoogleCloudWkt._slowAnyDeserialize(Self.self, from: any)
      }
      public func _pack() throws -> GoogleCloudWkt.Struct {
        return try GoogleCloudWkt._slowAnySerialize(message: self)
      }
    }

    /// Simple load definition
    public struct ActionSimpleLoadMode: Codable, Equatable, GoogleCloudWkt._AnyPackable,
      Sendable
    {
      /// Initialize a new instance of `ActionSimpleLoadMode`.
      public init() {}

      /// Use `config` to return a new instance of this object, with some fields updated.
      ///
      /// Commonly used to initialize the value, for example:
      ///
      /// ```
      /// let value = ActionSimpleLoadMode().with { $0.<placeholder> = ... }
      /// ```
      public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
        var copy = self
        try config(&copy)
        return copy
      }

      public static var _anyTypeUrl: Swift.String {
        return
          "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadMode"
      }
      public init(fromAny any: GoogleCloudWkt.`Any`) throws {
        self = try GoogleCloudWkt._slowAnyDeserialize(Self.self, from: any)
      }
      public func _pack() throws -> GoogleCloudWkt.Struct {
        return try GoogleCloudWkt._slowAnySerialize(message: self)
      }
    }

    /// Load definition for incremental load modes
    public struct ActionIncrementalLoadMode: Codable, Equatable, GoogleCloudWkt._AnyPackable,
      Sendable
    {
      /// Column name for incremental load modes
      public var column: Swift.String = Swift.String()

      /// Initialize a new instance of `ActionIncrementalLoadMode`.
      public init() {}

      /// Use `config` to return a new instance of this object, with some fields updated.
      ///
      /// Commonly used to initialize the value, for example:
      ///
      /// ```
      /// let value = ActionIncrementalLoadMode().with { $0.column = ... }
      /// ```
      public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
        var copy = self
        try config(&copy)
        return copy
      }

      public static var _anyTypeUrl: Swift.String {
        return
          "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadMode"
      }
      public init(fromAny any: GoogleCloudWkt.`Any`) throws {
        self = try GoogleCloudWkt._slowAnyDeserialize(Self.self, from: any)
      }
      public func _pack() throws -> GoogleCloudWkt.Struct {
        return try GoogleCloudWkt._slowAnySerialize(message: self)
      }
    }

    /// The definition for the data preparation.
    public enum OneOf_Definition: Codable, Equatable, Sendable {
      /// Output only. YAML representing the contents of the data preparation.
      /// Can be used to show the customer what the input was to their workflow.
      case contentsYaml(Swift.String)
      /// SQL definition for a Data Preparation. Contains a SQL query and
      /// additional context information.
      indirect case contentsSql(WorkflowInvocationAction.DataPreparationAction.ActionSqlDefinition?)
    }

    public static var _anyTypeUrl: Swift.String {
      return
        "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction"
    }
    public init(fromAny any: GoogleCloudWkt.`Any`) throws {
      self = try GoogleCloudWkt._slowAnyDeserialize(Self.self, from: any)
    }
    public func _pack() throws -> GoogleCloudWkt.Struct {
      return try GoogleCloudWkt._slowAnySerialize(message: self)
    }
  }

  /// Represents the current state of a workflow invocation action.
  public enum State: Codable, Equatable, Sendable {
    /// The action has not yet been considered for invocation.
    case pending
    /// The action is currently running.
    case running
    /// Execution of the action was skipped because upstream dependencies did not
    /// all complete successfully. A terminal state.
    case skipped
    /// Execution of the action was disabled as per the configuration of the
    /// corresponding compilation result action. A terminal state.
    case disabled
    /// The action succeeded. A terminal state.
    case succeeded
    /// The action was cancelled. A terminal state.
    case cancelled
    /// The action failed. A terminal state.
    case failed
    /// Encodes an unknown integer value.
    ///
    /// The most common cause for an unknown values is for the service to send
    /// a value unknown to the library. We recommend you update your library to
    /// the latest version.
    case unknownIntValue(Int)
    /// Encodes an unknown string value.
    ///
    /// The most common cause for an unknown values is for the service to send
    /// a value unknown to the library. We recommend you update your library to
    /// the latest version.
    case unknownStringValue(String)

    public init() {
      self = .pending
    }

    /// Returns the integer value associated with the enumeration.
    ///
    /// If the enumeration was initialized with an unknown string value, this returns `nil`.
    public var intValue: Int? {
      switch self {
      case .pending: return 0
      case .running: return 1
      case .skipped: return 2
      case .disabled: return 3
      case .succeeded: return 4
      case .cancelled: return 5
      case .failed: return 6
      case .unknownIntValue(let v): return v
      case .unknownStringValue: return nil
      }
    }

    /// Returns the string value (or name) associated with the enumeration.
    ///
    /// If the enumeration was initialized with an unknown integer value, this returns `nil`.
    public var stringValue: Swift.String? {
      switch self {
      case .pending: return "PENDING"
      case .running: return "RUNNING"
      case .skipped: return "SKIPPED"
      case .disabled: return "DISABLED"
      case .succeeded: return "SUCCEEDED"
      case .cancelled: return "CANCELLED"
      case .failed: return "FAILED"
      case .unknownIntValue: return nil
      case .unknownStringValue(let v): return v
      }
    }

    /// Initialize from a string value.
    ///
    /// If the value is unknown, this initializes to [`unknownStringValue`](doc:State/unknownStringValue(_:)).
    public init(stringValue: Swift.String) {
      switch stringValue {
      case "PENDING": self = .pending
      case "RUNNING": self = .running
      case "SKIPPED": self = .skipped
      case "DISABLED": self = .disabled
      case "SUCCEEDED": self = .succeeded
      case "CANCELLED": self = .cancelled
      case "FAILED": self = .failed
      default: self = .unknownStringValue(stringValue)
      }
    }

    /// Initialize from an integer value.
    ///
    /// If the value is unknown, this initializes to [`unknownIntValue`](doc:State/unknownIntValue(_:)).
    public init(intValue: Int) {
      switch intValue {
      case 0: self = .pending
      case 1: self = .running
      case 2: self = .skipped
      case 3: self = .disabled
      case 4: self = .succeeded
      case 5: self = .cancelled
      case 6: self = .failed
      default: self = .unknownIntValue(intValue)
      }
    }

    public init(from decoder: Decoder) throws {
      let container = try decoder.singleValueContainer()
      if let v = try? container.decode(Int.self) {
        self.init(intValue: v)
        return
      }
      if let s = try? container.decode(String.self) {
        if let v = Int(s) {
          self.init(intValue: v)
        } else {
          self.init(stringValue: s)
        }
        return
      }
      throw DecodingError.dataCorruptedError(
        in: container, debugDescription: "Expected enum value, must be integer or string.")
    }

    public func encode(to encoder: Encoder) throws {
      var container = encoder.singleValueContainer()
      switch self {
      case .pending: return try container.encode(0)
      case .running: return try container.encode(1)
      case .skipped: return try container.encode(2)
      case .disabled: return try container.encode(3)
      case .succeeded: return try container.encode(4)
      case .cancelled: return try container.encode(5)
      case .failed: return try container.encode(6)
      case .unknownIntValue(let v): return try container.encode(v)
      case .unknownStringValue(let v): return try container.encode(v)
      }
    }
  }

  /// The action's details.
  public enum OneOf_Action: Codable, Equatable, Sendable {
    /// Output only. The workflow action's bigquery action details.
    indirect case bigqueryAction(WorkflowInvocationAction.BigQueryAction?)
    /// Output only. The workflow action's notebook action details.
    indirect case notebookAction(WorkflowInvocationAction.NotebookAction?)
    /// Output only. The workflow action's data preparation action details.
    indirect case dataPreparationAction(WorkflowInvocationAction.DataPreparationAction?)
  }

  public static var _anyTypeUrl: Swift.String {
    return "type.googleapis.com/google.cloud.dataform.v1.WorkflowInvocationAction"
  }
  public init(fromAny any: GoogleCloudWkt.`Any`) throws {
    self = try GoogleCloudWkt._slowAnyDeserialize(Self.self, from: any)
  }
  public func _pack() throws -> GoogleCloudWkt.Struct {
    return try GoogleCloudWkt._slowAnySerialize(message: self)
  }
}
