Class FlowEntityBuilder
- java.lang.Object
-
- org.opendaylight.genius.mdsalutil.FlowEntity.Builder
-
- org.opendaylight.genius.mdsalutil.FlowEntityBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<FlowEntity>
,org.opendaylight.yangtools.concepts.CheckedBuilder<FlowEntity,java.lang.IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("org.immutables.processor.ProxyProcessor") public final class FlowEntityBuilder extends FlowEntity.Builder
Builds instances of typeFlowEntity
. Initialize attributes and then invoke thebuild()
method to create an immutable instance.FlowEntityBuilder
is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Constructor Summary
Constructors Constructor Description FlowEntityBuilder()
Creates a builder forFlowEntity
instances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlowEntityBuilder
addAllInstructionInfoList(java.lang.Iterable<? extends InstructionInfo> elements)
Adds elements toinstructionInfoList
list.FlowEntityBuilder
addAllMatchInfoList(java.lang.Iterable<? extends MatchInfoBase> elements)
Adds elements tomatchInfoList
list.FlowEntityBuilder
addInstructionInfoList(InstructionInfo element)
Adds one element toinstructionInfoList
list.FlowEntityBuilder
addInstructionInfoList(InstructionInfo... elements)
Adds elements toinstructionInfoList
list.FlowEntityBuilder
addMatchInfoList(MatchInfoBase element)
Adds one element tomatchInfoList
list.FlowEntityBuilder
addMatchInfoList(MatchInfoBase... elements)
Adds elements tomatchInfoList
list.FlowEntity
build()
Builds a newFlowEntity
.FlowEntityBuilder
from(AbstractSwitchEntity instance)
Fill a builder with attribute values from the providedorg.opendaylight.genius.mdsalutil.AbstractSwitchEntity
instance.FlowEntityBuilder
from(FlowEntity instance)
Fill a builder with attribute values from the providedorg.opendaylight.genius.mdsalutil.FlowEntity
instance.FlowEntityBuilder
setCookie(org.opendaylight.yangtools.yang.common.Uint64 cookie)
Initializes the value for thecookie
attribute.FlowEntityBuilder
setDpnId(org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Initializes the value for thedpnId
attribute.FlowEntityBuilder
setFlowId(java.lang.String flowId)
Initializes the value for theflowId
attribute.FlowEntityBuilder
setFlowName(@Nullable java.lang.String flowName)
Initializes the value for theflowName
attribute.FlowEntityBuilder
setHardTimeOut(int hardTimeOut)
Initializes the value for thehardTimeOut
attribute.FlowEntityBuilder
setIdleTimeOut(int idleTimeOut)
Initializes the value for theidleTimeOut
attribute.FlowEntityBuilder
setInstructionInfoList(java.lang.Iterable<? extends InstructionInfo> elements)
Sets or replaces all elements forinstructionInfoList
list.FlowEntityBuilder
setMatchInfoList(java.lang.Iterable<? extends MatchInfoBase> elements)
Sets or replaces all elements formatchInfoList
list.FlowEntityBuilder
setPriority(int priority)
Initializes the value for thepriority
attribute.FlowEntityBuilder
setSendFlowRemFlag(boolean sendFlowRemFlag)
Initializes the value for thesendFlowRemFlag
attribute.FlowEntityBuilder
setStrictFlag(boolean strictFlag)
Initializes the value for thestrictFlag
attribute.FlowEntityBuilder
setTableId(short tableId)
Initializes the value for thetableId
attribute.
-
-
-
Constructor Detail
-
FlowEntityBuilder
public FlowEntityBuilder()
Creates a builder forFlowEntity
instances.new FlowEntityBuilder() .setDpnId(org.opendaylight.yangtools.yang.common.Uint64) // required
dpnId
.setCookie(org.opendaylight.yangtools.yang.common.Uint64) // optionalcookie
.setFlowId(String) // requiredflowId
.setFlowName(@org.eclipse.jdt.annotation.Nullable String | null) // nullableflowName
.setHardTimeOut(int) // optionalhardTimeOut
.setIdleTimeOut(int) // optionalidleTimeOut
.addInstructionInfoList|addAllInstructionInfoList(org.opendaylight.genius.mdsalutil.InstructionInfo) //instructionInfoList
elements .addMatchInfoList|addAllMatchInfoList(org.opendaylight.genius.mdsalutil.MatchInfoBase) //matchInfoList
elements .setPriority(int) // optionalpriority
.setSendFlowRemFlag(boolean) // optionalsendFlowRemFlag
.setStrictFlag(boolean) // optionalstrictFlag
.setTableId(short) // requiredtableId
.build();
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final FlowEntityBuilder from(AbstractSwitchEntity instance)
Fill a builder with attribute values from the providedorg.opendaylight.genius.mdsalutil.AbstractSwitchEntity
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final FlowEntityBuilder from(FlowEntity instance)
Fill a builder with attribute values from the providedorg.opendaylight.genius.mdsalutil.FlowEntity
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setDpnId
@CanIgnoreReturnValue public final FlowEntityBuilder setDpnId(org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Initializes the value for thedpnId
attribute.- Parameters:
dpnId
- The value for dpnId- Returns:
this
builder for use in a chained invocation
-
setCookie
@CanIgnoreReturnValue public final FlowEntityBuilder setCookie(org.opendaylight.yangtools.yang.common.Uint64 cookie)
Initializes the value for thecookie
attribute.If not set, this attribute will have a default value as returned by the initializer of
cookie
.- Parameters:
cookie
- The value for cookie- Returns:
this
builder for use in a chained invocation
-
setFlowId
@CanIgnoreReturnValue public final FlowEntityBuilder setFlowId(java.lang.String flowId)
Initializes the value for theflowId
attribute.- Parameters:
flowId
- The value for flowId- Returns:
this
builder for use in a chained invocation
-
setFlowName
@CanIgnoreReturnValue public final FlowEntityBuilder setFlowName(@Nullable java.lang.String flowName)
Initializes the value for theflowName
attribute.- Parameters:
flowName
- The value for flowName (can benull
)- Returns:
this
builder for use in a chained invocation
-
setHardTimeOut
@CanIgnoreReturnValue public final FlowEntityBuilder setHardTimeOut(int hardTimeOut)
Initializes the value for thehardTimeOut
attribute.If not set, this attribute will have a default value as returned by the initializer of
hardTimeOut
.- Parameters:
hardTimeOut
- The value for hardTimeOut- Returns:
this
builder for use in a chained invocation
-
setIdleTimeOut
@CanIgnoreReturnValue public final FlowEntityBuilder setIdleTimeOut(int idleTimeOut)
Initializes the value for theidleTimeOut
attribute.If not set, this attribute will have a default value as returned by the initializer of
idleTimeOut
.- Parameters:
idleTimeOut
- The value for idleTimeOut- Returns:
this
builder for use in a chained invocation
-
addInstructionInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder addInstructionInfoList(InstructionInfo element)
Adds one element toinstructionInfoList
list.- Parameters:
element
- A instructionInfoList element- Returns:
this
builder for use in a chained invocation
-
addInstructionInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder addInstructionInfoList(InstructionInfo... elements)
Adds elements toinstructionInfoList
list.- Parameters:
elements
- An array of instructionInfoList elements- Returns:
this
builder for use in a chained invocation
-
setInstructionInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder setInstructionInfoList(java.lang.Iterable<? extends InstructionInfo> elements)
Sets or replaces all elements forinstructionInfoList
list.- Parameters:
elements
- An iterable of instructionInfoList elements- Returns:
this
builder for use in a chained invocation
-
addAllInstructionInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder addAllInstructionInfoList(java.lang.Iterable<? extends InstructionInfo> elements)
Adds elements toinstructionInfoList
list.- Parameters:
elements
- An iterable of instructionInfoList elements- Returns:
this
builder for use in a chained invocation
-
addMatchInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder addMatchInfoList(MatchInfoBase element)
Adds one element tomatchInfoList
list.- Parameters:
element
- A matchInfoList element- Returns:
this
builder for use in a chained invocation
-
addMatchInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder addMatchInfoList(MatchInfoBase... elements)
Adds elements tomatchInfoList
list.- Parameters:
elements
- An array of matchInfoList elements- Returns:
this
builder for use in a chained invocation
-
setMatchInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder setMatchInfoList(java.lang.Iterable<? extends MatchInfoBase> elements)
Sets or replaces all elements formatchInfoList
list.- Parameters:
elements
- An iterable of matchInfoList elements- Returns:
this
builder for use in a chained invocation
-
addAllMatchInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder addAllMatchInfoList(java.lang.Iterable<? extends MatchInfoBase> elements)
Adds elements tomatchInfoList
list.- Parameters:
elements
- An iterable of matchInfoList elements- Returns:
this
builder for use in a chained invocation
-
setPriority
@CanIgnoreReturnValue public final FlowEntityBuilder setPriority(int priority)
Initializes the value for thepriority
attribute.If not set, this attribute will have a default value as returned by the initializer of
priority
.- Parameters:
priority
- The value for priority- Returns:
this
builder for use in a chained invocation
-
setSendFlowRemFlag
@CanIgnoreReturnValue public final FlowEntityBuilder setSendFlowRemFlag(boolean sendFlowRemFlag)
Initializes the value for thesendFlowRemFlag
attribute.If not set, this attribute will have a default value as returned by the initializer of
sendFlowRemFlag
.- Parameters:
sendFlowRemFlag
- The value for sendFlowRemFlag- Returns:
this
builder for use in a chained invocation
-
setStrictFlag
@CanIgnoreReturnValue public final FlowEntityBuilder setStrictFlag(boolean strictFlag)
Initializes the value for thestrictFlag
attribute.If not set, this attribute will have a default value as returned by the initializer of
strictFlag
.- Parameters:
strictFlag
- The value for strictFlag- Returns:
this
builder for use in a chained invocation
-
setTableId
@CanIgnoreReturnValue public final FlowEntityBuilder setTableId(short tableId)
Initializes the value for thetableId
attribute.- Parameters:
tableId
- The value for tableId- Returns:
this
builder for use in a chained invocation
-
build
public FlowEntity build()
Builds a newFlowEntity
.- Returns:
- An immutable instance of FlowEntity
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-