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.BuilderBuilds instances of typeFlowEntity. Initialize attributes and then invoke thebuild()method to create an immutable instance.FlowEntityBuilderis 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 forFlowEntityinstances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlowEntityBuilderaddAllInstructionInfoList(java.lang.Iterable<? extends InstructionInfo> elements)Adds elements toinstructionInfoListlist.FlowEntityBuilderaddAllMatchInfoList(java.lang.Iterable<? extends MatchInfoBase> elements)Adds elements tomatchInfoListlist.FlowEntityBuilderaddInstructionInfoList(InstructionInfo element)Adds one element toinstructionInfoListlist.FlowEntityBuilderaddInstructionInfoList(InstructionInfo... elements)Adds elements toinstructionInfoListlist.FlowEntityBuilderaddMatchInfoList(MatchInfoBase element)Adds one element tomatchInfoListlist.FlowEntityBuilderaddMatchInfoList(MatchInfoBase... elements)Adds elements tomatchInfoListlist.FlowEntitybuild()Builds a newFlowEntity.FlowEntityBuilderfrom(AbstractSwitchEntity instance)Fill a builder with attribute values from the providedorg.opendaylight.genius.mdsalutil.AbstractSwitchEntityinstance.FlowEntityBuilderfrom(FlowEntity instance)Fill a builder with attribute values from the providedorg.opendaylight.genius.mdsalutil.FlowEntityinstance.FlowEntityBuildersetCookie(org.opendaylight.yangtools.yang.common.Uint64 cookie)Initializes the value for thecookieattribute.FlowEntityBuildersetDpnId(org.opendaylight.yangtools.yang.common.Uint64 dpnId)Initializes the value for thedpnIdattribute.FlowEntityBuildersetFlowId(java.lang.String flowId)Initializes the value for theflowIdattribute.FlowEntityBuildersetFlowName(@Nullable java.lang.String flowName)Initializes the value for theflowNameattribute.FlowEntityBuildersetHardTimeOut(int hardTimeOut)Initializes the value for thehardTimeOutattribute.FlowEntityBuildersetIdleTimeOut(int idleTimeOut)Initializes the value for theidleTimeOutattribute.FlowEntityBuildersetInstructionInfoList(java.lang.Iterable<? extends InstructionInfo> elements)Sets or replaces all elements forinstructionInfoListlist.FlowEntityBuildersetMatchInfoList(java.lang.Iterable<? extends MatchInfoBase> elements)Sets or replaces all elements formatchInfoListlist.FlowEntityBuildersetPriority(int priority)Initializes the value for thepriorityattribute.FlowEntityBuildersetSendFlowRemFlag(boolean sendFlowRemFlag)Initializes the value for thesendFlowRemFlagattribute.FlowEntityBuildersetStrictFlag(boolean strictFlag)Initializes the value for thestrictFlagattribute.FlowEntityBuildersetTableId(short tableId)Initializes the value for thetableIdattribute.
-
-
-
Constructor Detail
-
FlowEntityBuilder
public FlowEntityBuilder()
Creates a builder forFlowEntityinstances.new FlowEntityBuilder() .setDpnId(org.opendaylight.yangtools.yang.common.Uint64) // requireddpnId.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) //instructionInfoListelements .addMatchInfoList|addAllMatchInfoList(org.opendaylight.genius.mdsalutil.MatchInfoBase) //matchInfoListelements .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.AbstractSwitchEntityinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder 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.FlowEntityinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setDpnId
@CanIgnoreReturnValue public final FlowEntityBuilder setDpnId(org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Initializes the value for thedpnIdattribute.- Parameters:
dpnId- The value for dpnId- Returns:
thisbuilder for use in a chained invocation
-
setCookie
@CanIgnoreReturnValue public final FlowEntityBuilder setCookie(org.opendaylight.yangtools.yang.common.Uint64 cookie)
Initializes the value for thecookieattribute.If not set, this attribute will have a default value as returned by the initializer of
cookie.- Parameters:
cookie- The value for cookie- Returns:
thisbuilder for use in a chained invocation
-
setFlowId
@CanIgnoreReturnValue public final FlowEntityBuilder setFlowId(java.lang.String flowId)
Initializes the value for theflowIdattribute.- Parameters:
flowId- The value for flowId- Returns:
thisbuilder for use in a chained invocation
-
setFlowName
@CanIgnoreReturnValue public final FlowEntityBuilder setFlowName(@Nullable java.lang.String flowName)
Initializes the value for theflowNameattribute.- Parameters:
flowName- The value for flowName (can benull)- Returns:
thisbuilder for use in a chained invocation
-
setHardTimeOut
@CanIgnoreReturnValue public final FlowEntityBuilder setHardTimeOut(int hardTimeOut)
Initializes the value for thehardTimeOutattribute.If not set, this attribute will have a default value as returned by the initializer of
hardTimeOut.- Parameters:
hardTimeOut- The value for hardTimeOut- Returns:
thisbuilder for use in a chained invocation
-
setIdleTimeOut
@CanIgnoreReturnValue public final FlowEntityBuilder setIdleTimeOut(int idleTimeOut)
Initializes the value for theidleTimeOutattribute.If not set, this attribute will have a default value as returned by the initializer of
idleTimeOut.- Parameters:
idleTimeOut- The value for idleTimeOut- Returns:
thisbuilder for use in a chained invocation
-
addInstructionInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder addInstructionInfoList(InstructionInfo element)
Adds one element toinstructionInfoListlist.- Parameters:
element- A instructionInfoList element- Returns:
thisbuilder for use in a chained invocation
-
addInstructionInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder addInstructionInfoList(InstructionInfo... elements)
Adds elements toinstructionInfoListlist.- Parameters:
elements- An array of instructionInfoList elements- Returns:
thisbuilder for use in a chained invocation
-
setInstructionInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder setInstructionInfoList(java.lang.Iterable<? extends InstructionInfo> elements)
Sets or replaces all elements forinstructionInfoListlist.- Parameters:
elements- An iterable of instructionInfoList elements- Returns:
thisbuilder for use in a chained invocation
-
addAllInstructionInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder addAllInstructionInfoList(java.lang.Iterable<? extends InstructionInfo> elements)
Adds elements toinstructionInfoListlist.- Parameters:
elements- An iterable of instructionInfoList elements- Returns:
thisbuilder for use in a chained invocation
-
addMatchInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder addMatchInfoList(MatchInfoBase element)
Adds one element tomatchInfoListlist.- Parameters:
element- A matchInfoList element- Returns:
thisbuilder for use in a chained invocation
-
addMatchInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder addMatchInfoList(MatchInfoBase... elements)
Adds elements tomatchInfoListlist.- Parameters:
elements- An array of matchInfoList elements- Returns:
thisbuilder for use in a chained invocation
-
setMatchInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder setMatchInfoList(java.lang.Iterable<? extends MatchInfoBase> elements)
Sets or replaces all elements formatchInfoListlist.- Parameters:
elements- An iterable of matchInfoList elements- Returns:
thisbuilder for use in a chained invocation
-
addAllMatchInfoList
@CanIgnoreReturnValue public final FlowEntityBuilder addAllMatchInfoList(java.lang.Iterable<? extends MatchInfoBase> elements)
Adds elements tomatchInfoListlist.- Parameters:
elements- An iterable of matchInfoList elements- Returns:
thisbuilder for use in a chained invocation
-
setPriority
@CanIgnoreReturnValue public final FlowEntityBuilder setPriority(int priority)
Initializes the value for thepriorityattribute.If not set, this attribute will have a default value as returned by the initializer of
priority.- Parameters:
priority- The value for priority- Returns:
thisbuilder for use in a chained invocation
-
setSendFlowRemFlag
@CanIgnoreReturnValue public final FlowEntityBuilder setSendFlowRemFlag(boolean sendFlowRemFlag)
Initializes the value for thesendFlowRemFlagattribute.If not set, this attribute will have a default value as returned by the initializer of
sendFlowRemFlag.- Parameters:
sendFlowRemFlag- The value for sendFlowRemFlag- Returns:
thisbuilder for use in a chained invocation
-
setStrictFlag
@CanIgnoreReturnValue public final FlowEntityBuilder setStrictFlag(boolean strictFlag)
Initializes the value for thestrictFlagattribute.If not set, this attribute will have a default value as returned by the initializer of
strictFlag.- Parameters:
strictFlag- The value for strictFlag- Returns:
thisbuilder for use in a chained invocation
-
setTableId
@CanIgnoreReturnValue public final FlowEntityBuilder setTableId(short tableId)
Initializes the value for thetableIdattribute.- Parameters:
tableId- The value for tableId- Returns:
thisbuilder 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
-
-