// DO NOT EDIT. // swift-format-ignore-file // swiftlint:disable all // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: pam.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 } /// Message emitted by pam-view-service /// GET https://spclient.wg.spotify.com/pam-view-service/v1/GetPremiumPlanRow struct PremiumPlanRow: 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 planName: String = String() var colorCode: String = String() var planTypeID: Int32 = 0 var billingLabel: String = String() var actionText: String = String() var flag: Int32 = 0 var availabilityMessage: String = String() var durationText: String = String() var planCategory: Int32 = 0 var planIdentifier: String = String() var unknownFields = SwiftProtobuf.UnknownStorage() init() {} } // MARK: - Code below here is support for the SwiftProtobuf runtime. extension PremiumPlanRow: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = "PremiumPlanRow" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 3: .standard(proto: "plan_name"), 4: .standard(proto: "color_code"), 6: .standard(proto: "plan_type_id"), 8: .standard(proto: "billing_label"), 9: .standard(proto: "action_text"), 10: .same(proto: "flag"), 12: .standard(proto: "availability_message"), 14: .standard(proto: "duration_text"), 16: .standard(proto: "plan_category"), 18: .standard(proto: "plan_identifier"), ] 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 3: try { try decoder.decodeSingularStringField(value: &self.planName) }() case 4: try { try decoder.decodeSingularStringField(value: &self.colorCode) }() case 6: try { try decoder.decodeSingularInt32Field(value: &self.planTypeID) }() case 8: try { try decoder.decodeSingularStringField(value: &self.billingLabel) }() case 9: try { try decoder.decodeSingularStringField(value: &self.actionText) }() case 10: try { try decoder.decodeSingularInt32Field(value: &self.flag) }() case 12: try { try decoder.decodeSingularStringField(value: &self.availabilityMessage) }() case 14: try { try decoder.decodeSingularStringField(value: &self.durationText) }() case 16: try { try decoder.decodeSingularInt32Field(value: &self.planCategory) }() case 18: try { try decoder.decodeSingularStringField(value: &self.planIdentifier) }() default: break } } } func traverse(visitor: inout V) throws { if !self.planName.isEmpty { try visitor.visitSingularStringField(value: self.planName, fieldNumber: 3) } if !self.colorCode.isEmpty { try visitor.visitSingularStringField(value: self.colorCode, fieldNumber: 4) } if self.planTypeID != 0 { try visitor.visitSingularInt32Field(value: self.planTypeID, fieldNumber: 6) } if !self.billingLabel.isEmpty { try visitor.visitSingularStringField(value: self.billingLabel, fieldNumber: 8) } if !self.actionText.isEmpty { try visitor.visitSingularStringField(value: self.actionText, fieldNumber: 9) } if self.flag != 0 { try visitor.visitSingularInt32Field(value: self.flag, fieldNumber: 10) } if !self.availabilityMessage.isEmpty { try visitor.visitSingularStringField(value: self.availabilityMessage, fieldNumber: 12) } if !self.durationText.isEmpty { try visitor.visitSingularStringField(value: self.durationText, fieldNumber: 14) } if self.planCategory != 0 { try visitor.visitSingularInt32Field(value: self.planCategory, fieldNumber: 16) } if !self.planIdentifier.isEmpty { try visitor.visitSingularStringField(value: self.planIdentifier, fieldNumber: 18) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: PremiumPlanRow, rhs: PremiumPlanRow) -> Bool { if lhs.planName != rhs.planName {return false} if lhs.colorCode != rhs.colorCode {return false} if lhs.planTypeID != rhs.planTypeID {return false} if lhs.billingLabel != rhs.billingLabel {return false} if lhs.actionText != rhs.actionText {return false} if lhs.flag != rhs.flag {return false} if lhs.availabilityMessage != rhs.availabilityMessage {return false} if lhs.durationText != rhs.durationText {return false} if lhs.planCategory != rhs.planCategory {return false} if lhs.planIdentifier != rhs.planIdentifier {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } }