public static class SenlinNodeCreate.SenlinNodeCreateConcreteBuilder extends Object implements NodeCreateBuilder
build()
to receive the
NodeCreate
object.Constructor and Description |
---|
SenlinNodeCreateConcreteBuilder()
Constructor to create a
SenlinNodeCreate.SenlinNodeCreateConcreteBuilder object
with a new, empty SenlinNodeCreate object. |
SenlinNodeCreateConcreteBuilder(SenlinNodeCreate model)
Constructor for manipulation of an existing
SenlinNodeCreate
object. |
Modifier and Type | Method and Description |
---|---|
NodeCreate |
build()
Creates and return the Model Entity M
|
NodeCreateBuilder |
clusterID(String clusterID)
Add the ID or shortID or name of the cluster the node lives in.
|
NodeCreateBuilder |
from(NodeCreate in)
Creates a Builder using the param M as the default values
|
NodeCreateBuilder |
metadata(Map<String,String> metadata)
Add a set of key and value pairs to associate with the node.
|
NodeCreateBuilder |
name(String name)
Add the name of the node to be created.
|
NodeCreateBuilder |
profileID(String profileID)
Add the ID or shortID or name of the profile for the node.
|
NodeCreateBuilder |
role(String role)
Add a string indicating the role this node plays in a cluster.
|
public SenlinNodeCreateConcreteBuilder()
SenlinNodeCreate.SenlinNodeCreateConcreteBuilder
object
with a new, empty SenlinNodeCreate
object.public SenlinNodeCreateConcreteBuilder(SenlinNodeCreate model)
SenlinNodeCreate
object.model
- the SenlinNodeCreate
object which is to be
modified.public NodeCreate build()
Buildable.Builder
build
in interface Buildable.Builder<NodeCreateBuilder,NodeCreate>
public NodeCreateBuilder from(NodeCreate in)
Buildable.Builder
from
in interface Buildable.Builder<NodeCreateBuilder,NodeCreate>
public NodeCreateBuilder clusterID(String clusterID)
NodeCreateBuilder
clusterID
in interface NodeCreateBuilder
clusterID
- The ID or shortID or name of the clusterpublic NodeCreateBuilder metadata(Map<String,String> metadata)
NodeCreateBuilder
metadata
in interface NodeCreateBuilder
metadata
- A set of key and value pairspublic NodeCreateBuilder name(String name)
NodeCreateBuilder
name
in interface NodeCreateBuilder
name
- The name of the nodepublic NodeCreateBuilder profileID(String profileID)
NodeCreateBuilder
profileID
in interface NodeCreateBuilder
profileID
- The ID or shortID or name of the profilepublic NodeCreateBuilder role(String role)
NodeCreateBuilder
role
in interface NodeCreateBuilder
role
- a string indicating the role this node playsCopyright © 2017. All rights reserved.