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

  /// Defines the services to connect to incoming Dialogflow conversations.
  public struct ConversationProfile: Codable, Equatable, GoogleCloudWkt._AnyPackable,
    Sendable
  {
    /// The unique identifier of this conversation profile.
    /// Format: `projects/<Project ID>/locations/<Location
    /// ID>/conversationProfiles/<Conversation Profile ID>`.
    public var name: Swift.String = Swift.String()

    /// Required. Human readable name for this profile. Max length 1024 bytes.
    public var displayName: Swift.String = Swift.String()

    /// Output only. Create time of the conversation profile.
    public var createTime: GoogleCloudWkt.Timestamp? = nil

    /// Output only. Update time of the conversation profile.
    public var updateTime: GoogleCloudWkt.Timestamp? = nil

    /// Configuration for an automated agent to use with this profile.
    public var automatedAgentConfig: AutomatedAgentConfig? = nil

    /// Configuration for agent assistance to use with this profile.
    public var humanAgentAssistantConfig: HumanAgentAssistantConfig? = nil

    /// Configuration for connecting to a live agent.
    ///
    /// Currently, this feature is not general available, please contact Google
    /// to get access.
    public var humanAgentHandoffConfig: HumanAgentHandoffConfig? = nil

    /// Configuration for publishing conversation lifecycle events.
    public var notificationConfig: NotificationConfig? = nil

    /// Configuration for logging conversation lifecycle events.
    public var loggingConfig: LoggingConfig? = nil

    /// Configuration for publishing new message events. Event will be sent in
    /// format of [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent]
    ///
    /// [google.cloud.dialogflow.v2.ConversationEvent]: <doc:ConversationEvent>
    public var newMessageEventNotificationConfig: NotificationConfig? = nil

    /// Optional. Configuration for publishing transcription intermediate results.
    /// Event will be sent in format of
    /// [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent]. If
    /// configured, the following information will be populated as
    /// [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] Pub/Sub
    /// message attributes:
    /// - "participant_id"
    /// - "participant_role"
    /// - "message_id"
    ///
    /// [google.cloud.dialogflow.v2.ConversationEvent]: <doc:ConversationEvent>
    public var newRecognitionResultNotificationConfig: NotificationConfig? = nil

    /// Settings for speech transcription.
    public var sttConfig: SpeechToTextConfig? = nil

    /// Language code for the conversation profile. If not specified, the language
    /// is en-US. Language at ConversationProfile should be set for all non en-US
    /// languages.
    /// This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
    /// language tag. Example: "en-US".
    public var languageCode: Swift.String = Swift.String()

    /// Optional. Configuration for SIP connections.
    public var sipConfig: SipConfig? = nil

    /// The time zone of this conversational profile from the
    /// [time zone database](https://www.iana.org/time-zones), e.g.,
    /// America/New_York, Europe/Paris. Defaults to America/New_York.
    public var timeZone: Swift.String = Swift.String()

    /// Name of the CX SecuritySettings reference for the agent.
    /// Format: `projects/<Project ID>/locations/<Location
    /// ID>/securitySettings/<Security Settings ID>`.
    public var securitySettings: Swift.String = Swift.String()

    /// Configuration for Text-to-Speech synthesization.
    ///
    /// Used by Phone Gateway to specify synthesization options. If agent defines
    /// synthesization options as well, agent settings overrides the option here.
    public var ttsConfig: SynthesizeSpeechConfig? = nil

    /// Initialize a new instance of `ConversationProfile`.
    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 = ConversationProfile().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.dialogflow.v2.ConversationProfile"
    }
    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
