AppFunctionStringTypeMetadata


class AppFunctionStringTypeMetadata : AppFunctionDataTypeMetadata


Defines the schema of a string data type.

Corresponds to kotlin.String.

Summary

Constants

const String

The format string representing a URI value.

Public constructors

AppFunctionStringTypeMetadata(
    isNullable: Boolean,
    description: String,
    enumValues: Set<String>?,
    pattern: String?,
    format: String?
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Set<String>?

Defines the complete set of allowed string values accepted by this data type.

String?

The semantic format description for string values (e.g., "uri").

String?

The regex pattern that string values must match.

Inherited properties

From androidx.appfunctions.metadata.AppFunctionDataTypeMetadata
String

A description of the data type and its intended use.

Boolean

Whether the data type is nullable.

Constants

FORMAT_URI

const val FORMAT_URIString

The format string representing a URI value.

Public constructors

AppFunctionStringTypeMetadata

Added in 1.0.0-alpha11
AppFunctionStringTypeMetadata(
    isNullable: Boolean,
    description: String = "",
    enumValues: Set<String>? = null,
    pattern: String? = null,
    format: String? = null
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

enumValues

Added in 1.0.0-alpha11
val enumValuesSet<String>?

Defines the complete set of allowed string values accepted by this data type.

If null, all values are allowed, otherwise it must be non-empty.

If any of the values carry special meaning (e.g., "AUTO" means automatic mode), such meanings should be documented clearly in the corresponding property, parameter, or function return KDoc.

format

Added in 1.0.0-alpha11
val formatString?

The semantic format description for string values (e.g., "uri").

Provides a hint describing the expected format or semantic representation of the string values. A null value indicates that no format description is set.

pattern

Added in 1.0.0-alpha11
val patternString?

The regex pattern that string values must match.

If specified, string values accepted by this data type must match this regular expression. A null value indicates that no pattern constraint is applied, whereas an empty string represents a pattern matching empty string values.