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

/// Language settings of the app.
public struct LanguageSettings: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Optional. The default language code of the app.
  public var defaultLanguageCode: Swift.String = Swift.String()

  /// Optional. List of languages codes supported by the app, in addition to the
  /// `default_language_code`.
  public var supportedLanguageCodes: [Swift.String] = []

  /// Optional. Enables multilingual support. If true, agents in the app will use
  /// pre-built instructions to improve handling of multilingual input.
  public var enableMultilingualSupport: Swift.Bool = Swift.Bool()

  /// Optional. Deprecated: This feature is no longer supported. Use
  /// `enable_multilingual_support` instead to improve handling of multilingual
  /// input.
  /// The action to perform when an agent receives input in an unsupported
  /// language.
  ///
  /// This can be a predefined action or a custom tool call.
  /// Valid values are:
  /// - A tool's full resource name, which triggers a specific tool execution.
  /// - A predefined system action, such as "escalate" or "exit", which triggers
  /// an [EndSession][google.cloud.ces.v1.EndSession] signal with corresponding
  /// [metadata][google.cloud.ces.v1.EndSession.metadata] to terminate the
  /// conversation.
  ///
  /// [google.cloud.ces.v1.EndSession]: <doc:EndSession>
  /// [google.cloud.ces.v1.EndSession.metadata]: <doc:EndSession/metadata>
  @available(*, deprecated)
  public var fallbackAction: Swift.String = Swift.String()

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