AppFunctionStringTypeMetadata


public final class AppFunctionStringTypeMetadata extends AppFunctionDataTypeMetadata


Defines the schema of a string data type.

Corresponds to kotlin.String.

Summary

Constants

static final @NonNull String

The format string representing a URI value.

Public constructors

AppFunctionStringTypeMetadata(
    boolean isNullable,
    @NonNull String description,
    Set<@NonNull String> enumValues,
    String pattern,
    String format
)

Public methods

boolean
equals(Object other)
final Set<@NonNull String>

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

final String

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

final String

The regex pattern that string values must match.

int
@NonNull String

Inherited methods

From androidx.appfunctions.metadata.AppFunctionDataTypeMetadata
final @NonNull String

A description of the data type and its intended use.

final boolean

Whether the data type is nullable.

Constants

FORMAT_URI

public static final @NonNull String FORMAT_URI

The format string representing a URI value.

Public constructors

AppFunctionStringTypeMetadata

Added in 1.0.0-alpha11
public AppFunctionStringTypeMetadata(
    boolean isNullable,
    @NonNull String description,
    Set<@NonNull String> enumValues,
    String pattern,
    String format
)

Public methods

equals

public boolean equals(Object other)

getEnumValues

Added in 1.0.0-alpha11
public final Set<@NonNull StringgetEnumValues()

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.

getFormat

Added in 1.0.0-alpha11
public final String getFormat()

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.

getPattern

Added in 1.0.0-alpha11
public final String getPattern()

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.

hashCode

public int hashCode()

toString

public @NonNull String toString()