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

/// A dataset that hosts the examples (sentence pairs) used for translation
/// models.
public struct Dataset: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// The resource name of the dataset, in form of
  /// `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
  public var name: Swift.String = Swift.String()

  /// The name of the dataset to show in the interface. The name can be
  /// up to 32 characters long and can consist only of ASCII Latin letters A-Z
  /// and a-z, underscores (_), and ASCII digits 0-9.
  public var displayName: Swift.String = Swift.String()

  /// The BCP-47 language code of the source language.
  public var sourceLanguageCode: Swift.String = Swift.String()

  /// The BCP-47 language code of the target language.
  public var targetLanguageCode: Swift.String = Swift.String()

  /// Output only. The number of examples in the dataset.
  public var exampleCount: Swift.Int32 = Swift.Int32()

  /// Output only. Number of training examples (sentence pairs).
  public var trainExampleCount: Swift.Int32 = Swift.Int32()

  /// Output only. Number of validation examples (sentence pairs).
  public var validateExampleCount: Swift.Int32 = Swift.Int32()

  /// Output only. Number of test examples (sentence pairs).
  public var testExampleCount: Swift.Int32 = Swift.Int32()

  /// Output only. Timestamp when this dataset was created.
  public var createTime: GoogleCloudWkt.Timestamp? = nil

  /// Output only. Timestamp when this dataset was last updated.
  public var updateTime: GoogleCloudWkt.Timestamp? = nil

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