mirror of
https://github.com/GayPizzaSpecifications/stable-diffusion-rpc.git
synced 2025-08-03 05:30:54 +00:00
581 lines
20 KiB
Swift
581 lines
20 KiB
Swift
// DO NOT EDIT.
|
|
// swift-format-ignore-file
|
|
//
|
|
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
|
// Source: StableDiffusion.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
|
|
}
|
|
|
|
public enum SdScheduler: SwiftProtobuf.Enum {
|
|
public typealias RawValue = Int
|
|
case pndm // = 0
|
|
case dpmSolverPlusPlus // = 1
|
|
case UNRECOGNIZED(Int)
|
|
|
|
public init() {
|
|
self = .pndm
|
|
}
|
|
|
|
public init?(rawValue: Int) {
|
|
switch rawValue {
|
|
case 0: self = .pndm
|
|
case 1: self = .dpmSolverPlusPlus
|
|
default: self = .UNRECOGNIZED(rawValue)
|
|
}
|
|
}
|
|
|
|
public var rawValue: Int {
|
|
switch self {
|
|
case .pndm: return 0
|
|
case .dpmSolverPlusPlus: return 1
|
|
case .UNRECOGNIZED(let i): return i
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
#if swift(>=4.2)
|
|
|
|
extension SdScheduler: CaseIterable {
|
|
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
|
public static var allCases: [SdScheduler] = [
|
|
.pndm,
|
|
.dpmSolverPlusPlus,
|
|
]
|
|
}
|
|
|
|
#endif // swift(>=4.2)
|
|
|
|
public enum SdComputeUnits: SwiftProtobuf.Enum {
|
|
public typealias RawValue = Int
|
|
case cpu // = 0
|
|
case cpuAndGpu // = 1
|
|
case all // = 2
|
|
case cpuAndNeuralEngine // = 3
|
|
case UNRECOGNIZED(Int)
|
|
|
|
public init() {
|
|
self = .cpu
|
|
}
|
|
|
|
public init?(rawValue: Int) {
|
|
switch rawValue {
|
|
case 0: self = .cpu
|
|
case 1: self = .cpuAndGpu
|
|
case 2: self = .all
|
|
case 3: self = .cpuAndNeuralEngine
|
|
default: self = .UNRECOGNIZED(rawValue)
|
|
}
|
|
}
|
|
|
|
public var rawValue: Int {
|
|
switch self {
|
|
case .cpu: return 0
|
|
case .cpuAndGpu: return 1
|
|
case .all: return 2
|
|
case .cpuAndNeuralEngine: return 3
|
|
case .UNRECOGNIZED(let i): return i
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
#if swift(>=4.2)
|
|
|
|
extension SdComputeUnits: CaseIterable {
|
|
// The compiler won't synthesize support with the UNRECOGNIZED case.
|
|
public static var allCases: [SdComputeUnits] = [
|
|
.cpu,
|
|
.cpuAndGpu,
|
|
.all,
|
|
.cpuAndNeuralEngine,
|
|
]
|
|
}
|
|
|
|
#endif // swift(>=4.2)
|
|
|
|
public struct SdModelInfo {
|
|
// 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 name: String = String()
|
|
|
|
public var attention: String = String()
|
|
|
|
public var isLoaded: Bool = false
|
|
|
|
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
public init() {}
|
|
}
|
|
|
|
public struct SdImage {
|
|
// 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 content: Data = Data()
|
|
|
|
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
public init() {}
|
|
}
|
|
|
|
public struct SdListModelsRequest {
|
|
// 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() {}
|
|
}
|
|
|
|
public struct SdListModelsResponse {
|
|
// 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 models: [SdModelInfo] = []
|
|
|
|
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
public init() {}
|
|
}
|
|
|
|
public struct SdReloadModelsRequest {
|
|
// 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() {}
|
|
}
|
|
|
|
public struct SdReloadModelsResponse {
|
|
// 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() {}
|
|
}
|
|
|
|
public struct SdLoadModelRequest {
|
|
// 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 modelName: String = String()
|
|
|
|
public var computeUnits: SdComputeUnits = .cpu
|
|
|
|
public var reduceMemory: Bool = false
|
|
|
|
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
public init() {}
|
|
}
|
|
|
|
public struct SdLoadModelResponse {
|
|
// 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() {}
|
|
}
|
|
|
|
public struct SdGenerateImagesRequest {
|
|
// 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 modelName: String = String()
|
|
|
|
public var imageCount: UInt32 = 0
|
|
|
|
public var prompt: String = String()
|
|
|
|
public var negativePrompt: String = String()
|
|
|
|
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
public init() {}
|
|
}
|
|
|
|
public struct SdGenerateImagesResponse {
|
|
// 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 images: [SdImage] = []
|
|
|
|
public var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
public init() {}
|
|
}
|
|
|
|
#if swift(>=5.5) && canImport(_Concurrency)
|
|
extension SdScheduler: @unchecked Sendable {}
|
|
extension SdComputeUnits: @unchecked Sendable {}
|
|
extension SdModelInfo: @unchecked Sendable {}
|
|
extension SdImage: @unchecked Sendable {}
|
|
extension SdListModelsRequest: @unchecked Sendable {}
|
|
extension SdListModelsResponse: @unchecked Sendable {}
|
|
extension SdReloadModelsRequest: @unchecked Sendable {}
|
|
extension SdReloadModelsResponse: @unchecked Sendable {}
|
|
extension SdLoadModelRequest: @unchecked Sendable {}
|
|
extension SdLoadModelResponse: @unchecked Sendable {}
|
|
extension SdGenerateImagesRequest: @unchecked Sendable {}
|
|
extension SdGenerateImagesResponse: @unchecked Sendable {}
|
|
#endif // swift(>=5.5) && canImport(_Concurrency)
|
|
|
|
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
|
|
|
fileprivate let _protobuf_package = "gay.pizza.stable.diffusion"
|
|
|
|
extension SdScheduler: SwiftProtobuf._ProtoNameProviding {
|
|
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
0: .same(proto: "pndm"),
|
|
1: .same(proto: "dpmSolverPlusPlus"),
|
|
]
|
|
}
|
|
|
|
extension SdComputeUnits: SwiftProtobuf._ProtoNameProviding {
|
|
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
0: .same(proto: "cpu"),
|
|
1: .same(proto: "cpu_and_gpu"),
|
|
2: .same(proto: "all"),
|
|
3: .same(proto: "cpu_and_neural_engine"),
|
|
]
|
|
}
|
|
|
|
extension SdModelInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".ModelInfo"
|
|
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .same(proto: "name"),
|
|
2: .same(proto: "attention"),
|
|
3: .standard(proto: "is_loaded"),
|
|
]
|
|
|
|
public 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.name) }()
|
|
case 2: try { try decoder.decodeSingularStringField(value: &self.attention) }()
|
|
case 3: try { try decoder.decodeSingularBoolField(value: &self.isLoaded) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if !self.name.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.name, fieldNumber: 1)
|
|
}
|
|
if !self.attention.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.attention, fieldNumber: 2)
|
|
}
|
|
if self.isLoaded != false {
|
|
try visitor.visitSingularBoolField(value: self.isLoaded, fieldNumber: 3)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: SdModelInfo, rhs: SdModelInfo) -> Bool {
|
|
if lhs.name != rhs.name {return false}
|
|
if lhs.attention != rhs.attention {return false}
|
|
if lhs.isLoaded != rhs.isLoaded {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SdImage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".Image"
|
|
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .same(proto: "content"),
|
|
]
|
|
|
|
public 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.decodeSingularBytesField(value: &self.content) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if !self.content.isEmpty {
|
|
try visitor.visitSingularBytesField(value: self.content, fieldNumber: 1)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: SdImage, rhs: SdImage) -> Bool {
|
|
if lhs.content != rhs.content {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SdListModelsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".ListModelsRequest"
|
|
public static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
|
|
|
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let _ = try decoder.nextFieldNumber() {
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: SdListModelsRequest, rhs: SdListModelsRequest) -> Bool {
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SdListModelsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".ListModelsResponse"
|
|
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .same(proto: "models"),
|
|
]
|
|
|
|
public 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.decodeRepeatedMessageField(value: &self.models) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if !self.models.isEmpty {
|
|
try visitor.visitRepeatedMessageField(value: self.models, fieldNumber: 1)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: SdListModelsResponse, rhs: SdListModelsResponse) -> Bool {
|
|
if lhs.models != rhs.models {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SdReloadModelsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".ReloadModelsRequest"
|
|
public static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
|
|
|
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let _ = try decoder.nextFieldNumber() {
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: SdReloadModelsRequest, rhs: SdReloadModelsRequest) -> Bool {
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SdReloadModelsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".ReloadModelsResponse"
|
|
public static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
|
|
|
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let _ = try decoder.nextFieldNumber() {
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: SdReloadModelsResponse, rhs: SdReloadModelsResponse) -> Bool {
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SdLoadModelRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".LoadModelRequest"
|
|
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .standard(proto: "model_name"),
|
|
2: .standard(proto: "compute_units"),
|
|
3: .standard(proto: "reduce_memory"),
|
|
]
|
|
|
|
public 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.modelName) }()
|
|
case 2: try { try decoder.decodeSingularEnumField(value: &self.computeUnits) }()
|
|
case 3: try { try decoder.decodeSingularBoolField(value: &self.reduceMemory) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if !self.modelName.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.modelName, fieldNumber: 1)
|
|
}
|
|
if self.computeUnits != .cpu {
|
|
try visitor.visitSingularEnumField(value: self.computeUnits, fieldNumber: 2)
|
|
}
|
|
if self.reduceMemory != false {
|
|
try visitor.visitSingularBoolField(value: self.reduceMemory, fieldNumber: 3)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: SdLoadModelRequest, rhs: SdLoadModelRequest) -> Bool {
|
|
if lhs.modelName != rhs.modelName {return false}
|
|
if lhs.computeUnits != rhs.computeUnits {return false}
|
|
if lhs.reduceMemory != rhs.reduceMemory {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SdLoadModelResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".LoadModelResponse"
|
|
public static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
|
|
|
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
while let _ = try decoder.nextFieldNumber() {
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: SdLoadModelResponse, rhs: SdLoadModelResponse) -> Bool {
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SdGenerateImagesRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".GenerateImagesRequest"
|
|
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .standard(proto: "model_name"),
|
|
2: .standard(proto: "image_count"),
|
|
3: .same(proto: "prompt"),
|
|
4: .standard(proto: "negative_prompt"),
|
|
]
|
|
|
|
public 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.modelName) }()
|
|
case 2: try { try decoder.decodeSingularUInt32Field(value: &self.imageCount) }()
|
|
case 3: try { try decoder.decodeSingularStringField(value: &self.prompt) }()
|
|
case 4: try { try decoder.decodeSingularStringField(value: &self.negativePrompt) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if !self.modelName.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.modelName, fieldNumber: 1)
|
|
}
|
|
if self.imageCount != 0 {
|
|
try visitor.visitSingularUInt32Field(value: self.imageCount, fieldNumber: 2)
|
|
}
|
|
if !self.prompt.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.prompt, fieldNumber: 3)
|
|
}
|
|
if !self.negativePrompt.isEmpty {
|
|
try visitor.visitSingularStringField(value: self.negativePrompt, fieldNumber: 4)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: SdGenerateImagesRequest, rhs: SdGenerateImagesRequest) -> Bool {
|
|
if lhs.modelName != rhs.modelName {return false}
|
|
if lhs.imageCount != rhs.imageCount {return false}
|
|
if lhs.prompt != rhs.prompt {return false}
|
|
if lhs.negativePrompt != rhs.negativePrompt {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|
|
|
|
extension SdGenerateImagesResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
public static let protoMessageName: String = _protobuf_package + ".GenerateImagesResponse"
|
|
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
1: .same(proto: "images"),
|
|
]
|
|
|
|
public 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.decodeRepeatedMessageField(value: &self.images) }()
|
|
default: break
|
|
}
|
|
}
|
|
}
|
|
|
|
public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
if !self.images.isEmpty {
|
|
try visitor.visitRepeatedMessageField(value: self.images, fieldNumber: 1)
|
|
}
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
}
|
|
|
|
public static func ==(lhs: SdGenerateImagesResponse, rhs: SdGenerateImagesResponse) -> Bool {
|
|
if lhs.images != rhs.images {return false}
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
return true
|
|
}
|
|
}
|