// 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.

#if MetadataService
  import Foundation
  import GoogleCloudWkt

  /// Request message for
  /// [MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions].
  ///
  /// [google.cloud.aiplatform.v1.MetadataService.ListExecutions]: <doc:MetadataService/listExecutions(request:)>
  public struct ListExecutionsRequest: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// Required. The MetadataStore whose Executions should be listed.
    /// Format:
    /// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
    public var parent: Swift.String = Swift.String()

    /// The maximum number of Executions to return. The service may return fewer.
    /// Must be in range 1-1000, inclusive. Defaults to 100.
    public var pageSize: Swift.Int32 = Swift.Int32()

    /// A page token, received from a previous
    /// [MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions]
    /// call. Provide this to retrieve the subsequent page.
    ///
    /// When paginating, all other provided parameters must match the call that
    /// provided the page token. (Otherwise the request will fail with an
    /// INVALID_ARGUMENT error.)
    ///
    /// [google.cloud.aiplatform.v1.MetadataService.ListExecutions]: <doc:MetadataService/listExecutions(request:)>
    public var pageToken: Swift.String = Swift.String()

    /// Filter specifying the boolean condition for the Executions to satisfy in
    /// order to be part of the result set.
    /// The syntax to define filter query is based on https://google.aip.dev/160.
    /// Following are the supported set of filters:
    ///
    /// *  **Attribute filtering**:
    ///    For example: `display_name = "test"`.
    ///    Supported fields include: `name`, `display_name`, `state`,
    ///    `schema_title`, `create_time`, and `update_time`.
    ///    Time fields, such as `create_time` and `update_time`, require values
    ///    specified in RFC-3339 format.
    ///    For example: `create_time = "2020-11-19T11:30:00-04:00"`.
    /// *  **Metadata field**:
    ///    To filter on metadata fields use traversal operation as follows:
    ///    `metadata.<field_name>.<type_value>`
    ///    For example: `metadata.field_1.number_value = 10.0`
    ///    In case the field name contains special characters (such as colon), one
    ///    can embed it inside double quote.
    ///    For example: `metadata."field:1".number_value = 10.0`
    /// *  **Context based filtering**:
    ///    To filter Executions based on the contexts to which they belong use
    ///    the function operator with the full resource name:
    ///    `in_context(<context-name>)`.
    ///    For example:
    ///    `in_context("projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context-id>")`
    ///
    /// Each of the above supported filters can be combined together using
    /// logical operators (`AND` & `OR`). Maximum nested expression depth allowed
    /// is 5.
    ///
    /// For example: `display_name = "test" AND metadata.field1.bool_value = true`.
    public var filter: Swift.String = Swift.String()

    /// How the list of messages is ordered. Specify the values to order by and an
    /// ordering operation. The default sorting order is ascending. To specify
    /// descending order for a field, users append a " desc" suffix; for example:
    /// "foo desc, bar".
    /// Subfields are specified with a `.` character, such as foo.bar.
    /// see https://google.aip.dev/132#ordering for more details.
    public var orderBy: Swift.String = Swift.String()

    /// Initialize a new instance of `ListExecutionsRequest`.
    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 = ListExecutionsRequest().with { $0.parent = ... }
    /// ```
    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.aiplatform.v1.ListExecutionsRequest"
    }
    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)
    }
  }
#endif
