// 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 FeatureOnlineStoreAdminService
  import Foundation
  import GoogleCloudWkt
  import GoogleRpc
  import GoogleType

  /// FeatureViewSync is a representation of sync operation which copies data from
  /// data source to Feature View in Online Store.
  public struct FeatureViewSync: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// Identifier. Name of the FeatureViewSync. Format:
    /// `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`
    public var name: Swift.String = Swift.String()

    /// Output only. Time when this FeatureViewSync is created. Creation of a
    /// FeatureViewSync means that the job is pending / waiting for sufficient
    /// resources but may not have started the actual data transfer yet.
    public var createTime: GoogleCloudWkt.Timestamp? = nil

    /// Output only. Time when this FeatureViewSync is finished.
    public var runTime: GoogleType.Interval? = nil

    /// Output only. Final status of the FeatureViewSync.
    public var finalStatus: GoogleRpc.Status? = nil

    /// Output only. Summary of the sync job.
    public var syncSummary: FeatureViewSync.SyncSummary? = nil

    /// Output only. Reserved for future use.
    public var satisfiesPzs: Swift.Bool = Swift.Bool()

    /// Output only. Reserved for future use.
    public var satisfiesPzi: Swift.Bool = Swift.Bool()

    /// Initialize a new instance of `FeatureViewSync`.
    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 = FeatureViewSync().with { $0.name = ... }
    /// ```
    public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
      var copy = self
      try config(&copy)
      return copy
    }

    /// Summary from the Sync job. For continuous syncs, the summary is updated
    /// periodically. For batch syncs, it gets updated on completion of the sync.
    public struct SyncSummary: Codable, Equatable, GoogleCloudWkt._AnyPackable,
      Sendable
    {
      /// Output only. Total number of rows synced.
      public var rowSynced: Swift.Int64 = Swift.Int64()

      /// Output only. BigQuery slot milliseconds consumed for the sync job.
      public var totalSlot: Swift.Int64 = Swift.Int64()

      /// Lower bound of the system time watermark for the sync job. This is only
      /// set for continuously syncing feature views.
      public var systemWatermarkTime: GoogleCloudWkt.Timestamp? = nil

      /// Initialize a new instance of `SyncSummary`.
      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 = SyncSummary().with { $0.rowSynced = ... }
      /// ```
      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.FeatureViewSync.SyncSummary"
      }
      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)
      }
    }

    public static var _anyTypeUrl: Swift.String {
      return "type.googleapis.com/google.cloud.aiplatform.v1.FeatureViewSync"
    }
    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
