TriggeredServerCodeResult

public struct TriggeredServerCodeResult

Class represents result of server code trigged by trigger

  • Whether the invocation succeeded

    Declaration

    Swift

    public let succeeded: Bool
  • Date of the execution

    Declaration

    Swift

    public let executedAt: Date
  • The endpoint used in the server code invocation

    Declaration

    Swift

    public let endpoint: String?
  • Error object of the invocation if any

    Declaration

    Swift

    public let error: ServerError?
  • Returned value from server code (JsonObject, JsonArray, String, Number, Boolean or null)

    Declaration

    Swift

    public let returnedValue: Any?
  • Returned value from server code casted to String.

    Declaration

    Swift

    public var returnedValueAsString: String?
  • Returned value from server code casted to Bool.

    Declaration

    Swift

    public var returnedValueAsBool: Bool?
  • Returned value from server code casted to Int.

    Declaration

    Swift

    public var returnedValueAsInt: Int?
  • Returned value from server code casted to Double.

    Declaration

    Swift

    public var returnedValueAsDouble: Double?
  • Returned value from server code casted to [String : Any].

    Declaration

    Swift

    public var returnedValueAsDictionary: Dictionary<String, Any>?
  • Returned value from server code casted to [Any].

    Declaration

    Swift

    public var returnedValueAsArray: [Any]?
  • Initialize TriggeredServerCodeResult.

    Developers rarely use this initializer. If you want to recreate same instance from stored data or transmitted data, you can use this method.

    Declaration

    Swift

    public init(
          _ succeeded: Bool,
          executedAt: Date,
          endpoint: String?,
          returnedValue: Any? = nil,
          error: ServerError? = nil)