Class FunctionDefinition
- java.lang.Object
-
- io.serverlessworkflow.api.functions.FunctionDefinition
-
- All Implemented Interfaces:
Serializable
public class FunctionDefinition extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFunctionDefinition.Type
-
Constructor Summary
Constructors Constructor Description FunctionDefinition()No args constructor for use in serializationFunctionDefinition(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthRef()References an auth definition name to be used to access to resource defined in the operation parameterMap<String,String>getMetadata()MetadataStringgetName()Function unique name (Required)StringgetOperation()If type is `rest`,# . FunctionDefinition.TypegetType()Defines the function type.voidsetAuthRef(String authRef)References an auth definition name to be used to access to resource defined in the operation parametervoidsetMetadata(Map<String,String> metadata)MetadatavoidsetName(String name)Function unique name (Required)voidsetOperation(String operation)If type is `rest`,# . voidsetType(FunctionDefinition.Type type)Defines the function type.FunctionDefinitionwithAuthRef(String authRef)FunctionDefinitionwithMetadata(Map<String,String> metadata)FunctionDefinitionwithName(String name)FunctionDefinitionwithOperation(String operation)FunctionDefinitionwithType(FunctionDefinition.Type type)
-
-
-
Constructor Detail
-
FunctionDefinition
public FunctionDefinition()
No args constructor for use in serialization
-
FunctionDefinition
public FunctionDefinition(String name)
- Parameters:
name-
-
-
Method Detail
-
getName
public String getName()
Function unique name (Required)
-
setName
public void setName(String name)
Function unique name (Required)
-
withName
public FunctionDefinition withName(String name)
-
getOperation
public String getOperation()
If type is `rest`,# . If type is `rpc`, # # . If type is `expression`, defines the workflow expression.
-
setOperation
public void setOperation(String operation)
If type is `rest`,# . If type is `rpc`, # # . If type is `expression`, defines the workflow expression.
-
withOperation
public FunctionDefinition withOperation(String operation)
-
getType
public FunctionDefinition.Type getType()
Defines the function type. Is either `rest`, `asyncapi, `rpc`, `graphql`, `odata`, `expression`, or `custom`. Default is `rest`
-
setType
public void setType(FunctionDefinition.Type type)
Defines the function type. Is either `rest`, `asyncapi, `rpc`, `graphql`, `odata`, `expression`, or `custom`. Default is `rest`
-
withType
public FunctionDefinition withType(FunctionDefinition.Type type)
-
getAuthRef
public String getAuthRef()
References an auth definition name to be used to access to resource defined in the operation parameter
-
setAuthRef
public void setAuthRef(String authRef)
References an auth definition name to be used to access to resource defined in the operation parameter
-
withAuthRef
public FunctionDefinition withAuthRef(String authRef)
-
withMetadata
public FunctionDefinition withMetadata(Map<String,String> metadata)
-
-