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
valueAttribute value.
-
Creates a 64-bit integer data attribute value.
Declaration
Swift
public init(_ value: Int64)Parameters
valueAttribute value.
-
Creates a single precision floating decimal data attribute value.
Declaration
Swift
public init(_ value: Float)Parameters
valueAttribute value.
-
Creates a double precision floating decimal data attribute value.
Declaration
Swift
public init(_ value: Double)Parameters
valueAttribute value.
-
Creates a boolean data attribute value.
Declaration
Swift
public init(_ value: Bool)Parameters
valueAttribute value.
-
Creates an aggregated data attribute value.
Declaration
Swift
public init(_ value: [DataAttributeValue])Parameters
valueAttribute value.
-
Supported types of the data attribute values.
See moreDeclaration
Swift
public enum ValueType : UInt32, CaseIterable, Codable -
Returns the type of the value.
Declaration
Swift
public func getType() -> DataAttributeValue.ValueTypeReturn Value
The type of the value.
-
Gets the string value or
nilif the type doesn’t match.Declaration
Swift
public func getString() -> String?Return Value
Attribute value.
-
Gets 64-bits integer value or
nilif the type doesn’t match.Declaration
Swift
public func getInt64() -> Int64?Return Value
Attribute value.
-
Gets the single precision floating decimal value or
nilif the type doesn’t match.Declaration
Swift
public func getFloat() -> Float?Return Value
Attribute value.
-
Gets the double precision floating decimal value or
nilif the type doesn’t match.Declaration
Swift
public func getDouble() -> Double?Return Value
Attribute value.
-
Gets the boolean value or
nilif the type doesn’t match.Declaration
Swift
public func getBoolean() -> Bool?Return Value
Attribute value.
-
Gets the array value or
nilif 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() -> StringReturn Value
Attribute value.