// 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 DatasetService
  import Foundation
  import GoogleCloudWkt

  /// A container for a single DataItem and Annotations on it.
  public struct DataItemView: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// The DataItem.
    public var dataItem: DataItem? = nil

    /// The Annotations on the DataItem. If too many Annotations should be returned
    /// for the DataItem, this field will be truncated per annotations_limit in
    /// request. If it was, then the has_truncated_annotations will be set to true.
    public var annotations: [Annotation] = []

    /// True if and only if the Annotations field has been truncated. It happens if
    /// more Annotations for this DataItem met the request's annotation_filter than
    /// are allowed to be returned by annotations_limit.
    /// Note that if Annotations field is not being returned due to field mask,
    /// then this field will not be set to true no matter how many Annotations are
    /// there.
    public var hasTruncatedAnnotations: Swift.Bool = Swift.Bool()

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