AppFunctionMetadata


class AppFunctionMetadata


Represents an AppFunction's metadata.

The class provides the essential information to call an AppFunction. The caller has two options to invoke a function:

  • Using function schema to identify input/output: The function schema defines the input and output of a function. If schema is not null, the caller can look up the input/output information based on the schema definition, and call the function accordingly.

  • Examine parameters and response: A function metadata also has parameters and response properties describe the input and output of a function. The caller can examine these fields to obtain the input/output information, and call the function accordingly.

Summary

Public constructors

AppFunctionMetadata(
    id: String,
    packageName: String,
    isEnabled: Boolean,
    schema: AppFunctionSchemaMetadata?,
    parameters: List<AppFunctionParameterMetadata>,
    response: AppFunctionResponseMetadata,
    components: AppFunctionComponentsMetadata
)

Public functions

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

Public properties

AppFunctionComponentsMetadata

Reusable components that could be shared within the function specification.

String

The ID used in an androidx.appfunctions.ExecuteAppFunctionRequest to refer to this AppFunction.

Boolean

Indicates whether the function is enabled currently or not.

String

The package name of the Android app called to execute the app function.

List<AppFunctionParameterMetadata>

The parameters of the AppFunction.

AppFunctionResponseMetadata

The response of the AppFunction.

AppFunctionSchemaMetadata?

The predefined schema of the AppFunction.

Public constructors

AppFunctionMetadata

Added in 1.0.0-alpha01
AppFunctionMetadata(
    id: String,
    packageName: String,
    isEnabled: Boolean,
    schema: AppFunctionSchemaMetadata?,
    parameters: List<AppFunctionParameterMetadata>,
    response: AppFunctionResponseMetadata,
    components: AppFunctionComponentsMetadata = AppFunctionComponentsMetadata()
)

Public functions

equals

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

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

components

Added in 1.0.0-alpha01
val componentsAppFunctionComponentsMetadata

Reusable components that could be shared within the function specification.

id

Added in 1.0.0-alpha01
val idString

The ID used in an androidx.appfunctions.ExecuteAppFunctionRequest to refer to this AppFunction.

isEnabled

Added in 1.0.0-alpha01
val isEnabledBoolean

Indicates whether the function is enabled currently or not.

packageName

Added in 1.0.0-alpha01
val packageNameString

The package name of the Android app called to execute the app function.

parameters

Added in 1.0.0-alpha01
val parametersList<AppFunctionParameterMetadata>

The parameters of the AppFunction.

response

Added in 1.0.0-alpha01
val responseAppFunctionResponseMetadata

The response of the AppFunction.

schema

Added in 1.0.0-alpha01
val schemaAppFunctionSchemaMetadata?

The predefined schema of the AppFunction. If null, it indicates this function is not implement a particular predefined schema.