connector_service.pb.swift 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. // DO NOT EDIT.
  2. // swift-format-ignore-file
  3. //
  4. // Generated by the Swift generator plugin for the protocol buffer compiler.
  5. // Source: connector_service.proto
  6. //
  7. // For information on using the generated types, please see the documentation:
  8. // https://github.com/apple/swift-protobuf/
  9. ///adopted from third_party/firebase/dataconnect/emulator/server/api/connector_service.proto
  10. import Foundation
  11. import SwiftProtobuf
  12. // If the compiler emits an error on this type, it is because this file
  13. // was generated by a version of the `protoc` Swift plug-in that is
  14. // incompatible with the version of SwiftProtobuf to which you are linking.
  15. // Please ensure that you are building against the same version of the API
  16. // that was used to generate this file.
  17. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  18. struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  19. typealias Version = _2
  20. }
  21. /// The ExecuteQuery request to Firebase Data Connect.
  22. public struct Google_Firebase_Dataconnect_V1alpha_ExecuteQueryRequest {
  23. // SwiftProtobuf.Message conformance is added in an extension below. See the
  24. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  25. // methods supported on all messages.
  26. /// The resource name of the connector to find the predefined query, in
  27. /// the format:
  28. /// ```
  29. /// projects/{project}/locations/{location}/services/{service}/connectors/{connector}
  30. /// ```
  31. public var name: String = String()
  32. /// The name of the GraphQL operation name.
  33. /// Required because all Connector operations must be named.
  34. /// See https://graphql.org/learn/queries/#operation-name.
  35. /// (-- api-linter: core::0122::name-suffix=disabled
  36. /// aip.dev/not-precedent: Must conform to GraphQL HTTP spec standard. --)
  37. public var operationName: String = String()
  38. /// Values for GraphQL variables provided in this request.
  39. public var variables: SwiftProtobuf.Google_Protobuf_Struct {
  40. get {return _variables ?? SwiftProtobuf.Google_Protobuf_Struct()}
  41. set {_variables = newValue}
  42. }
  43. /// Returns true if `variables` has been explicitly set.
  44. public var hasVariables: Bool {return self._variables != nil}
  45. /// Clears the value of `variables`. Subsequent reads from it will return its default value.
  46. public mutating func clearVariables() {self._variables = nil}
  47. public var unknownFields = SwiftProtobuf.UnknownStorage()
  48. public init() {}
  49. fileprivate var _variables: SwiftProtobuf.Google_Protobuf_Struct? = nil
  50. }
  51. /// The ExecuteMutation request to Firebase Data Connect.
  52. public struct Google_Firebase_Dataconnect_V1alpha_ExecuteMutationRequest {
  53. // SwiftProtobuf.Message conformance is added in an extension below. See the
  54. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  55. // methods supported on all messages.
  56. /// The resource name of the connector to find the predefined mutation, in
  57. /// the format:
  58. /// ```
  59. /// projects/{project}/locations/{location}/services/{service}/connectors/{connector}
  60. /// ```
  61. public var name: String = String()
  62. /// The name of the GraphQL operation name.
  63. /// Required because all Connector operations must be named.
  64. /// See https://graphql.org/learn/queries/#operation-name.
  65. /// (-- api-linter: core::0122::name-suffix=disabled
  66. /// aip.dev/not-precedent: Must conform to GraphQL HTTP spec standard. --)
  67. public var operationName: String = String()
  68. /// Values for GraphQL variables provided in this request.
  69. public var variables: SwiftProtobuf.Google_Protobuf_Struct {
  70. get {return _variables ?? SwiftProtobuf.Google_Protobuf_Struct()}
  71. set {_variables = newValue}
  72. }
  73. /// Returns true if `variables` has been explicitly set.
  74. public var hasVariables: Bool {return self._variables != nil}
  75. /// Clears the value of `variables`. Subsequent reads from it will return its default value.
  76. public mutating func clearVariables() {self._variables = nil}
  77. public var unknownFields = SwiftProtobuf.UnknownStorage()
  78. public init() {}
  79. fileprivate var _variables: SwiftProtobuf.Google_Protobuf_Struct? = nil
  80. }
  81. /// The ExecuteQuery response from Firebase Data Connect.
  82. public struct Google_Firebase_Dataconnect_V1alpha_ExecuteQueryResponse {
  83. // SwiftProtobuf.Message conformance is added in an extension below. See the
  84. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  85. // methods supported on all messages.
  86. /// The result of executing the requested operation.
  87. public var data: SwiftProtobuf.Google_Protobuf_Struct {
  88. get {return _data ?? SwiftProtobuf.Google_Protobuf_Struct()}
  89. set {_data = newValue}
  90. }
  91. /// Returns true if `data` has been explicitly set.
  92. public var hasData: Bool {return self._data != nil}
  93. /// Clears the value of `data`. Subsequent reads from it will return its default value.
  94. public mutating func clearData() {self._data = nil}
  95. /// Errors of this response.
  96. public var errors: [Google_Firebase_Dataconnect_V1alpha_GraphqlError] = []
  97. public var unknownFields = SwiftProtobuf.UnknownStorage()
  98. public init() {}
  99. fileprivate var _data: SwiftProtobuf.Google_Protobuf_Struct? = nil
  100. }
  101. /// The ExecuteMutation response from Firebase Data Connect.
  102. public struct Google_Firebase_Dataconnect_V1alpha_ExecuteMutationResponse {
  103. // SwiftProtobuf.Message conformance is added in an extension below. See the
  104. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  105. // methods supported on all messages.
  106. /// The result of executing the requested operation.
  107. public var data: SwiftProtobuf.Google_Protobuf_Struct {
  108. get {return _data ?? SwiftProtobuf.Google_Protobuf_Struct()}
  109. set {_data = newValue}
  110. }
  111. /// Returns true if `data` has been explicitly set.
  112. public var hasData: Bool {return self._data != nil}
  113. /// Clears the value of `data`. Subsequent reads from it will return its default value.
  114. public mutating func clearData() {self._data = nil}
  115. /// Errors of this response.
  116. public var errors: [Google_Firebase_Dataconnect_V1alpha_GraphqlError] = []
  117. public var unknownFields = SwiftProtobuf.UnknownStorage()
  118. public init() {}
  119. fileprivate var _data: SwiftProtobuf.Google_Protobuf_Struct? = nil
  120. }
  121. #if swift(>=5.5) && canImport(_Concurrency)
  122. extension Google_Firebase_Dataconnect_V1alpha_ExecuteQueryRequest: @unchecked Sendable {}
  123. extension Google_Firebase_Dataconnect_V1alpha_ExecuteMutationRequest: @unchecked Sendable {}
  124. extension Google_Firebase_Dataconnect_V1alpha_ExecuteQueryResponse: @unchecked Sendable {}
  125. extension Google_Firebase_Dataconnect_V1alpha_ExecuteMutationResponse: @unchecked Sendable {}
  126. #endif // swift(>=5.5) && canImport(_Concurrency)
  127. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  128. fileprivate let _protobuf_package = "google.firebase.dataconnect.v1alpha"
  129. extension Google_Firebase_Dataconnect_V1alpha_ExecuteQueryRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  130. public static let protoMessageName: String = _protobuf_package + ".ExecuteQueryRequest"
  131. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  132. 1: .same(proto: "name"),
  133. 2: .standard(proto: "operation_name"),
  134. 3: .same(proto: "variables"),
  135. ]
  136. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  137. while let fieldNumber = try decoder.nextFieldNumber() {
  138. // The use of inline closures is to circumvent an issue where the compiler
  139. // allocates stack space for every case branch when no optimizations are
  140. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  141. switch fieldNumber {
  142. case 1: try { try decoder.decodeSingularStringField(value: &self.name) }()
  143. case 2: try { try decoder.decodeSingularStringField(value: &self.operationName) }()
  144. case 3: try { try decoder.decodeSingularMessageField(value: &self._variables) }()
  145. default: break
  146. }
  147. }
  148. }
  149. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  150. // The use of inline closures is to circumvent an issue where the compiler
  151. // allocates stack space for every if/case branch local when no optimizations
  152. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  153. // https://github.com/apple/swift-protobuf/issues/1182
  154. if !self.name.isEmpty {
  155. try visitor.visitSingularStringField(value: self.name, fieldNumber: 1)
  156. }
  157. if !self.operationName.isEmpty {
  158. try visitor.visitSingularStringField(value: self.operationName, fieldNumber: 2)
  159. }
  160. try { if let v = self._variables {
  161. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  162. } }()
  163. try unknownFields.traverse(visitor: &visitor)
  164. }
  165. public static func ==(lhs: Google_Firebase_Dataconnect_V1alpha_ExecuteQueryRequest, rhs: Google_Firebase_Dataconnect_V1alpha_ExecuteQueryRequest) -> Bool {
  166. if lhs.name != rhs.name {return false}
  167. if lhs.operationName != rhs.operationName {return false}
  168. if lhs._variables != rhs._variables {return false}
  169. if lhs.unknownFields != rhs.unknownFields {return false}
  170. return true
  171. }
  172. }
  173. extension Google_Firebase_Dataconnect_V1alpha_ExecuteMutationRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  174. public static let protoMessageName: String = _protobuf_package + ".ExecuteMutationRequest"
  175. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  176. 1: .same(proto: "name"),
  177. 2: .standard(proto: "operation_name"),
  178. 3: .same(proto: "variables"),
  179. ]
  180. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  181. while let fieldNumber = try decoder.nextFieldNumber() {
  182. // The use of inline closures is to circumvent an issue where the compiler
  183. // allocates stack space for every case branch when no optimizations are
  184. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  185. switch fieldNumber {
  186. case 1: try { try decoder.decodeSingularStringField(value: &self.name) }()
  187. case 2: try { try decoder.decodeSingularStringField(value: &self.operationName) }()
  188. case 3: try { try decoder.decodeSingularMessageField(value: &self._variables) }()
  189. default: break
  190. }
  191. }
  192. }
  193. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  194. // The use of inline closures is to circumvent an issue where the compiler
  195. // allocates stack space for every if/case branch local when no optimizations
  196. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  197. // https://github.com/apple/swift-protobuf/issues/1182
  198. if !self.name.isEmpty {
  199. try visitor.visitSingularStringField(value: self.name, fieldNumber: 1)
  200. }
  201. if !self.operationName.isEmpty {
  202. try visitor.visitSingularStringField(value: self.operationName, fieldNumber: 2)
  203. }
  204. try { if let v = self._variables {
  205. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  206. } }()
  207. try unknownFields.traverse(visitor: &visitor)
  208. }
  209. public static func ==(lhs: Google_Firebase_Dataconnect_V1alpha_ExecuteMutationRequest, rhs: Google_Firebase_Dataconnect_V1alpha_ExecuteMutationRequest) -> Bool {
  210. if lhs.name != rhs.name {return false}
  211. if lhs.operationName != rhs.operationName {return false}
  212. if lhs._variables != rhs._variables {return false}
  213. if lhs.unknownFields != rhs.unknownFields {return false}
  214. return true
  215. }
  216. }
  217. extension Google_Firebase_Dataconnect_V1alpha_ExecuteQueryResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  218. public static let protoMessageName: String = _protobuf_package + ".ExecuteQueryResponse"
  219. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  220. 1: .same(proto: "data"),
  221. 2: .same(proto: "errors"),
  222. ]
  223. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  224. while let fieldNumber = try decoder.nextFieldNumber() {
  225. // The use of inline closures is to circumvent an issue where the compiler
  226. // allocates stack space for every case branch when no optimizations are
  227. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  228. switch fieldNumber {
  229. case 1: try { try decoder.decodeSingularMessageField(value: &self._data) }()
  230. case 2: try { try decoder.decodeRepeatedMessageField(value: &self.errors) }()
  231. default: break
  232. }
  233. }
  234. }
  235. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  236. // The use of inline closures is to circumvent an issue where the compiler
  237. // allocates stack space for every if/case branch local when no optimizations
  238. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  239. // https://github.com/apple/swift-protobuf/issues/1182
  240. try { if let v = self._data {
  241. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  242. } }()
  243. if !self.errors.isEmpty {
  244. try visitor.visitRepeatedMessageField(value: self.errors, fieldNumber: 2)
  245. }
  246. try unknownFields.traverse(visitor: &visitor)
  247. }
  248. public static func ==(lhs: Google_Firebase_Dataconnect_V1alpha_ExecuteQueryResponse, rhs: Google_Firebase_Dataconnect_V1alpha_ExecuteQueryResponse) -> Bool {
  249. if lhs._data != rhs._data {return false}
  250. if lhs.errors != rhs.errors {return false}
  251. if lhs.unknownFields != rhs.unknownFields {return false}
  252. return true
  253. }
  254. }
  255. extension Google_Firebase_Dataconnect_V1alpha_ExecuteMutationResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  256. public static let protoMessageName: String = _protobuf_package + ".ExecuteMutationResponse"
  257. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  258. 1: .same(proto: "data"),
  259. 2: .same(proto: "errors"),
  260. ]
  261. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  262. while let fieldNumber = try decoder.nextFieldNumber() {
  263. // The use of inline closures is to circumvent an issue where the compiler
  264. // allocates stack space for every case branch when no optimizations are
  265. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  266. switch fieldNumber {
  267. case 1: try { try decoder.decodeSingularMessageField(value: &self._data) }()
  268. case 2: try { try decoder.decodeRepeatedMessageField(value: &self.errors) }()
  269. default: break
  270. }
  271. }
  272. }
  273. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  274. // The use of inline closures is to circumvent an issue where the compiler
  275. // allocates stack space for every if/case branch local when no optimizations
  276. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  277. // https://github.com/apple/swift-protobuf/issues/1182
  278. try { if let v = self._data {
  279. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  280. } }()
  281. if !self.errors.isEmpty {
  282. try visitor.visitRepeatedMessageField(value: self.errors, fieldNumber: 2)
  283. }
  284. try unknownFields.traverse(visitor: &visitor)
  285. }
  286. public static func ==(lhs: Google_Firebase_Dataconnect_V1alpha_ExecuteMutationResponse, rhs: Google_Firebase_Dataconnect_V1alpha_ExecuteMutationResponse) -> Bool {
  287. if lhs._data != rhs._data {return false}
  288. if lhs.errors != rhs.errors {return false}
  289. if lhs.unknownFields != rhs.unknownFields {return false}
  290. return true
  291. }
  292. }