mirror of
https://github.com/whoeevee/EeveeSpotifyReborn.git
synced 2026-01-09 00:23:20 +01:00
568 lines
21 KiB
Swift
568 lines
21 KiB
Swift
// DO NOT EDIT.
|
|
// swift-format-ignore-file
|
|
// swiftlint:disable all
|
|
//
|
|
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
|
// Source: SpotifyPlan.proto
|
|
//
|
|
// For information on using the generated types, please see the documentation:
|
|
// https://github.com/apple/swift-protobuf/
|
|
|
|
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
|
|
}
|
|
|
|
struct SpotifyPlan: 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.
|
|
|
|
var subscription: SpotifyPlan.SubscriptionInfo {
|
|
get {return _subscription ?? SpotifyPlan.SubscriptionInfo()}
|
|
set {_subscription = newValue}
|
|
}
|
|
/// Returns true if `subscription` has been explicitly set.
|
|
var hasSubscription: Bool {return self._subscription != nil}
|
|
/// Clears the value of `subscription`. Subsequent reads from it will return its default value.
|
|
mutating func clearSubscription() {self._subscription = nil}
|
|
|
|
var notice: SpotifyPlan.Notice {
|
|
get {return _notice ?? SpotifyPlan.Notice()}
|
|
set {_notice = newValue}
|
|
}
|
|
/// Returns true if `notice` has been explicitly set.
|
|
var hasNotice: Bool {return self._notice != nil}
|
|
/// Clears the value of `notice`. Subsequent reads from it will return its default value.
|
|
mutating func clearNotice() {self._notice = nil}
|
|
|
|
var actions: [SpotifyPlan.Action] = []
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
enum IconType: SwiftProtobuf.Enum, Swift.CaseIterable {
|
|
typealias RawValue = Int
|
|
case unspecifiedIcon // = 0
|
|
case check // = 1
|
|
case chevron // = 2
|
|
case ads // = 3
|
|
case offline // = 4
|
|
case arrow // = 5
|
|
case UNRECOGNIZED(Int)
|
|
|
|
init() {
|
|
self = .unspecifiedIcon
|
|
}
|
|
|
|
init?(rawValue: Int) {
|
|
switch rawValue {
|
|
case 0: self = .unspecifiedIcon
|
|
case 1: self = .check
|
|
case 2: self = .chevron
|
|
case 3: self = .ads
|
|
case 4: self = .offline
|
|
case 5: self = .arrow
|
|
default: self = .UNRECOGNIZED(rawValue)
|
|
}
|
|
}
|
|
|
|
var rawValue: Int {
|
|
switch self {
|
|
case .unspecifiedIcon: return 0
|
|
case .check: return 1
|
|
case .chevron: return 2
|
|
case .ads: return 3
|
|
case .offline: return 4
|
|
case .arrow: return 5
|
|
case .UNRECOGNIZED(let i): return i
|
|
}
|
|
}
|
|
|
|
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
|
static let allCases: [SpotifyPlan.IconType] = [
|
|
.unspecifiedIcon,
|
|
.check,
|
|
.chevron,
|
|
.ads,
|
|
.offline,
|
|
.arrow,
|
|
]
|
|
|
|
}
|
|
|
|
struct SubscriptionInfo: 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.
|
|
|
|
var planType: Int32 = 0
|
|
|
|
var planVariant: Int32 = 0
|
|
|
|
var planName: String = String()
|
|
|
|
var planCategory: String = String()
|
|
|
|
var colorCode: String = String()
|
|
|
|
var backgroundImageURL: String = String()
|
|
|
|
var features: [SpotifyPlan.Feature] = []
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
init() {}
|
|
}
|
|
|
|
struct Feature: 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.
|
|
|
|
var icon: SpotifyPlan.IconType = .unspecifiedIcon
|
|
|
|
var description_p: String = String()
|
|
|
|
var color: String = String()
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
init() {}
|
|
}
|
|
|
|
struct Notice: 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.
|
|
|
|
var message: String = String()
|
|
|
|
var timestamp: Int64 = 0
|
|
|
|
var status: Int32 = 0
|
|
|
|
var settings: SpotifyPlan.Settings {
|
|
get {return _settings ?? SpotifyPlan.Settings()}
|
|
set {_settings = newValue}
|
|
}
|
|
/// Returns true if `settings` has been explicitly set.
|
|
var hasSettings: Bool {return self._settings != nil}
|
|
/// Clears the value of `settings`. Subsequent reads from it will return its default value.
|
|
mutating func clearSettings() {self._settings = nil}
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
init() {}
|
|
|
|
fileprivate var _settings: SpotifyPlan.Settings? = nil
|
|
}
|
|
|
|
struct Settings: 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.
|
|
|
|
var autoRenew: Int32 = 0
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
init() {}
|
|
}
|
|
|
|
struct Action: 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.
|
|
|
|
var actionID: Int32 = 0
|
|
|
|
var details: SpotifyPlan.ActionDetails {
|
|
get {return _details ?? SpotifyPlan.ActionDetails()}
|
|
set {_details = newValue}
|
|
}
|
|
/// Returns true if `details` has been explicitly set.
|
|
var hasDetails: Bool {return self._details != nil}
|
|
/// Clears the value of `details`. Subsequent reads from it will return its default value.
|
|
mutating func clearDetails() {self._details = nil}
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
init() {}
|
|
|
|
fileprivate var _details: SpotifyPlan.ActionDetails? = nil
|
|
}
|
|
|
|
struct ActionDetails: 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.
|
|
|
|
var title: String = String()
|
|
|
|
var subtitle: String = String()
|
|
|
|
var url: String = String()
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
init() {}
|
|
}
|
|
|
|
init() {}
|
|
|
|
fileprivate var _subscription: SpotifyPlan.SubscriptionInfo? = nil
|
|
fileprivate var _notice: SpotifyPlan.Notice? = nil
|
|
}
|
|
|
|
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
|
|
|
extension SpotifyPlan: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = "SpotifyPlan"
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .same(proto: "subscription"),
|
|
2: .same(proto: "notice"),
|
|
3: .same(proto: "actions"),
|
|
]
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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._subscription) }()
|
|
case 2: try { try decoder.decodeSingularMessageField(value: &self._notice) }()
|
|
case 3: try { try decoder.decodeRepeatedMessageField(value: &self.actions) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(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._subscription {
|
|
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
|
} }()
|
|
try { if let v = self._notice {
|
|
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
|
} }()
|
|
if !self.actions.isEmpty {
|
|
try visitor.visitRepeatedMessageField(value: self.actions, fieldNumber: 3)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: SpotifyPlan, rhs: SpotifyPlan) -> Bool {
|
|
if lhs._subscription != rhs._subscription {return false}
|
|
if lhs._notice != rhs._notice {return false}
|
|
if lhs.actions != rhs.actions {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SpotifyPlan.IconType: SwiftProtobuf._ProtoNameProviding {
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
0: .same(proto: "UNSPECIFIED_ICON"),
|
|
1: .same(proto: "CHECK"),
|
|
2: .same(proto: "CHEVRON"),
|
|
3: .same(proto: "ADS"),
|
|
4: .same(proto: "OFFLINE"),
|
|
5: .same(proto: "ARROW"),
|
|
]
|
|
}
|
|
|
|
extension SpotifyPlan.SubscriptionInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = SpotifyPlan.protoMessageName + ".SubscriptionInfo"
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .standard(proto: "plan_type"),
|
|
2: .standard(proto: "plan_variant"),
|
|
3: .standard(proto: "plan_name"),
|
|
4: .standard(proto: "plan_category"),
|
|
5: .standard(proto: "color_code"),
|
|
19: .standard(proto: "background_image_url"),
|
|
20: .same(proto: "features"),
|
|
]
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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.decodeSingularInt32Field(value: &self.planType) }()
|
|
case 2: try { try decoder.decodeSingularInt32Field(value: &self.planVariant) }()
|
|
case 3: try { try decoder.decodeSingularStringField(value: &self.planName) }()
|
|
case 4: try { try decoder.decodeSingularStringField(value: &self.planCategory) }()
|
|
case 5: try { try decoder.decodeSingularStringField(value: &self.colorCode) }()
|
|
case 19: try { try decoder.decodeSingularStringField(value: &self.backgroundImageURL) }()
|
|
case 20: try { try decoder.decodeRepeatedMessageField(value: &self.features) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if self.planType != 0 {
|
|
try visitor.visitSingularInt32Field(value: self.planType, fieldNumber: 1)
|
|
}
|
|
if self.planVariant != 0 {
|
|
try visitor.visitSingularInt32Field(value: self.planVariant, fieldNumber: 2)
|
|
}
|
|
if !self.planName.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.planName, fieldNumber: 3)
|
|
}
|
|
if !self.planCategory.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.planCategory, fieldNumber: 4)
|
|
}
|
|
if !self.colorCode.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.colorCode, fieldNumber: 5)
|
|
}
|
|
if !self.backgroundImageURL.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.backgroundImageURL, fieldNumber: 19)
|
|
}
|
|
if !self.features.isEmpty {
|
|
try visitor.visitRepeatedMessageField(value: self.features, fieldNumber: 20)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: SpotifyPlan.SubscriptionInfo, rhs: SpotifyPlan.SubscriptionInfo) -> Bool {
|
|
if lhs.planType != rhs.planType {return false}
|
|
if lhs.planVariant != rhs.planVariant {return false}
|
|
if lhs.planName != rhs.planName {return false}
|
|
if lhs.planCategory != rhs.planCategory {return false}
|
|
if lhs.colorCode != rhs.colorCode {return false}
|
|
if lhs.backgroundImageURL != rhs.backgroundImageURL {return false}
|
|
if lhs.features != rhs.features {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SpotifyPlan.Feature: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = SpotifyPlan.protoMessageName + ".Feature"
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .same(proto: "icon"),
|
|
2: .same(proto: "description"),
|
|
4: .same(proto: "color"),
|
|
]
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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.decodeSingularEnumField(value: &self.icon) }()
|
|
case 2: try { try decoder.decodeSingularStringField(value: &self.description_p) }()
|
|
case 4: try { try decoder.decodeSingularStringField(value: &self.color) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if self.icon != .unspecifiedIcon {
|
|
try visitor.visitSingularEnumField(value: self.icon, fieldNumber: 1)
|
|
}
|
|
if !self.description_p.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 2)
|
|
}
|
|
if !self.color.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.color, fieldNumber: 4)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: SpotifyPlan.Feature, rhs: SpotifyPlan.Feature) -> Bool {
|
|
if lhs.icon != rhs.icon {return false}
|
|
if lhs.description_p != rhs.description_p {return false}
|
|
if lhs.color != rhs.color {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SpotifyPlan.Notice: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = SpotifyPlan.protoMessageName + ".Notice"
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .same(proto: "message"),
|
|
4: .same(proto: "timestamp"),
|
|
7: .same(proto: "status"),
|
|
8: .same(proto: "settings"),
|
|
]
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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.message) }()
|
|
case 4: try { try decoder.decodeSingularInt64Field(value: &self.timestamp) }()
|
|
case 7: try { try decoder.decodeSingularInt32Field(value: &self.status) }()
|
|
case 8: try { try decoder.decodeSingularMessageField(value: &self._settings) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(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.message.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.message, fieldNumber: 1)
|
|
}
|
|
if self.timestamp != 0 {
|
|
try visitor.visitSingularInt64Field(value: self.timestamp, fieldNumber: 4)
|
|
}
|
|
if self.status != 0 {
|
|
try visitor.visitSingularInt32Field(value: self.status, fieldNumber: 7)
|
|
}
|
|
try { if let v = self._settings {
|
|
try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
|
|
} }()
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: SpotifyPlan.Notice, rhs: SpotifyPlan.Notice) -> Bool {
|
|
if lhs.message != rhs.message {return false}
|
|
if lhs.timestamp != rhs.timestamp {return false}
|
|
if lhs.status != rhs.status {return false}
|
|
if lhs._settings != rhs._settings {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SpotifyPlan.Settings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = SpotifyPlan.protoMessageName + ".Settings"
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
2: .standard(proto: "auto_renew"),
|
|
]
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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 2: try { try decoder.decodeSingularInt32Field(value: &self.autoRenew) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if self.autoRenew != 0 {
|
|
try visitor.visitSingularInt32Field(value: self.autoRenew, fieldNumber: 2)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: SpotifyPlan.Settings, rhs: SpotifyPlan.Settings) -> Bool {
|
|
if lhs.autoRenew != rhs.autoRenew {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SpotifyPlan.Action: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = SpotifyPlan.protoMessageName + ".Action"
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .standard(proto: "action_id"),
|
|
2: .same(proto: "details"),
|
|
]
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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.decodeSingularInt32Field(value: &self.actionID) }()
|
|
case 2: try { try decoder.decodeSingularMessageField(value: &self._details) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(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.actionID != 0 {
|
|
try visitor.visitSingularInt32Field(value: self.actionID, fieldNumber: 1)
|
|
}
|
|
try { if let v = self._details {
|
|
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
|
} }()
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: SpotifyPlan.Action, rhs: SpotifyPlan.Action) -> Bool {
|
|
if lhs.actionID != rhs.actionID {return false}
|
|
if lhs._details != rhs._details {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SpotifyPlan.ActionDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
static let protoMessageName: String = SpotifyPlan.protoMessageName + ".ActionDetails"
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .same(proto: "title"),
|
|
2: .same(proto: "subtitle"),
|
|
3: .same(proto: "url"),
|
|
]
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(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.title) }()
|
|
case 2: try { try decoder.decodeSingularStringField(value: &self.subtitle) }()
|
|
case 3: try { try decoder.decodeSingularStringField(value: &self.url) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if !self.title.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.title, fieldNumber: 1)
|
|
}
|
|
if !self.subtitle.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.subtitle, fieldNumber: 2)
|
|
}
|
|
if !self.url.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.url, fieldNumber: 3)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
static func ==(lhs: SpotifyPlan.ActionDetails, rhs: SpotifyPlan.ActionDetails) -> Bool {
|
|
if lhs.title != rhs.title {return false}
|
|
if lhs.subtitle != rhs.subtitle {return false}
|
|
if lhs.url != rhs.url {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|