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 class
FunctionDefinition.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 String
getAuthRef()
References an auth definition name to be used to access to resource defined in the operation parameterMap<String,String>
getMetadata()
MetadataString
getName()
Function unique name (Required)String
getOperation()
If type is `rest`,# . FunctionDefinition.Type
getType()
Defines the function type.void
setAuthRef(String authRef)
References an auth definition name to be used to access to resource defined in the operation parametervoid
setMetadata(Map<String,String> metadata)
Metadatavoid
setName(String name)
Function unique name (Required)void
setOperation(String operation)
If type is `rest`,# . void
setType(FunctionDefinition.Type type)
Defines the function type.FunctionDefinition
withAuthRef(String authRef)
FunctionDefinition
withMetadata(Map<String,String> metadata)
FunctionDefinition
withName(String name)
FunctionDefinition
withOperation(String operation)
FunctionDefinition
withType(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)
-
-