Skip to content

Commit 814b4d4

Browse files
committed
Renaming GoAway to GoingAwayNotice for public api
1 parent 0ada63e commit 814b4d4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

FirebaseAI/Sources/Types/Internal/Live/LiveSessionService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ actor LiveSessionService {
222222
setupComplete.resume()
223223
}
224224
} else if let liveMessage = LiveServerMessage(from: response) {
225-
if case let .goAway(message) = liveMessage.messageType {
225+
if case let .goingAwayNotice(message) = liveMessage.messageType {
226226
// TODO: (b/444045023) When auto session resumption is enabled, call `connect` again
227227
AILog.debug(
228228
code: .liveSessionGoingAwaySoon,

FirebaseAI/Sources/Types/Public/Live/LiveServerGoAway.swift renamed to FirebaseAI/Sources/Types/Public/Live/LiveServerGoingAwayNotice.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import Foundation
1919
/// To learn more about session limits, see the docs on [Maximum session duration](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/multimodal-live#maximum-session-duration)\.
2020
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, *)
2121
@available(watchOS, unavailable)
22-
public struct LiveServerGoAway: Sendable {
22+
public struct LiveServerGoingAwayNotice: Sendable {
2323
let goAway: GoAway
2424
/// The remaining time before the connection will be terminated as ABORTED.
2525
///

FirebaseAI/Sources/Types/Public/Live/LiveServerMessage.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public struct LiveServerMessage: Sendable {
3131
case toolCallCancellation(LiveServerToolCallCancellation)
3232

3333
/// Server will disconnect soon.
34-
case goAway(LiveServerGoAway)
34+
case goingAwayNotice(LiveServerGoingAwayNotice)
3535
}
3636

3737
/// The actual message sent from the server.
@@ -71,7 +71,7 @@ extension LiveServerMessage.MessageType {
7171
case let .toolCallCancellation(msg):
7272
self = .toolCallCancellation(LiveServerToolCallCancellation(msg))
7373
case let .goAway(msg):
74-
self = .goAway(LiveServerGoAway(msg))
74+
self = .goingAwayNotice(LiveServerGoingAwayNotice(msg))
7575
}
7676
}
7777
}

0 commit comments

Comments
 (0)