DataAttributeValue

public class DataAttributeValue
extension DataAttributeValue: NativeBase
extension DataAttributeValue: Hashable

Encapsulates a data attribute value. Supports basic types and arrays of basic types.

Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.

  • Creates a string data attribute value.

    Declaration

    Swift

    public init(_ value: String)

    Parameters

    value

    Attribute value.

  • Creates a 64-bit integer data attribute value.

    Declaration

    Swift

    public init(_ value: Int64)

    Parameters

    value

    Attribute value.

  • Creates a single precision floating decimal data attribute value.

    Declaration

    Swift

    public init(_ value: Float)

    Parameters

    value

    Attribute value.

  • Creates a double precision floating decimal data attribute value.

    Declaration

    Swift

    public init(_ value: Double)

    Parameters

    value

    Attribute value.

  • Creates a boolean data attribute value.

    Declaration

    Swift

    public init(_ value: Bool)

    Parameters

    value

    Attribute value.

  • Creates an aggregated data attribute value.

    Declaration

    Swift

    public init(_ value: [DataAttributeValue])

    Parameters

    value

    Attribute value.

  • Supported types of the data attribute values.

    See more

    Declaration

    Swift

    public enum ValueType : UInt32, CaseIterable, Codable
  • Returns the type of the value.

    Declaration

    Swift

    public func getType() -> DataAttributeValue.ValueType

    Return Value

    The type of the value.

  • Gets the string value or nil if the type doesn’t match.

    Declaration

    Swift

    public func getString() -> String?

    Return Value

    Attribute value.

  • Gets 64-bits integer value or nil if the type doesn’t match.

    Declaration

    Swift

    public func getInt64() -> Int64?

    Return Value

    Attribute value.

  • Gets the single precision floating decimal value or nil if the type doesn’t match.

    Declaration

    Swift

    public func getFloat() -> Float?

    Return Value

    Attribute value.

  • Gets the double precision floating decimal value or nil if the type doesn’t match.

    Declaration

    Swift

    public func getDouble() -> Double?

    Return Value

    Attribute value.

  • Gets the boolean value or nil if the type doesn’t match.

    Declaration

    Swift

    public func getBoolean() -> Bool?

    Return Value

    Attribute value.

  • Gets the array value or nil if the type doesn’t match.

    Declaration

    Swift

    public func getArray() -> [DataAttributeValue]?

    Return Value

    Attribute value.

  • Returns a string representation of the contained value.

    Declaration

    Swift

    public func getAsString() -> String

    Return Value

    Attribute value.