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

/// Request message for the `ExportAnalyticsMetrics` method.
public struct ExportAnalyticsMetricsRequest: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Required. Full resource name of the parent catalog.
  /// Expected format: `projects/*/locations/*/catalogs/*`
  public var catalog: Swift.String = Swift.String()

  /// Required. The output location of the data.
  public var outputConfig: OutputConfig? = nil

  /// A filtering expression to specify restrictions on returned metrics.
  /// The expression is a sequence of terms. Each term applies a restriction to
  /// the returned metrics. Use this expression to restrict results to a
  /// specific time range.
  ///
  ///   Currently we expect only one types of fields:
  ///
  ///    * `timestamp`: This can be specified twice, once with a
  ///      less than operator and once with a greater than operator. The
  ///      `timestamp` restriction should result in one, contiguous, valid,
  ///      `timestamp` range.
  ///
  ///   Some examples of valid filters expressions:
  ///
  ///   * Example 1: `timestamp > "2012-04-23T18:25:43.511Z"
  ///             timestamp < "2012-04-23T18:30:43.511Z"`
  ///   * Example 2: `timestamp > "2012-04-23T18:25:43.511Z"`
  public var filter: Swift.String = Swift.String()

  /// Initialize a new instance of `ExportAnalyticsMetricsRequest`.
  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 = ExportAnalyticsMetricsRequest().with { $0.catalog = ... }
  /// ```
  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.retail.v2.ExportAnalyticsMetricsRequest"
  }
  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)
  }
}
