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

  /// Cloud SQL source import data from.
  public struct CloudSqlSource: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// The project ID that contains the Cloud SQL source. Has a length limit of
    /// 128 characters. If not specified, inherits the project ID from the parent
    /// request.
    public var projectId: Swift.String = Swift.String()

    /// Required. The Cloud SQL instance to copy the data from with a length limit
    /// of 256 characters.
    public var instanceId: Swift.String = Swift.String()

    /// Required. The Cloud SQL database to copy the data from with a length limit
    /// of 256 characters.
    public var databaseId: Swift.String = Swift.String()

    /// Required. The Cloud SQL table to copy the data from with a length limit of
    /// 256 characters.
    public var tableId: Swift.String = Swift.String()

    /// Intermediate Cloud Storage directory used for the import with a length
    /// limit of 2,000 characters. Can be specified if one wants to have the
    /// Cloud SQL export to a specific Cloud Storage directory.
    ///
    /// Ensure that the Cloud SQL service account has the necessary Cloud
    /// Storage Admin permissions to access the specified Cloud Storage directory.
    public var gcsStagingDir: Swift.String = Swift.String()

    /// Option for serverless export. Enabling this option will incur additional
    /// cost. More info can be found
    /// [here](https://cloud.google.com/sql/pricing#serverless).
    public var offload: Swift.Bool = Swift.Bool()

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