// DO NOT EDIT. // swift-format-ignore-file // swiftlint:disable all // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: apple_intelligence.proto // // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ import Foundation import SwiftProtobuf // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is // incompatible with the version of SwiftProtobuf to which you are linking. // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} typealias Version = _2 } /// Audio format enumeration public enum Appleintelligence_AudioFormat: SwiftProtobuf.Enum, Swift.CaseIterable { public typealias RawValue = Int case unspecified // = 0 case wav // = 1 case mp3 // = 2 case UNRECOGNIZED(Int) public init() { self = .unspecified } public init?(rawValue: Int) { switch rawValue { case 0: self = .unspecified case 1: self = .wav case 2: self = .mp3 default: self = .UNRECOGNIZED(rawValue) } } public var rawValue: Int { switch self { case .unspecified: return 0 case .wav: return 1 case .mp3: return 2 case .UNRECOGNIZED(let i): return i } } // The compiler won't synthesize support with the UNRECOGNIZED case. public static let allCases: [Appleintelligence_AudioFormat] = [ .unspecified, .wav, .mp3, ] } /// Image data for vision requests public struct Appleintelligence_ImageData: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var data: Data = Data() public var filename: String = String() public var mimeType: String = String() public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } /// Vision analysis results public struct Appleintelligence_ImageAnalysis: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var textContent: String = String() public var labels: [String] = [] public var description_p: String = String() public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } /// Completion request public struct Appleintelligence_CompletionRequest: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var prompt: String = String() public var temperature: Float { get {return _temperature ?? 0} set {_temperature = newValue} } /// Returns true if `temperature` has been explicitly set. public var hasTemperature: Bool {return self._temperature != nil} /// Clears the value of `temperature`. Subsequent reads from it will return its default value. public mutating func clearTemperature() {self._temperature = nil} public var maxTokens: Int32 { get {return _maxTokens ?? 0} set {_maxTokens = newValue} } /// Returns true if `maxTokens` has been explicitly set. public var hasMaxTokens: Bool {return self._maxTokens != nil} /// Clears the value of `maxTokens`. Subsequent reads from it will return its default value. public mutating func clearMaxTokens() {self._maxTokens = nil} public var images: [Appleintelligence_ImageData] = [] public var includeAnalysis: Bool = false public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} fileprivate var _temperature: Float? = nil fileprivate var _maxTokens: Int32? = nil } /// Completion response (non-streaming) public struct Appleintelligence_CompletionResponse: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var id: String = String() public var text: String = String() public var finishReason: String = String() public var imageAnalyses: [Appleintelligence_ImageAnalysis] = [] public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } /// Streaming completion chunk public struct Appleintelligence_CompletionChunk: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var id: String = String() public var delta: String = String() public var isFinal: Bool = false public var finishReason: String = String() public var imageAnalyses: [Appleintelligence_ImageAnalysis] = [] public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } /// Health check request public struct Appleintelligence_HealthRequest: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } /// Health check response public struct Appleintelligence_HealthResponse: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var healthy: Bool = false public var modelStatus: String = String() public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } /// Voice configuration for TTS public struct Appleintelligence_VoiceConfig: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var voiceIdentifier: String = String() /// 0.0-1.0, default 0.5 public var speakingRate: Float { get {return _speakingRate ?? 0} set {_speakingRate = newValue} } /// Returns true if `speakingRate` has been explicitly set. public var hasSpeakingRate: Bool {return self._speakingRate != nil} /// Clears the value of `speakingRate`. Subsequent reads from it will return its default value. public mutating func clearSpeakingRate() {self._speakingRate = nil} /// 0.5-2.0, default 1.0 public var pitchMultiplier: Float { get {return _pitchMultiplier ?? 0} set {_pitchMultiplier = newValue} } /// Returns true if `pitchMultiplier` has been explicitly set. public var hasPitchMultiplier: Bool {return self._pitchMultiplier != nil} /// Clears the value of `pitchMultiplier`. Subsequent reads from it will return its default value. public mutating func clearPitchMultiplier() {self._pitchMultiplier = nil} /// 0.0-1.0, default 1.0 public var volume: Float { get {return _volume ?? 0} set {_volume = newValue} } /// Returns true if `volume` has been explicitly set. public var hasVolume: Bool {return self._volume != nil} /// Clears the value of `volume`. Subsequent reads from it will return its default value. public mutating func clearVolume() {self._volume = nil} public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} fileprivate var _speakingRate: Float? = nil fileprivate var _pitchMultiplier: Float? = nil fileprivate var _volume: Float? = nil } /// TTS Request public struct Appleintelligence_TextToSpeechRequest: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var text: String = String() public var outputFormat: Appleintelligence_AudioFormat = .unspecified public var voiceConfig: Appleintelligence_VoiceConfig { get {return _voiceConfig ?? Appleintelligence_VoiceConfig()} set {_voiceConfig = newValue} } /// Returns true if `voiceConfig` has been explicitly set. public var hasVoiceConfig: Bool {return self._voiceConfig != nil} /// Clears the value of `voiceConfig`. Subsequent reads from it will return its default value. public mutating func clearVoiceConfig() {self._voiceConfig = nil} public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} fileprivate var _voiceConfig: Appleintelligence_VoiceConfig? = nil } /// TTS Response public struct Appleintelligence_TextToSpeechResponse: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var audioData: Data = Data() public var format: Appleintelligence_AudioFormat = .unspecified public var sampleRate: Int32 = 0 public var channels: Int32 = 0 public var durationSeconds: Float = 0 public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } /// List available voices request public struct Appleintelligence_ListVoicesRequest: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var languageCode: String { get {return _languageCode ?? String()} set {_languageCode = newValue} } /// Returns true if `languageCode` has been explicitly set. public var hasLanguageCode: Bool {return self._languageCode != nil} /// Clears the value of `languageCode`. Subsequent reads from it will return its default value. public mutating func clearLanguageCode() {self._languageCode = nil} public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} fileprivate var _languageCode: String? = nil } /// Voice information public struct Appleintelligence_VoiceInfo: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var identifier: String = String() public var name: String = String() public var language: String = String() public var isPremium: Bool = false public var gender: String = String() public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } /// List voices response public struct Appleintelligence_ListVoicesResponse: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var voices: [Appleintelligence_VoiceInfo] = [] public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } /// STT Configuration public struct Appleintelligence_TranscriptionConfig: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var languageCode: String { get {return _languageCode ?? String()} set {_languageCode = newValue} } /// Returns true if `languageCode` has been explicitly set. public var hasLanguageCode: Bool {return self._languageCode != nil} /// Clears the value of `languageCode`. Subsequent reads from it will return its default value. public mutating func clearLanguageCode() {self._languageCode = nil} /// default true public var enablePunctuation: Bool { get {return _enablePunctuation ?? false} set {_enablePunctuation = newValue} } /// Returns true if `enablePunctuation` has been explicitly set. public var hasEnablePunctuation: Bool {return self._enablePunctuation != nil} /// Clears the value of `enablePunctuation`. Subsequent reads from it will return its default value. public mutating func clearEnablePunctuation() {self._enablePunctuation = nil} /// default false public var enableTimestamps: Bool { get {return _enableTimestamps ?? false} set {_enableTimestamps = newValue} } /// Returns true if `enableTimestamps` has been explicitly set. public var hasEnableTimestamps: Bool {return self._enableTimestamps != nil} /// Clears the value of `enableTimestamps`. Subsequent reads from it will return its default value. public mutating func clearEnableTimestamps() {self._enableTimestamps = nil} public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} fileprivate var _languageCode: String? = nil fileprivate var _enablePunctuation: Bool? = nil fileprivate var _enableTimestamps: Bool? = nil } /// Audio data for STT public struct Appleintelligence_AudioInput: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var data: Data = Data() /// "audio/wav", "audio/mp3", "audio/m4a" public var mimeType: String = String() public var sampleRate: Int32 { get {return _sampleRate ?? 0} set {_sampleRate = newValue} } /// Returns true if `sampleRate` has been explicitly set. public var hasSampleRate: Bool {return self._sampleRate != nil} /// Clears the value of `sampleRate`. Subsequent reads from it will return its default value. public mutating func clearSampleRate() {self._sampleRate = nil} public var channels: Int32 { get {return _channels ?? 0} set {_channels = newValue} } /// Returns true if `channels` has been explicitly set. public var hasChannels: Bool {return self._channels != nil} /// Clears the value of `channels`. Subsequent reads from it will return its default value. public mutating func clearChannels() {self._channels = nil} public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} fileprivate var _sampleRate: Int32? = nil fileprivate var _channels: Int32? = nil } /// File-based transcription request public struct Appleintelligence_TranscribeRequest: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var audio: Appleintelligence_AudioInput { get {return _audio ?? Appleintelligence_AudioInput()} set {_audio = newValue} } /// Returns true if `audio` has been explicitly set. public var hasAudio: Bool {return self._audio != nil} /// Clears the value of `audio`. Subsequent reads from it will return its default value. public mutating func clearAudio() {self._audio = nil} public var config: Appleintelligence_TranscriptionConfig { get {return _config ?? Appleintelligence_TranscriptionConfig()} set {_config = newValue} } /// Returns true if `config` has been explicitly set. public var hasConfig: Bool {return self._config != nil} /// Clears the value of `config`. Subsequent reads from it will return its default value. public mutating func clearConfig() {self._config = nil} public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} fileprivate var _audio: Appleintelligence_AudioInput? = nil fileprivate var _config: Appleintelligence_TranscriptionConfig? = nil } /// Transcription segment with timing public struct Appleintelligence_TranscriptionSegment: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var text: String = String() public var startTime: Float = 0 public var endTime: Float = 0 public var confidence: Float = 0 public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } /// Transcription response public struct Appleintelligence_TranscribeResponse: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var text: String = String() public var segments: [Appleintelligence_TranscriptionSegment] = [] public var detectedLanguage: String = String() public var confidence: Float = 0 public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } /// Streaming STT request chunk public struct Appleintelligence_StreamingTranscribeRequest: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var request: Appleintelligence_StreamingTranscribeRequest.OneOf_Request? = nil /// Send first to configure public var config: Appleintelligence_TranscriptionConfig { get { if case .config(let v)? = request {return v} return Appleintelligence_TranscriptionConfig() } set {request = .config(newValue)} } /// Subsequent audio chunks public var audioChunk: Data { get { if case .audioChunk(let v)? = request {return v} return Data() } set {request = .audioChunk(newValue)} } public var unknownFields = SwiftProtobuf.UnknownStorage() public enum OneOf_Request: Equatable, Sendable { /// Send first to configure case config(Appleintelligence_TranscriptionConfig) /// Subsequent audio chunks case audioChunk(Data) } public init() {} } /// Streaming STT response public struct Appleintelligence_StreamingTranscribeResponse: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. public var partialText: String = String() public var isFinal: Bool = false public var finalText: String = String() public var segments: [Appleintelligence_TranscriptionSegment] = [] public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} } // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "appleintelligence" extension Appleintelligence_AudioFormat: SwiftProtobuf._ProtoNameProviding { public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0AUDIO_FORMAT_UNSPECIFIED\0\u{1}AUDIO_FORMAT_WAV\0\u{1}AUDIO_FORMAT_MP3\0") } extension Appleintelligence_ImageData: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ImageData" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}data\0\u{1}filename\0\u{3}mime_type\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularBytesField(value: &self.data) }() case 2: try { try decoder.decodeSingularStringField(value: &self.filename) }() case 3: try { try decoder.decodeSingularStringField(value: &self.mimeType) }() default: break } } } public func traverse(visitor: inout V) throws { if !self.data.isEmpty { try visitor.visitSingularBytesField(value: self.data, fieldNumber: 1) } if !self.filename.isEmpty { try visitor.visitSingularStringField(value: self.filename, fieldNumber: 2) } if !self.mimeType.isEmpty { try visitor.visitSingularStringField(value: self.mimeType, fieldNumber: 3) } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_ImageData, rhs: Appleintelligence_ImageData) -> Bool { if lhs.data != rhs.data {return false} if lhs.filename != rhs.filename {return false} if lhs.mimeType != rhs.mimeType {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_ImageAnalysis: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ImageAnalysis" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}text_content\0\u{1}labels\0\u{1}description\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.textContent) }() case 2: try { try decoder.decodeRepeatedStringField(value: &self.labels) }() case 3: try { try decoder.decodeSingularStringField(value: &self.description_p) }() default: break } } } public func traverse(visitor: inout V) throws { if !self.textContent.isEmpty { try visitor.visitSingularStringField(value: self.textContent, fieldNumber: 1) } if !self.labels.isEmpty { try visitor.visitRepeatedStringField(value: self.labels, fieldNumber: 2) } if !self.description_p.isEmpty { try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 3) } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_ImageAnalysis, rhs: Appleintelligence_ImageAnalysis) -> Bool { if lhs.textContent != rhs.textContent {return false} if lhs.labels != rhs.labels {return false} if lhs.description_p != rhs.description_p {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_CompletionRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".CompletionRequest" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}prompt\0\u{1}temperature\0\u{3}max_tokens\0\u{1}images\0\u{3}include_analysis\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.prompt) }() case 2: try { try decoder.decodeSingularFloatField(value: &self._temperature) }() case 3: try { try decoder.decodeSingularInt32Field(value: &self._maxTokens) }() case 4: try { try decoder.decodeRepeatedMessageField(value: &self.images) }() case 5: try { try decoder.decodeSingularBoolField(value: &self.includeAnalysis) }() default: break } } } public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 if !self.prompt.isEmpty { try visitor.visitSingularStringField(value: self.prompt, fieldNumber: 1) } try { if let v = self._temperature { try visitor.visitSingularFloatField(value: v, fieldNumber: 2) } }() try { if let v = self._maxTokens { try visitor.visitSingularInt32Field(value: v, fieldNumber: 3) } }() if !self.images.isEmpty { try visitor.visitRepeatedMessageField(value: self.images, fieldNumber: 4) } if self.includeAnalysis != false { try visitor.visitSingularBoolField(value: self.includeAnalysis, fieldNumber: 5) } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_CompletionRequest, rhs: Appleintelligence_CompletionRequest) -> Bool { if lhs.prompt != rhs.prompt {return false} if lhs._temperature != rhs._temperature {return false} if lhs._maxTokens != rhs._maxTokens {return false} if lhs.images != rhs.images {return false} if lhs.includeAnalysis != rhs.includeAnalysis {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_CompletionResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".CompletionResponse" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0\u{1}text\0\u{3}finish_reason\0\u{3}image_analyses\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.id) }() case 2: try { try decoder.decodeSingularStringField(value: &self.text) }() case 3: try { try decoder.decodeSingularStringField(value: &self.finishReason) }() case 4: try { try decoder.decodeRepeatedMessageField(value: &self.imageAnalyses) }() default: break } } } public func traverse(visitor: inout V) throws { if !self.id.isEmpty { try visitor.visitSingularStringField(value: self.id, fieldNumber: 1) } if !self.text.isEmpty { try visitor.visitSingularStringField(value: self.text, fieldNumber: 2) } if !self.finishReason.isEmpty { try visitor.visitSingularStringField(value: self.finishReason, fieldNumber: 3) } if !self.imageAnalyses.isEmpty { try visitor.visitRepeatedMessageField(value: self.imageAnalyses, fieldNumber: 4) } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_CompletionResponse, rhs: Appleintelligence_CompletionResponse) -> Bool { if lhs.id != rhs.id {return false} if lhs.text != rhs.text {return false} if lhs.finishReason != rhs.finishReason {return false} if lhs.imageAnalyses != rhs.imageAnalyses {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_CompletionChunk: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".CompletionChunk" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}id\0\u{1}delta\0\u{3}is_final\0\u{3}finish_reason\0\u{3}image_analyses\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.id) }() case 2: try { try decoder.decodeSingularStringField(value: &self.delta) }() case 3: try { try decoder.decodeSingularBoolField(value: &self.isFinal) }() case 4: try { try decoder.decodeSingularStringField(value: &self.finishReason) }() case 5: try { try decoder.decodeRepeatedMessageField(value: &self.imageAnalyses) }() default: break } } } public func traverse(visitor: inout V) throws { if !self.id.isEmpty { try visitor.visitSingularStringField(value: self.id, fieldNumber: 1) } if !self.delta.isEmpty { try visitor.visitSingularStringField(value: self.delta, fieldNumber: 2) } if self.isFinal != false { try visitor.visitSingularBoolField(value: self.isFinal, fieldNumber: 3) } if !self.finishReason.isEmpty { try visitor.visitSingularStringField(value: self.finishReason, fieldNumber: 4) } if !self.imageAnalyses.isEmpty { try visitor.visitRepeatedMessageField(value: self.imageAnalyses, fieldNumber: 5) } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_CompletionChunk, rhs: Appleintelligence_CompletionChunk) -> Bool { if lhs.id != rhs.id {return false} if lhs.delta != rhs.delta {return false} if lhs.isFinal != rhs.isFinal {return false} if lhs.finishReason != rhs.finishReason {return false} if lhs.imageAnalyses != rhs.imageAnalyses {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_HealthRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".HealthRequest" public static let _protobuf_nameMap = SwiftProtobuf._NameMap() public mutating func decodeMessage(decoder: inout D) throws { // Load everything into unknown fields while try decoder.nextFieldNumber() != nil {} } public func traverse(visitor: inout V) throws { try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_HealthRequest, rhs: Appleintelligence_HealthRequest) -> Bool { if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_HealthResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".HealthResponse" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}healthy\0\u{3}model_status\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularBoolField(value: &self.healthy) }() case 2: try { try decoder.decodeSingularStringField(value: &self.modelStatus) }() default: break } } } public func traverse(visitor: inout V) throws { if self.healthy != false { try visitor.visitSingularBoolField(value: self.healthy, fieldNumber: 1) } if !self.modelStatus.isEmpty { try visitor.visitSingularStringField(value: self.modelStatus, fieldNumber: 2) } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_HealthResponse, rhs: Appleintelligence_HealthResponse) -> Bool { if lhs.healthy != rhs.healthy {return false} if lhs.modelStatus != rhs.modelStatus {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_VoiceConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".VoiceConfig" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}voice_identifier\0\u{3}speaking_rate\0\u{3}pitch_multiplier\0\u{1}volume\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.voiceIdentifier) }() case 2: try { try decoder.decodeSingularFloatField(value: &self._speakingRate) }() case 3: try { try decoder.decodeSingularFloatField(value: &self._pitchMultiplier) }() case 4: try { try decoder.decodeSingularFloatField(value: &self._volume) }() default: break } } } public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 if !self.voiceIdentifier.isEmpty { try visitor.visitSingularStringField(value: self.voiceIdentifier, fieldNumber: 1) } try { if let v = self._speakingRate { try visitor.visitSingularFloatField(value: v, fieldNumber: 2) } }() try { if let v = self._pitchMultiplier { try visitor.visitSingularFloatField(value: v, fieldNumber: 3) } }() try { if let v = self._volume { try visitor.visitSingularFloatField(value: v, fieldNumber: 4) } }() try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_VoiceConfig, rhs: Appleintelligence_VoiceConfig) -> Bool { if lhs.voiceIdentifier != rhs.voiceIdentifier {return false} if lhs._speakingRate != rhs._speakingRate {return false} if lhs._pitchMultiplier != rhs._pitchMultiplier {return false} if lhs._volume != rhs._volume {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_TextToSpeechRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".TextToSpeechRequest" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}text\0\u{3}output_format\0\u{3}voice_config\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.text) }() case 2: try { try decoder.decodeSingularEnumField(value: &self.outputFormat) }() case 3: try { try decoder.decodeSingularMessageField(value: &self._voiceConfig) }() default: break } } } public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 if !self.text.isEmpty { try visitor.visitSingularStringField(value: self.text, fieldNumber: 1) } if self.outputFormat != .unspecified { try visitor.visitSingularEnumField(value: self.outputFormat, fieldNumber: 2) } try { if let v = self._voiceConfig { try visitor.visitSingularMessageField(value: v, fieldNumber: 3) } }() try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_TextToSpeechRequest, rhs: Appleintelligence_TextToSpeechRequest) -> Bool { if lhs.text != rhs.text {return false} if lhs.outputFormat != rhs.outputFormat {return false} if lhs._voiceConfig != rhs._voiceConfig {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_TextToSpeechResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".TextToSpeechResponse" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}audio_data\0\u{1}format\0\u{3}sample_rate\0\u{1}channels\0\u{3}duration_seconds\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularBytesField(value: &self.audioData) }() case 2: try { try decoder.decodeSingularEnumField(value: &self.format) }() case 3: try { try decoder.decodeSingularInt32Field(value: &self.sampleRate) }() case 4: try { try decoder.decodeSingularInt32Field(value: &self.channels) }() case 5: try { try decoder.decodeSingularFloatField(value: &self.durationSeconds) }() default: break } } } public func traverse(visitor: inout V) throws { if !self.audioData.isEmpty { try visitor.visitSingularBytesField(value: self.audioData, fieldNumber: 1) } if self.format != .unspecified { try visitor.visitSingularEnumField(value: self.format, fieldNumber: 2) } if self.sampleRate != 0 { try visitor.visitSingularInt32Field(value: self.sampleRate, fieldNumber: 3) } if self.channels != 0 { try visitor.visitSingularInt32Field(value: self.channels, fieldNumber: 4) } if self.durationSeconds.bitPattern != 0 { try visitor.visitSingularFloatField(value: self.durationSeconds, fieldNumber: 5) } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_TextToSpeechResponse, rhs: Appleintelligence_TextToSpeechResponse) -> Bool { if lhs.audioData != rhs.audioData {return false} if lhs.format != rhs.format {return false} if lhs.sampleRate != rhs.sampleRate {return false} if lhs.channels != rhs.channels {return false} if lhs.durationSeconds != rhs.durationSeconds {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_ListVoicesRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ListVoicesRequest" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}language_code\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self._languageCode) }() default: break } } } public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 try { if let v = self._languageCode { try visitor.visitSingularStringField(value: v, fieldNumber: 1) } }() try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_ListVoicesRequest, rhs: Appleintelligence_ListVoicesRequest) -> Bool { if lhs._languageCode != rhs._languageCode {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_VoiceInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".VoiceInfo" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}identifier\0\u{1}name\0\u{1}language\0\u{3}is_premium\0\u{1}gender\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.identifier) }() case 2: try { try decoder.decodeSingularStringField(value: &self.name) }() case 3: try { try decoder.decodeSingularStringField(value: &self.language) }() case 4: try { try decoder.decodeSingularBoolField(value: &self.isPremium) }() case 5: try { try decoder.decodeSingularStringField(value: &self.gender) }() default: break } } } public func traverse(visitor: inout V) throws { if !self.identifier.isEmpty { try visitor.visitSingularStringField(value: self.identifier, fieldNumber: 1) } if !self.name.isEmpty { try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) } if !self.language.isEmpty { try visitor.visitSingularStringField(value: self.language, fieldNumber: 3) } if self.isPremium != false { try visitor.visitSingularBoolField(value: self.isPremium, fieldNumber: 4) } if !self.gender.isEmpty { try visitor.visitSingularStringField(value: self.gender, fieldNumber: 5) } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_VoiceInfo, rhs: Appleintelligence_VoiceInfo) -> Bool { if lhs.identifier != rhs.identifier {return false} if lhs.name != rhs.name {return false} if lhs.language != rhs.language {return false} if lhs.isPremium != rhs.isPremium {return false} if lhs.gender != rhs.gender {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_ListVoicesResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".ListVoicesResponse" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}voices\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeRepeatedMessageField(value: &self.voices) }() default: break } } } public func traverse(visitor: inout V) throws { if !self.voices.isEmpty { try visitor.visitRepeatedMessageField(value: self.voices, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_ListVoicesResponse, rhs: Appleintelligence_ListVoicesResponse) -> Bool { if lhs.voices != rhs.voices {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_TranscriptionConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".TranscriptionConfig" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}language_code\0\u{3}enable_punctuation\0\u{3}enable_timestamps\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self._languageCode) }() case 2: try { try decoder.decodeSingularBoolField(value: &self._enablePunctuation) }() case 3: try { try decoder.decodeSingularBoolField(value: &self._enableTimestamps) }() default: break } } } public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 try { if let v = self._languageCode { try visitor.visitSingularStringField(value: v, fieldNumber: 1) } }() try { if let v = self._enablePunctuation { try visitor.visitSingularBoolField(value: v, fieldNumber: 2) } }() try { if let v = self._enableTimestamps { try visitor.visitSingularBoolField(value: v, fieldNumber: 3) } }() try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_TranscriptionConfig, rhs: Appleintelligence_TranscriptionConfig) -> Bool { if lhs._languageCode != rhs._languageCode {return false} if lhs._enablePunctuation != rhs._enablePunctuation {return false} if lhs._enableTimestamps != rhs._enableTimestamps {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_AudioInput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".AudioInput" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}data\0\u{3}mime_type\0\u{3}sample_rate\0\u{1}channels\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularBytesField(value: &self.data) }() case 2: try { try decoder.decodeSingularStringField(value: &self.mimeType) }() case 3: try { try decoder.decodeSingularInt32Field(value: &self._sampleRate) }() case 4: try { try decoder.decodeSingularInt32Field(value: &self._channels) }() default: break } } } public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 if !self.data.isEmpty { try visitor.visitSingularBytesField(value: self.data, fieldNumber: 1) } if !self.mimeType.isEmpty { try visitor.visitSingularStringField(value: self.mimeType, fieldNumber: 2) } try { if let v = self._sampleRate { try visitor.visitSingularInt32Field(value: v, fieldNumber: 3) } }() try { if let v = self._channels { try visitor.visitSingularInt32Field(value: v, fieldNumber: 4) } }() try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_AudioInput, rhs: Appleintelligence_AudioInput) -> Bool { if lhs.data != rhs.data {return false} if lhs.mimeType != rhs.mimeType {return false} if lhs._sampleRate != rhs._sampleRate {return false} if lhs._channels != rhs._channels {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_TranscribeRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".TranscribeRequest" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}audio\0\u{1}config\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularMessageField(value: &self._audio) }() case 2: try { try decoder.decodeSingularMessageField(value: &self._config) }() default: break } } } public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 try { if let v = self._audio { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) } }() try { if let v = self._config { try visitor.visitSingularMessageField(value: v, fieldNumber: 2) } }() try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_TranscribeRequest, rhs: Appleintelligence_TranscribeRequest) -> Bool { if lhs._audio != rhs._audio {return false} if lhs._config != rhs._config {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_TranscriptionSegment: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".TranscriptionSegment" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}text\0\u{3}start_time\0\u{3}end_time\0\u{1}confidence\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.text) }() case 2: try { try decoder.decodeSingularFloatField(value: &self.startTime) }() case 3: try { try decoder.decodeSingularFloatField(value: &self.endTime) }() case 4: try { try decoder.decodeSingularFloatField(value: &self.confidence) }() default: break } } } public func traverse(visitor: inout V) throws { if !self.text.isEmpty { try visitor.visitSingularStringField(value: self.text, fieldNumber: 1) } if self.startTime.bitPattern != 0 { try visitor.visitSingularFloatField(value: self.startTime, fieldNumber: 2) } if self.endTime.bitPattern != 0 { try visitor.visitSingularFloatField(value: self.endTime, fieldNumber: 3) } if self.confidence.bitPattern != 0 { try visitor.visitSingularFloatField(value: self.confidence, fieldNumber: 4) } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_TranscriptionSegment, rhs: Appleintelligence_TranscriptionSegment) -> Bool { if lhs.text != rhs.text {return false} if lhs.startTime != rhs.startTime {return false} if lhs.endTime != rhs.endTime {return false} if lhs.confidence != rhs.confidence {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_TranscribeResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".TranscribeResponse" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}text\0\u{1}segments\0\u{3}detected_language\0\u{1}confidence\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.text) }() case 2: try { try decoder.decodeRepeatedMessageField(value: &self.segments) }() case 3: try { try decoder.decodeSingularStringField(value: &self.detectedLanguage) }() case 4: try { try decoder.decodeSingularFloatField(value: &self.confidence) }() default: break } } } public func traverse(visitor: inout V) throws { if !self.text.isEmpty { try visitor.visitSingularStringField(value: self.text, fieldNumber: 1) } if !self.segments.isEmpty { try visitor.visitRepeatedMessageField(value: self.segments, fieldNumber: 2) } if !self.detectedLanguage.isEmpty { try visitor.visitSingularStringField(value: self.detectedLanguage, fieldNumber: 3) } if self.confidence.bitPattern != 0 { try visitor.visitSingularFloatField(value: self.confidence, fieldNumber: 4) } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_TranscribeResponse, rhs: Appleintelligence_TranscribeResponse) -> Bool { if lhs.text != rhs.text {return false} if lhs.segments != rhs.segments {return false} if lhs.detectedLanguage != rhs.detectedLanguage {return false} if lhs.confidence != rhs.confidence {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_StreamingTranscribeRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".StreamingTranscribeRequest" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}config\0\u{3}audio_chunk\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { var v: Appleintelligence_TranscriptionConfig? var hadOneofValue = false if let current = self.request { hadOneofValue = true if case .config(let m) = current {v = m} } try decoder.decodeSingularMessageField(value: &v) if let v = v { if hadOneofValue {try decoder.handleConflictingOneOf()} self.request = .config(v) } }() case 2: try { var v: Data? try decoder.decodeSingularBytesField(value: &v) if let v = v { if self.request != nil {try decoder.handleConflictingOneOf()} self.request = .audioChunk(v) } }() default: break } } } public func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 switch self.request { case .config?: try { guard case .config(let v)? = self.request else { preconditionFailure() } try visitor.visitSingularMessageField(value: v, fieldNumber: 1) }() case .audioChunk?: try { guard case .audioChunk(let v)? = self.request else { preconditionFailure() } try visitor.visitSingularBytesField(value: v, fieldNumber: 2) }() case nil: break } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_StreamingTranscribeRequest, rhs: Appleintelligence_StreamingTranscribeRequest) -> Bool { if lhs.request != rhs.request {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Appleintelligence_StreamingTranscribeResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".StreamingTranscribeResponse" public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}partial_text\0\u{3}is_final\0\u{3}final_text\0\u{1}segments\0") public mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.partialText) }() case 2: try { try decoder.decodeSingularBoolField(value: &self.isFinal) }() case 3: try { try decoder.decodeSingularStringField(value: &self.finalText) }() case 4: try { try decoder.decodeRepeatedMessageField(value: &self.segments) }() default: break } } } public func traverse(visitor: inout V) throws { if !self.partialText.isEmpty { try visitor.visitSingularStringField(value: self.partialText, fieldNumber: 1) } if self.isFinal != false { try visitor.visitSingularBoolField(value: self.isFinal, fieldNumber: 2) } if !self.finalText.isEmpty { try visitor.visitSingularStringField(value: self.finalText, fieldNumber: 3) } if !self.segments.isEmpty { try visitor.visitRepeatedMessageField(value: self.segments, fieldNumber: 4) } try unknownFields.traverse(visitor: &visitor) } public static func ==(lhs: Appleintelligence_StreamingTranscribeResponse, rhs: Appleintelligence_StreamingTranscribeResponse) -> Bool { if lhs.partialText != rhs.partialText {return false} if lhs.isFinal != rhs.isFinal {return false} if lhs.finalText != rhs.finalText {return false} if lhs.segments != rhs.segments {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } }