Path: blob/main/SignalServiceKit/Protos/Generated/CallQualitySurvey.pb.swift
1 views
// DO NOT EDIT.
// swift-format-ignore-file
// swiftlint:disable all
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: CallQualitySurvey.proto
//
// For information on using the generated types, please see the documentation:
// https://github.com/apple/swift-protobuf/
//
// Copyright 2025 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
#if canImport(FoundationEssentials)
public import FoundationEssentials
#else
public import Foundation
#endif
public 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
}
public struct CallQualitySurveyProtos_SubmitCallQualitySurveyRequest: @unchecked 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.
/// Indicates whether the caller was generally satisfied with the quality of
/// the call
public var userSatisfied: Bool {
get {_storage._userSatisfied}
set {_uniqueStorage()._userSatisfied = newValue}
}
/// A list of call quality issues selected by the caller
public var callQualityIssues: [String] {
get {_storage._callQualityIssues}
set {_uniqueStorage()._callQualityIssues = newValue}
}
/// A free-form description of any additional issues as written by the caller
public var additionalIssuesDescription: String {
get {_storage._additionalIssuesDescription ?? String()}
set {_uniqueStorage()._additionalIssuesDescription = newValue}
}
/// Returns true if `additionalIssuesDescription` has been explicitly set.
public var hasAdditionalIssuesDescription: Bool {_storage._additionalIssuesDescription != nil}
/// Clears the value of `additionalIssuesDescription`. Subsequent reads from it will return its default value.
public mutating func clearAdditionalIssuesDescription() {_uniqueStorage()._additionalIssuesDescription = nil}
/// A URL for a set of debug logs associated with the call if the caller chose
/// to submit debug logs
public var debugLogURL: String {
get {_storage._debugLogURL ?? String()}
set {_uniqueStorage()._debugLogURL = newValue}
}
/// Returns true if `debugLogURL` has been explicitly set.
public var hasDebugLogURL: Bool {_storage._debugLogURL != nil}
/// Clears the value of `debugLogURL`. Subsequent reads from it will return its default value.
public mutating func clearDebugLogURL() {_uniqueStorage()._debugLogURL = nil}
/// The time at which the call started in milliseconds since the epoch
public var startTimestamp: Int64 {
get {_storage._startTimestamp}
set {_uniqueStorage()._startTimestamp = newValue}
}
/// The time at which the call ended in milliseconds since the epoch
public var endTimestamp: Int64 {
get {_storage._endTimestamp}
set {_uniqueStorage()._endTimestamp = newValue}
}
/// The type of call; note that direct voice calls can become video calls and
/// vice versa, and this field indicates which mode was selected at call
/// initiation time. At the time of writing, expected call types are
/// "direct_voice", "direct_video", "group", and "call_link".
public var callType: String {
get {_storage._callType}
set {_uniqueStorage()._callType = newValue}
}
/// Indicates whether the call completed without error or if it terminated
/// abnormally
public var success: Bool {
get {_storage._success}
set {_uniqueStorage()._success = newValue}
}
/// A client-defined, but human-readable reason for call termination
public var callEndReason: String {
get {_storage._callEndReason}
set {_uniqueStorage()._callEndReason = newValue}
}
/// The median round-trip time, measured in milliseconds, for STUN/ICE packets
/// (i.e. connection maintenance and establishment)
public var connectionRttMedian: Float {
get {_storage._connectionRttMedian ?? 0}
set {_uniqueStorage()._connectionRttMedian = newValue}
}
/// Returns true if `connectionRttMedian` has been explicitly set.
public var hasConnectionRttMedian: Bool {_storage._connectionRttMedian != nil}
/// Clears the value of `connectionRttMedian`. Subsequent reads from it will return its default value.
public mutating func clearConnectionRttMedian() {_uniqueStorage()._connectionRttMedian = nil}
/// The median round-trip time, measured in milliseconds, for RTP/RTCP packets
/// for audio streams
public var audioRttMedian: Float {
get {_storage._audioRttMedian ?? 0}
set {_uniqueStorage()._audioRttMedian = newValue}
}
/// Returns true if `audioRttMedian` has been explicitly set.
public var hasAudioRttMedian: Bool {_storage._audioRttMedian != nil}
/// Clears the value of `audioRttMedian`. Subsequent reads from it will return its default value.
public mutating func clearAudioRttMedian() {_uniqueStorage()._audioRttMedian = nil}
/// The median round-trip time, measured in milliseconds, for RTP/RTCP packets
/// for video streams
public var videoRttMedian: Float {
get {_storage._videoRttMedian ?? 0}
set {_uniqueStorage()._videoRttMedian = newValue}
}
/// Returns true if `videoRttMedian` has been explicitly set.
public var hasVideoRttMedian: Bool {_storage._videoRttMedian != nil}
/// Clears the value of `videoRttMedian`. Subsequent reads from it will return its default value.
public mutating func clearVideoRttMedian() {_uniqueStorage()._videoRttMedian = nil}
/// The median jitter for audio streams, measured in milliseconds, for the
/// duration of the call as measured by the client submitting the survey
public var audioRecvJitterMedian: Float {
get {_storage._audioRecvJitterMedian ?? 0}
set {_uniqueStorage()._audioRecvJitterMedian = newValue}
}
/// Returns true if `audioRecvJitterMedian` has been explicitly set.
public var hasAudioRecvJitterMedian: Bool {_storage._audioRecvJitterMedian != nil}
/// Clears the value of `audioRecvJitterMedian`. Subsequent reads from it will return its default value.
public mutating func clearAudioRecvJitterMedian() {_uniqueStorage()._audioRecvJitterMedian = nil}
/// The median jitter for video streams, measured in milliseconds, for the
/// duration of the call as measured by the client submitting the survey
public var videoRecvJitterMedian: Float {
get {_storage._videoRecvJitterMedian ?? 0}
set {_uniqueStorage()._videoRecvJitterMedian = newValue}
}
/// Returns true if `videoRecvJitterMedian` has been explicitly set.
public var hasVideoRecvJitterMedian: Bool {_storage._videoRecvJitterMedian != nil}
/// Clears the value of `videoRecvJitterMedian`. Subsequent reads from it will return its default value.
public mutating func clearVideoRecvJitterMedian() {_uniqueStorage()._videoRecvJitterMedian = nil}
/// The median jitter for audio streams, measured in milliseconds, for the
/// duration of the call as measured by the remote endpoint in the call (either
/// the peer of the client submitting the survey in a direct call or the SFU in
/// a group call)
public var audioSendJitterMedian: Float {
get {_storage._audioSendJitterMedian ?? 0}
set {_uniqueStorage()._audioSendJitterMedian = newValue}
}
/// Returns true if `audioSendJitterMedian` has been explicitly set.
public var hasAudioSendJitterMedian: Bool {_storage._audioSendJitterMedian != nil}
/// Clears the value of `audioSendJitterMedian`. Subsequent reads from it will return its default value.
public mutating func clearAudioSendJitterMedian() {_uniqueStorage()._audioSendJitterMedian = nil}
/// The median jitter for video streams, measured in milliseconds, for the
/// duration of the call as measured by the remote endpoint in the call (either
/// the peer of the client submitting the survey in a direct call or the SFU in
/// a group call)
public var videoSendJitterMedian: Float {
get {_storage._videoSendJitterMedian ?? 0}
set {_uniqueStorage()._videoSendJitterMedian = newValue}
}
/// Returns true if `videoSendJitterMedian` has been explicitly set.
public var hasVideoSendJitterMedian: Bool {_storage._videoSendJitterMedian != nil}
/// Clears the value of `videoSendJitterMedian`. Subsequent reads from it will return its default value.
public mutating func clearVideoSendJitterMedian() {_uniqueStorage()._videoSendJitterMedian = nil}
/// The fraction of audio packets lost over the duration of the call as
/// measured by the client submitting the survey
public var audioRecvPacketLossFraction: Float {
get {_storage._audioRecvPacketLossFraction ?? 0}
set {_uniqueStorage()._audioRecvPacketLossFraction = newValue}
}
/// Returns true if `audioRecvPacketLossFraction` has been explicitly set.
public var hasAudioRecvPacketLossFraction: Bool {_storage._audioRecvPacketLossFraction != nil}
/// Clears the value of `audioRecvPacketLossFraction`. Subsequent reads from it will return its default value.
public mutating func clearAudioRecvPacketLossFraction() {_uniqueStorage()._audioRecvPacketLossFraction = nil}
/// The fraction of video packets lost over the duration of the call as
/// measured by the client submitting the survey
public var videoRecvPacketLossFraction: Float {
get {_storage._videoRecvPacketLossFraction ?? 0}
set {_uniqueStorage()._videoRecvPacketLossFraction = newValue}
}
/// Returns true if `videoRecvPacketLossFraction` has been explicitly set.
public var hasVideoRecvPacketLossFraction: Bool {_storage._videoRecvPacketLossFraction != nil}
/// Clears the value of `videoRecvPacketLossFraction`. Subsequent reads from it will return its default value.
public mutating func clearVideoRecvPacketLossFraction() {_uniqueStorage()._videoRecvPacketLossFraction = nil}
/// The fraction of audio packets lost over the duration of the call as
/// measured by the remote endpoint in the call (either the peer of the client
/// submitting the survey in a direct call or the SFU in a group call)
public var audioSendPacketLossFraction: Float {
get {_storage._audioSendPacketLossFraction ?? 0}
set {_uniqueStorage()._audioSendPacketLossFraction = newValue}
}
/// Returns true if `audioSendPacketLossFraction` has been explicitly set.
public var hasAudioSendPacketLossFraction: Bool {_storage._audioSendPacketLossFraction != nil}
/// Clears the value of `audioSendPacketLossFraction`. Subsequent reads from it will return its default value.
public mutating func clearAudioSendPacketLossFraction() {_uniqueStorage()._audioSendPacketLossFraction = nil}
/// The fraction of video packets lost over the duration of the call as
/// measured by the remote endpoint in the call (either the peer of the client
/// submitting the survey in a direct call or the SFU in a group call)
public var videoSendPacketLossFraction: Float {
get {_storage._videoSendPacketLossFraction ?? 0}
set {_uniqueStorage()._videoSendPacketLossFraction = newValue}
}
/// Returns true if `videoSendPacketLossFraction` has been explicitly set.
public var hasVideoSendPacketLossFraction: Bool {_storage._videoSendPacketLossFraction != nil}
/// Clears the value of `videoSendPacketLossFraction`. Subsequent reads from it will return its default value.
public mutating func clearVideoSendPacketLossFraction() {_uniqueStorage()._videoSendPacketLossFraction = nil}
/// Machine-generated telemetry from the call; this is a serialized protobuf
/// entity generated (and, critically, explained to the user!) by the calling
/// library
public var callTelemetry: Data {
get {_storage._callTelemetry ?? Data()}
set {_uniqueStorage()._callTelemetry = newValue}
}
/// Returns true if `callTelemetry` has been explicitly set.
public var hasCallTelemetry: Bool {_storage._callTelemetry != nil}
/// Clears the value of `callTelemetry`. Subsequent reads from it will return its default value.
public mutating func clearCallTelemetry() {_uniqueStorage()._callTelemetry = nil}
public var unknownFields = SwiftProtobuf.UnknownStorage()
public init() {}
fileprivate var _storage = _StorageClass.defaultInstance
}
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "CallQualitySurveyProtos"
extension CallQualitySurveyProtos_SubmitCallQualitySurveyRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".SubmitCallQualitySurveyRequest"
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}user_satisfied\0\u{3}call_quality_issues\0\u{3}additional_issues_description\0\u{3}debug_log_url\0\u{3}start_timestamp\0\u{3}end_timestamp\0\u{3}call_type\0\u{1}success\0\u{3}call_end_reason\0\u{3}connection_rtt_median\0\u{3}audio_rtt_median\0\u{3}video_rtt_median\0\u{3}audio_recv_jitter_median\0\u{3}video_recv_jitter_median\0\u{3}audio_send_jitter_median\0\u{3}video_send_jitter_median\0\u{3}audio_recv_packet_loss_fraction\0\u{3}video_recv_packet_loss_fraction\0\u{3}audio_send_packet_loss_fraction\0\u{3}video_send_packet_loss_fraction\0\u{3}call_telemetry\0")
fileprivate class _StorageClass {
var _userSatisfied: Bool = false
var _callQualityIssues: [String] = []
var _additionalIssuesDescription: String? = nil
var _debugLogURL: String? = nil
var _startTimestamp: Int64 = 0
var _endTimestamp: Int64 = 0
var _callType: String = String()
var _success: Bool = false
var _callEndReason: String = String()
var _connectionRttMedian: Float? = nil
var _audioRttMedian: Float? = nil
var _videoRttMedian: Float? = nil
var _audioRecvJitterMedian: Float? = nil
var _videoRecvJitterMedian: Float? = nil
var _audioSendJitterMedian: Float? = nil
var _videoSendJitterMedian: Float? = nil
var _audioRecvPacketLossFraction: Float? = nil
var _videoRecvPacketLossFraction: Float? = nil
var _audioSendPacketLossFraction: Float? = nil
var _videoSendPacketLossFraction: Float? = nil
var _callTelemetry: Data? = nil
// This property is used as the initial default value for new instances of the type.
// The type itself is protecting the reference to its storage via CoW semantics.
// This will force a copy to be made of this reference when the first mutation occurs;
// hence, it is safe to mark this as `nonisolated(unsafe)`.
static nonisolated(unsafe) let defaultInstance = _StorageClass()
private init() {}
init(copying source: _StorageClass) {
_userSatisfied = source._userSatisfied
_callQualityIssues = source._callQualityIssues
_additionalIssuesDescription = source._additionalIssuesDescription
_debugLogURL = source._debugLogURL
_startTimestamp = source._startTimestamp
_endTimestamp = source._endTimestamp
_callType = source._callType
_success = source._success
_callEndReason = source._callEndReason
_connectionRttMedian = source._connectionRttMedian
_audioRttMedian = source._audioRttMedian
_videoRttMedian = source._videoRttMedian
_audioRecvJitterMedian = source._audioRecvJitterMedian
_videoRecvJitterMedian = source._videoRecvJitterMedian
_audioSendJitterMedian = source._audioSendJitterMedian
_videoSendJitterMedian = source._videoSendJitterMedian
_audioRecvPacketLossFraction = source._audioRecvPacketLossFraction
_videoRecvPacketLossFraction = source._videoRecvPacketLossFraction
_audioSendPacketLossFraction = source._audioSendPacketLossFraction
_videoSendPacketLossFraction = source._videoSendPacketLossFraction
_callTelemetry = source._callTelemetry
}
}
fileprivate mutating func _uniqueStorage() -> _StorageClass {
if !isKnownUniquelyReferenced(&_storage) {
_storage = _StorageClass(copying: _storage)
}
return _storage
}
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
_ = _uniqueStorage()
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
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: &_storage._userSatisfied) }()
case 2: try { try decoder.decodeRepeatedStringField(value: &_storage._callQualityIssues) }()
case 3: try { try decoder.decodeSingularStringField(value: &_storage._additionalIssuesDescription) }()
case 4: try { try decoder.decodeSingularStringField(value: &_storage._debugLogURL) }()
case 5: try { try decoder.decodeSingularInt64Field(value: &_storage._startTimestamp) }()
case 6: try { try decoder.decodeSingularInt64Field(value: &_storage._endTimestamp) }()
case 7: try { try decoder.decodeSingularStringField(value: &_storage._callType) }()
case 8: try { try decoder.decodeSingularBoolField(value: &_storage._success) }()
case 9: try { try decoder.decodeSingularStringField(value: &_storage._callEndReason) }()
case 10: try { try decoder.decodeSingularFloatField(value: &_storage._connectionRttMedian) }()
case 11: try { try decoder.decodeSingularFloatField(value: &_storage._audioRttMedian) }()
case 12: try { try decoder.decodeSingularFloatField(value: &_storage._videoRttMedian) }()
case 13: try { try decoder.decodeSingularFloatField(value: &_storage._audioRecvJitterMedian) }()
case 14: try { try decoder.decodeSingularFloatField(value: &_storage._videoRecvJitterMedian) }()
case 15: try { try decoder.decodeSingularFloatField(value: &_storage._audioSendJitterMedian) }()
case 16: try { try decoder.decodeSingularFloatField(value: &_storage._videoSendJitterMedian) }()
case 17: try { try decoder.decodeSingularFloatField(value: &_storage._audioRecvPacketLossFraction) }()
case 18: try { try decoder.decodeSingularFloatField(value: &_storage._videoRecvPacketLossFraction) }()
case 19: try { try decoder.decodeSingularFloatField(value: &_storage._audioSendPacketLossFraction) }()
case 20: try { try decoder.decodeSingularFloatField(value: &_storage._videoSendPacketLossFraction) }()
case 21: try { try decoder.decodeSingularBytesField(value: &_storage._callTelemetry) }()
default: break
}
}
}
}
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
// 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 _storage._userSatisfied != false {
try visitor.visitSingularBoolField(value: _storage._userSatisfied, fieldNumber: 1)
}
if !_storage._callQualityIssues.isEmpty {
try visitor.visitRepeatedStringField(value: _storage._callQualityIssues, fieldNumber: 2)
}
try { if let v = _storage._additionalIssuesDescription {
try visitor.visitSingularStringField(value: v, fieldNumber: 3)
} }()
try { if let v = _storage._debugLogURL {
try visitor.visitSingularStringField(value: v, fieldNumber: 4)
} }()
if _storage._startTimestamp != 0 {
try visitor.visitSingularInt64Field(value: _storage._startTimestamp, fieldNumber: 5)
}
if _storage._endTimestamp != 0 {
try visitor.visitSingularInt64Field(value: _storage._endTimestamp, fieldNumber: 6)
}
if !_storage._callType.isEmpty {
try visitor.visitSingularStringField(value: _storage._callType, fieldNumber: 7)
}
if _storage._success != false {
try visitor.visitSingularBoolField(value: _storage._success, fieldNumber: 8)
}
if !_storage._callEndReason.isEmpty {
try visitor.visitSingularStringField(value: _storage._callEndReason, fieldNumber: 9)
}
try { if let v = _storage._connectionRttMedian {
try visitor.visitSingularFloatField(value: v, fieldNumber: 10)
} }()
try { if let v = _storage._audioRttMedian {
try visitor.visitSingularFloatField(value: v, fieldNumber: 11)
} }()
try { if let v = _storage._videoRttMedian {
try visitor.visitSingularFloatField(value: v, fieldNumber: 12)
} }()
try { if let v = _storage._audioRecvJitterMedian {
try visitor.visitSingularFloatField(value: v, fieldNumber: 13)
} }()
try { if let v = _storage._videoRecvJitterMedian {
try visitor.visitSingularFloatField(value: v, fieldNumber: 14)
} }()
try { if let v = _storage._audioSendJitterMedian {
try visitor.visitSingularFloatField(value: v, fieldNumber: 15)
} }()
try { if let v = _storage._videoSendJitterMedian {
try visitor.visitSingularFloatField(value: v, fieldNumber: 16)
} }()
try { if let v = _storage._audioRecvPacketLossFraction {
try visitor.visitSingularFloatField(value: v, fieldNumber: 17)
} }()
try { if let v = _storage._videoRecvPacketLossFraction {
try visitor.visitSingularFloatField(value: v, fieldNumber: 18)
} }()
try { if let v = _storage._audioSendPacketLossFraction {
try visitor.visitSingularFloatField(value: v, fieldNumber: 19)
} }()
try { if let v = _storage._videoSendPacketLossFraction {
try visitor.visitSingularFloatField(value: v, fieldNumber: 20)
} }()
try { if let v = _storage._callTelemetry {
try visitor.visitSingularBytesField(value: v, fieldNumber: 21)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
public static func ==(lhs: CallQualitySurveyProtos_SubmitCallQualitySurveyRequest, rhs: CallQualitySurveyProtos_SubmitCallQualitySurveyRequest) -> Bool {
if lhs._storage !== rhs._storage {
let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
let _storage = _args.0
let rhs_storage = _args.1
if _storage._userSatisfied != rhs_storage._userSatisfied {return false}
if _storage._callQualityIssues != rhs_storage._callQualityIssues {return false}
if _storage._additionalIssuesDescription != rhs_storage._additionalIssuesDescription {return false}
if _storage._debugLogURL != rhs_storage._debugLogURL {return false}
if _storage._startTimestamp != rhs_storage._startTimestamp {return false}
if _storage._endTimestamp != rhs_storage._endTimestamp {return false}
if _storage._callType != rhs_storage._callType {return false}
if _storage._success != rhs_storage._success {return false}
if _storage._callEndReason != rhs_storage._callEndReason {return false}
if _storage._connectionRttMedian != rhs_storage._connectionRttMedian {return false}
if _storage._audioRttMedian != rhs_storage._audioRttMedian {return false}
if _storage._videoRttMedian != rhs_storage._videoRttMedian {return false}
if _storage._audioRecvJitterMedian != rhs_storage._audioRecvJitterMedian {return false}
if _storage._videoRecvJitterMedian != rhs_storage._videoRecvJitterMedian {return false}
if _storage._audioSendJitterMedian != rhs_storage._audioSendJitterMedian {return false}
if _storage._videoSendJitterMedian != rhs_storage._videoSendJitterMedian {return false}
if _storage._audioRecvPacketLossFraction != rhs_storage._audioRecvPacketLossFraction {return false}
if _storage._videoRecvPacketLossFraction != rhs_storage._videoRecvPacketLossFraction {return false}
if _storage._audioSendPacketLossFraction != rhs_storage._audioSendPacketLossFraction {return false}
if _storage._videoSendPacketLossFraction != rhs_storage._videoSendPacketLossFraction {return false}
if _storage._callTelemetry != rhs_storage._callTelemetry {return false}
return true
}
if !storagesAreEqual {return false}
}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}