Class SenlinNodeCreate.SenlinNodeCreateConcreteBuilder
- java.lang.Object
-
- org.openstack4j.openstack.senlin.domain.SenlinNodeCreate.SenlinNodeCreateConcreteBuilder
-
- All Implemented Interfaces:
Buildable.Builder<NodeCreateBuilder,NodeCreate>,NodeCreateBuilder
- Enclosing class:
- SenlinNodeCreate
public static class SenlinNodeCreate.SenlinNodeCreateConcreteBuilder extends Object implements NodeCreateBuilder
A Builder to create a SenlinNode. Usebuild()to receive theNodeCreateobject.- Author:
- lion
-
-
Constructor Summary
Constructors Constructor Description SenlinNodeCreateConcreteBuilder()Constructor to create aSenlinNodeCreate.SenlinNodeCreateConcreteBuilderobject with a new, emptySenlinNodeCreateobject.SenlinNodeCreateConcreteBuilder(SenlinNodeCreate model)Constructor for manipulation of an existingSenlinNodeCreateobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeCreatebuild()Creates and return the Model Entity MNodeCreateBuilderclusterID(String clusterID)Add the ID or shortID or name of the cluster the node lives in.NodeCreateBuilderfrom(NodeCreate in)Creates a Builder using the param M as the default valuesNodeCreateBuildermetadata(Map<String,String> metadata)Add a set of key and value pairs to associate with the node.NodeCreateBuildername(String name)Add the name of the node to be created.NodeCreateBuilderprofileID(String profileID)Add the ID or shortID or name of the profile for the node.NodeCreateBuilderrole(String role)Add a string indicating the role this node plays in a cluster.
-
-
-
Constructor Detail
-
SenlinNodeCreateConcreteBuilder
public SenlinNodeCreateConcreteBuilder()
Constructor to create aSenlinNodeCreate.SenlinNodeCreateConcreteBuilderobject with a new, emptySenlinNodeCreateobject.
-
SenlinNodeCreateConcreteBuilder
public SenlinNodeCreateConcreteBuilder(SenlinNodeCreate model)
Constructor for manipulation of an existingSenlinNodeCreateobject.- Parameters:
model- theSenlinNodeCreateobject which is to be modified.
-
-
Method Detail
-
build
public NodeCreate build()
Description copied from interface:Buildable.BuilderCreates and return the Model Entity M- Specified by:
buildin interfaceBuildable.Builder<NodeCreateBuilder,NodeCreate>- Returns:
- M instance
-
from
public NodeCreateBuilder from(NodeCreate in)
Description copied from interface:Buildable.BuilderCreates a Builder using the param M as the default values- Specified by:
fromin interfaceBuildable.Builder<NodeCreateBuilder,NodeCreate>- Returns:
- Builder
-
clusterID
public NodeCreateBuilder clusterID(String clusterID)
Description copied from interface:NodeCreateBuilderAdd the ID or shortID or name of the cluster the node lives in. If not specified, the node created will be an orphaned node.- Specified by:
clusterIDin interfaceNodeCreateBuilder- Parameters:
clusterID- The ID or shortID or name of the cluster- Returns:
- NodeCreateBuilder
-
metadata
public NodeCreateBuilder metadata(Map<String,String> metadata)
Description copied from interface:NodeCreateBuilderAdd a set of key and value pairs to associate with the node.- Specified by:
metadatain interfaceNodeCreateBuilder- Parameters:
metadata- A set of key and value pairs- Returns:
- NodeCreateBuilder
-
name
public NodeCreateBuilder name(String name)
Description copied from interface:NodeCreateBuilderAdd the name of the node to be created.- Specified by:
namein interfaceNodeCreateBuilder- Parameters:
name- The name of the node- Returns:
- NodeCreateBuilder
-
profileID
public NodeCreateBuilder profileID(String profileID)
Description copied from interface:NodeCreateBuilderAdd the ID or shortID or name of the profile for the node.- Specified by:
profileIDin interfaceNodeCreateBuilder- Parameters:
profileID- The ID or shortID or name of the profile- Returns:
- NodeCreateBuilder
-
role
public NodeCreateBuilder role(String role)
Description copied from interface:NodeCreateBuilderAdd a string indicating the role this node plays in a cluster.- Specified by:
rolein interfaceNodeCreateBuilder- Parameters:
role- a string indicating the role this node plays- Returns:
- NodeCreateBuilder
-
-