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
schemais not null, the caller can look up the input/output information based on the schema definition, and call the function accordingly. -
Examine
parametersandresponse: 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( |
Public properties |
|
|---|---|
AppFunctionComponentsMetadata |
Reusable components that could be shared within the function specification. |
AppFunctionDeprecationMetadata? |
Deprecation details about the function, if the AppFunction is deprecated. |
String |
A description of the AppFunction and its intended use. |
String |
The ID used in an |
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
AppFunctionMetadata(
id: String,
packageName: String,
isEnabled: Boolean,
schema: AppFunctionSchemaMetadata?,
parameters: List<AppFunctionParameterMetadata>,
response: AppFunctionResponseMetadata,
components: AppFunctionComponentsMetadata = AppFunctionComponentsMetadata(),
description: String = "",
deprecation: AppFunctionDeprecationMetadata? = null
)
Public functions
Public properties
components
val components: AppFunctionComponentsMetadata
Reusable components that could be shared within the function specification.
deprecation
val deprecation: AppFunctionDeprecationMetadata?
Deprecation details about the function, if the AppFunction is deprecated. This will be null if the function is not deprecated.
description
val description: String
A description of the AppFunction and its intended use.
id
val id: String
The ID used in an androidx.appfunctions.ExecuteAppFunctionRequest to refer to this AppFunction.
isEnabled
val isEnabled: Boolean
Indicates whether the function is enabled currently or not.
packageName
val packageName: String
The package name of the Android app called to execute the app function.
parameters
val parameters: List<AppFunctionParameterMetadata>
The parameters of the AppFunction.
response
val response: AppFunctionResponseMetadata
The response of the AppFunction.
schema
val schema: AppFunctionSchemaMetadata?
The predefined schema of the AppFunction. If null, it indicates this function is not implement a particular predefined schema.