session-ios/Session/Signal/OWSWebRTCDataProtos.pb.swift

318 lines
11 KiB
Swift

// DO NOT EDIT.
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: OWSWebRTCDataProtos.proto
//
// For information on using the generated types, please see the documenation:
// https://github.com/apple/swift-protobuf/
//*
// Copyright (C) 2014-2016 Open Whisper Systems
//
// Licensed according to the LICENSE file in this repository.
/// iOS - since we use a modern proto-compiler, we must specify
/// the legacy proto format.
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 your 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
}
struct WebRTCProtos_Connected {
// 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.
/// @required
var id: UInt64 {
get {return _id ?? 0}
set {_id = newValue}
}
/// Returns true if `id` has been explicitly set.
var hasID: Bool {return self._id != nil}
/// Clears the value of `id`. Subsequent reads from it will return its default value.
mutating func clearID() {self._id = nil}
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _id: UInt64? = nil
}
struct WebRTCProtos_Hangup {
// 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.
/// @required
var id: UInt64 {
get {return _id ?? 0}
set {_id = newValue}
}
/// Returns true if `id` has been explicitly set.
var hasID: Bool {return self._id != nil}
/// Clears the value of `id`. Subsequent reads from it will return its default value.
mutating func clearID() {self._id = nil}
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _id: UInt64? = nil
}
struct WebRTCProtos_VideoStreamingStatus {
// 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.
/// @required
var id: UInt64 {
get {return _id ?? 0}
set {_id = newValue}
}
/// Returns true if `id` has been explicitly set.
var hasID: Bool {return self._id != nil}
/// Clears the value of `id`. Subsequent reads from it will return its default value.
mutating func clearID() {self._id = nil}
var enabled: Bool {
get {return _enabled ?? false}
set {_enabled = newValue}
}
/// Returns true if `enabled` has been explicitly set.
var hasEnabled: Bool {return self._enabled != nil}
/// Clears the value of `enabled`. Subsequent reads from it will return its default value.
mutating func clearEnabled() {self._enabled = nil}
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _id: UInt64? = nil
fileprivate var _enabled: Bool? = nil
}
struct WebRTCProtos_Data {
// 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.
var connected: WebRTCProtos_Connected {
get {return _storage._connected ?? WebRTCProtos_Connected()}
set {_uniqueStorage()._connected = newValue}
}
/// Returns true if `connected` has been explicitly set.
var hasConnected: Bool {return _storage._connected != nil}
/// Clears the value of `connected`. Subsequent reads from it will return its default value.
mutating func clearConnected() {_storage._connected = nil}
var hangup: WebRTCProtos_Hangup {
get {return _storage._hangup ?? WebRTCProtos_Hangup()}
set {_uniqueStorage()._hangup = newValue}
}
/// Returns true if `hangup` has been explicitly set.
var hasHangup: Bool {return _storage._hangup != nil}
/// Clears the value of `hangup`. Subsequent reads from it will return its default value.
mutating func clearHangup() {_storage._hangup = nil}
var videoStreamingStatus: WebRTCProtos_VideoStreamingStatus {
get {return _storage._videoStreamingStatus ?? WebRTCProtos_VideoStreamingStatus()}
set {_uniqueStorage()._videoStreamingStatus = newValue}
}
/// Returns true if `videoStreamingStatus` has been explicitly set.
var hasVideoStreamingStatus: Bool {return _storage._videoStreamingStatus != nil}
/// Clears the value of `videoStreamingStatus`. Subsequent reads from it will return its default value.
mutating func clearVideoStreamingStatus() {_storage._videoStreamingStatus = nil}
var unknownFields = SwiftProtobuf.UnknownStorage()
init() {}
fileprivate var _storage = _StorageClass.defaultInstance
}
// MARK: - Code below here is support for the SwiftProtobuf runtime.
fileprivate let _protobuf_package = "WebRTCProtos"
extension WebRTCProtos_Connected: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".Connected"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "id"),
]
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
switch fieldNumber {
case 1: try decoder.decodeSingularUInt64Field(value: &self._id)
default: break
}
}
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if let v = self._id {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
}
try unknownFields.traverse(visitor: &visitor)
}
func _protobuf_generated_isEqualTo(other: WebRTCProtos_Connected) -> Bool {
if self._id != other._id {return false}
if unknownFields != other.unknownFields {return false}
return true
}
}
extension WebRTCProtos_Hangup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".Hangup"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "id"),
]
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
switch fieldNumber {
case 1: try decoder.decodeSingularUInt64Field(value: &self._id)
default: break
}
}
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if let v = self._id {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
}
try unknownFields.traverse(visitor: &visitor)
}
func _protobuf_generated_isEqualTo(other: WebRTCProtos_Hangup) -> Bool {
if self._id != other._id {return false}
if unknownFields != other.unknownFields {return false}
return true
}
}
extension WebRTCProtos_VideoStreamingStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".VideoStreamingStatus"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "id"),
2: .same(proto: "enabled"),
]
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
switch fieldNumber {
case 1: try decoder.decodeSingularUInt64Field(value: &self._id)
case 2: try decoder.decodeSingularBoolField(value: &self._enabled)
default: break
}
}
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if let v = self._id {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
}
if let v = self._enabled {
try visitor.visitSingularBoolField(value: v, fieldNumber: 2)
}
try unknownFields.traverse(visitor: &visitor)
}
func _protobuf_generated_isEqualTo(other: WebRTCProtos_VideoStreamingStatus) -> Bool {
if self._id != other._id {return false}
if self._enabled != other._enabled {return false}
if unknownFields != other.unknownFields {return false}
return true
}
}
extension WebRTCProtos_Data: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
static let protoMessageName: String = _protobuf_package + ".Data"
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "connected"),
2: .same(proto: "hangup"),
3: .same(proto: "videoStreamingStatus"),
]
fileprivate class _StorageClass {
var _connected: WebRTCProtos_Connected? = nil
var _hangup: WebRTCProtos_Hangup? = nil
var _videoStreamingStatus: WebRTCProtos_VideoStreamingStatus? = nil
static let defaultInstance = _StorageClass()
private init() {}
init(copying source: _StorageClass) {
_connected = source._connected
_hangup = source._hangup
_videoStreamingStatus = source._videoStreamingStatus
}
}
fileprivate mutating func _uniqueStorage() -> _StorageClass {
if !isKnownUniquelyReferenced(&_storage) {
_storage = _StorageClass(copying: _storage)
}
return _storage
}
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
_ = _uniqueStorage()
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
while let fieldNumber = try decoder.nextFieldNumber() {
switch fieldNumber {
case 1: try decoder.decodeSingularMessageField(value: &_storage._connected)
case 2: try decoder.decodeSingularMessageField(value: &_storage._hangup)
case 3: try decoder.decodeSingularMessageField(value: &_storage._videoStreamingStatus)
default: break
}
}
}
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
if let v = _storage._connected {
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
}
if let v = _storage._hangup {
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
}
if let v = _storage._videoStreamingStatus {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
}
}
try unknownFields.traverse(visitor: &visitor)
}
func _protobuf_generated_isEqualTo(other: WebRTCProtos_Data) -> Bool {
if _storage !== other._storage {
let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
let _storage = _args.0
let other_storage = _args.1
if _storage._connected != other_storage._connected {return false}
if _storage._hangup != other_storage._hangup {return false}
if _storage._videoStreamingStatus != other_storage._videoStreamingStatus {return false}
return true
}
if !storagesAreEqual {return false}
}
if unknownFields != other.unknownFields {return false}
return true
}
}