Class OvsdbBridgeAugmentationBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbBridgeAugmentationBuilder
-
@Generated("mdsal-binding-generator") public class OvsdbBridgeAugmentationBuilder extends Object
Class that buildsOvsdbBridgeAugmentation
instances. Overall design of the class is that of a fluent interface, where method chaining is used.In general, this class is supposed to be used like this template:
OvsdbBridgeAugmentation createOvsdbBridgeAugmentation(int fooXyzzy, int barBaz) { return new OvsdbBridgeAugmentationBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of OvsdbBridgeAugmentation, as instances can be freely passed around without worrying about synchronization issues.
As a side note: method chaining results in:
- very efficient Java bytecode, as the method invocation result, in this case the Builder reference, is
on the stack, so further method invocations just need to fill method arguments for the next method
invocation, which is terminated by
build()
, which is then returned from the method - better understanding by humans, as the scope of mutable state (the builder) is kept to a minimum and is very localized
- better optimization opportunities, as the object scope is minimized in terms of invocation (rather than method) stack, making escape analysis a lot easier. Given enough compiler (JIT/AOT) prowess, the cost of th builder object can be completely eliminated
- See Also:
OvsdbBridgeAugmentation
- very efficient Java bytecode, as the method invocation result, in this case the Builder reference, is
on the stack, so further method invocations just need to fill method arguments for the next method
invocation, which is terminated by
-
-
Constructor Summary
Constructors Constructor Description OvsdbBridgeAugmentationBuilder()
Construct an empty builder.OvsdbBridgeAugmentationBuilder(OvsdbBridgeAttributes arg)
Construct a new builder initialized from specifiedOvsdbBridgeAttributes
.OvsdbBridgeAugmentationBuilder(OvsdbBridgeAugmentation base)
Construct a builder initialized with state from specifiedOvsdbBridgeAugmentation
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull OvsdbBridgeAugmentation
build()
A newOvsdbBridgeAugmentation
instance.void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid
getAutoAttach()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getAutoAttach()
.Map<BridgeExternalIdsKey,BridgeExternalIds>
getBridgeExternalIds()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeExternalIds()
.OvsdbBridgeName
getBridgeName()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeName()
.org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>
getBridgeOpenflowNodeRef()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeOpenflowNodeRef()
.Map<BridgeOtherConfigsKey,BridgeOtherConfigs>
getBridgeOtherConfigs()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeOtherConfigs()
.org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid
getBridgeUuid()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeUuid()
.Map<ControllerEntryKey,ControllerEntry>
getControllerEntry()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getControllerEntry()
.DatapathId
getDatapathId()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getDatapathId()
.Class<? extends DatapathTypeBase>
getDatapathType()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getDatapathType()
.Class<? extends OvsdbFailModeBase>
getFailMode()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getFailMode()
.FlowNodeRef
getFlowNode()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getFlowNode()
.OvsdbNodeRef
getManagedBy()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getManagedBy()
.Map<ProtocolEntryKey,ProtocolEntry>
getProtocolEntry()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getProtocolEntry()
.Boolean
getStpEnable()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getStpEnable()
.OvsdbBridgeAugmentationBuilder
setAutoAttach(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value)
Set the property corresponding toOvsdbBridgeAttributes.getAutoAttach()
to the specified value.OvsdbBridgeAugmentationBuilder
setBridgeExternalIds(Map<BridgeExternalIdsKey,BridgeExternalIds> values)
Set the property corresponding toOvsdbBridgeAttributes.getBridgeExternalIds()
to the specified value.OvsdbBridgeAugmentationBuilder
setBridgeName(OvsdbBridgeName value)
Set the property corresponding toOvsdbBridgeAttributes.getBridgeName()
to the specified value.OvsdbBridgeAugmentationBuilder
setBridgeOpenflowNodeRef(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> value)
Set the property corresponding toOvsdbBridgeAttributes.getBridgeOpenflowNodeRef()
to the specified value.OvsdbBridgeAugmentationBuilder
setBridgeOtherConfigs(Map<BridgeOtherConfigsKey,BridgeOtherConfigs> values)
Set the property corresponding toOvsdbBridgeAttributes.getBridgeOtherConfigs()
to the specified value.OvsdbBridgeAugmentationBuilder
setBridgeUuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value)
Set the property corresponding toOvsdbBridgeAttributes.getBridgeUuid()
to the specified value.OvsdbBridgeAugmentationBuilder
setControllerEntry(Map<ControllerEntryKey,ControllerEntry> values)
Set the property corresponding toOvsdbBridgeAttributes.getControllerEntry()
to the specified value.OvsdbBridgeAugmentationBuilder
setDatapathId(DatapathId value)
Set the property corresponding toOvsdbBridgeAttributes.getDatapathId()
to the specified value.OvsdbBridgeAugmentationBuilder
setDatapathType(Class<? extends DatapathTypeBase> value)
Set the property corresponding toOvsdbBridgeAttributes.getDatapathType()
to the specified value.OvsdbBridgeAugmentationBuilder
setFailMode(Class<? extends OvsdbFailModeBase> value)
Set the property corresponding toOvsdbBridgeAttributes.getFailMode()
to the specified value.OvsdbBridgeAugmentationBuilder
setFlowNode(FlowNodeRef value)
Set the property corresponding toOvsdbBridgeAttributes.getFlowNode()
to the specified value.OvsdbBridgeAugmentationBuilder
setManagedBy(OvsdbNodeRef value)
Set the property corresponding toOvsdbBridgeAttributes.getManagedBy()
to the specified value.OvsdbBridgeAugmentationBuilder
setProtocolEntry(Map<ProtocolEntryKey,ProtocolEntry> values)
Set the property corresponding toOvsdbBridgeAttributes.getProtocolEntry()
to the specified value.OvsdbBridgeAugmentationBuilder
setStpEnable(Boolean value)
Set the property corresponding toOvsdbBridgeAttributes.getStpEnable()
to the specified value.
-
-
-
Constructor Detail
-
OvsdbBridgeAugmentationBuilder
public OvsdbBridgeAugmentationBuilder()
Construct an empty builder.
-
OvsdbBridgeAugmentationBuilder
public OvsdbBridgeAugmentationBuilder(OvsdbBridgeAttributes arg)
Construct a new builder initialized from specifiedOvsdbBridgeAttributes
.- Parameters:
arg
- OvsdbBridgeAttributes from which the builder should be initialized
-
OvsdbBridgeAugmentationBuilder
public OvsdbBridgeAugmentationBuilder(OvsdbBridgeAugmentation base)
Construct a builder initialized with state from specifiedOvsdbBridgeAugmentation
.- Parameters:
base
- OvsdbBridgeAugmentation from which the builder should be initialized
-
-
Method Detail
-
fieldsFrom
public void fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument. Valid argument is instance of one of following types:- Parameters:
arg
- grouping object- Throws:
IllegalArgumentException
- if given argument is none of valid types or has property with incompatible value
-
getAutoAttach
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid getAutoAttach()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getAutoAttach()
.- Returns:
- current value
-
getBridgeExternalIds
public Map<BridgeExternalIdsKey,BridgeExternalIds> getBridgeExternalIds()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeExternalIds()
.- Returns:
- current value
-
getBridgeName
public OvsdbBridgeName getBridgeName()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeName()
.- Returns:
- current value
-
getBridgeOpenflowNodeRef
public org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> getBridgeOpenflowNodeRef()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeOpenflowNodeRef()
.- Returns:
- current value
-
getBridgeOtherConfigs
public Map<BridgeOtherConfigsKey,BridgeOtherConfigs> getBridgeOtherConfigs()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeOtherConfigs()
.- Returns:
- current value
-
getBridgeUuid
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid getBridgeUuid()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getBridgeUuid()
.- Returns:
- current value
-
getControllerEntry
public Map<ControllerEntryKey,ControllerEntry> getControllerEntry()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getControllerEntry()
.- Returns:
- current value
-
getDatapathId
public DatapathId getDatapathId()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getDatapathId()
.- Returns:
- current value
-
getDatapathType
public Class<? extends DatapathTypeBase> getDatapathType()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getDatapathType()
.- Returns:
- current value
-
getFailMode
public Class<? extends OvsdbFailModeBase> getFailMode()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getFailMode()
.- Returns:
- current value
-
getFlowNode
public FlowNodeRef getFlowNode()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getFlowNode()
.- Returns:
- current value
-
getManagedBy
public OvsdbNodeRef getManagedBy()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getManagedBy()
.- Returns:
- current value
-
getProtocolEntry
public Map<ProtocolEntryKey,ProtocolEntry> getProtocolEntry()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getProtocolEntry()
.- Returns:
- current value
-
getStpEnable
public Boolean getStpEnable()
Return current value associated with the property corresponding toOvsdbBridgeAttributes.getStpEnable()
.- Returns:
- current value
-
setAutoAttach
public OvsdbBridgeAugmentationBuilder setAutoAttach(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value)
Set the property corresponding toOvsdbBridgeAttributes.getAutoAttach()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setBridgeExternalIds
public OvsdbBridgeAugmentationBuilder setBridgeExternalIds(Map<BridgeExternalIdsKey,BridgeExternalIds> values)
Set the property corresponding toOvsdbBridgeAttributes.getBridgeExternalIds()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setBridgeName
public OvsdbBridgeAugmentationBuilder setBridgeName(OvsdbBridgeName value)
Set the property corresponding toOvsdbBridgeAttributes.getBridgeName()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setBridgeOpenflowNodeRef
public OvsdbBridgeAugmentationBuilder setBridgeOpenflowNodeRef(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> value)
Set the property corresponding toOvsdbBridgeAttributes.getBridgeOpenflowNodeRef()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setBridgeOtherConfigs
public OvsdbBridgeAugmentationBuilder setBridgeOtherConfigs(Map<BridgeOtherConfigsKey,BridgeOtherConfigs> values)
Set the property corresponding toOvsdbBridgeAttributes.getBridgeOtherConfigs()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setBridgeUuid
public OvsdbBridgeAugmentationBuilder setBridgeUuid(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value)
Set the property corresponding toOvsdbBridgeAttributes.getBridgeUuid()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setControllerEntry
public OvsdbBridgeAugmentationBuilder setControllerEntry(Map<ControllerEntryKey,ControllerEntry> values)
Set the property corresponding toOvsdbBridgeAttributes.getControllerEntry()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setDatapathId
public OvsdbBridgeAugmentationBuilder setDatapathId(DatapathId value)
Set the property corresponding toOvsdbBridgeAttributes.getDatapathId()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setDatapathType
public OvsdbBridgeAugmentationBuilder setDatapathType(Class<? extends DatapathTypeBase> value)
Set the property corresponding toOvsdbBridgeAttributes.getDatapathType()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setFailMode
public OvsdbBridgeAugmentationBuilder setFailMode(Class<? extends OvsdbFailModeBase> value)
Set the property corresponding toOvsdbBridgeAttributes.getFailMode()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setFlowNode
public OvsdbBridgeAugmentationBuilder setFlowNode(FlowNodeRef value)
Set the property corresponding toOvsdbBridgeAttributes.getFlowNode()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setManagedBy
public OvsdbBridgeAugmentationBuilder setManagedBy(OvsdbNodeRef value)
Set the property corresponding toOvsdbBridgeAttributes.getManagedBy()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
setProtocolEntry
public OvsdbBridgeAugmentationBuilder setProtocolEntry(Map<ProtocolEntryKey,ProtocolEntry> values)
Set the property corresponding toOvsdbBridgeAttributes.getProtocolEntry()
to the specified value.- Parameters:
values
- desired value- Returns:
- this builder
-
setStpEnable
public OvsdbBridgeAugmentationBuilder setStpEnable(Boolean value)
Set the property corresponding toOvsdbBridgeAttributes.getStpEnable()
to the specified value.- Parameters:
value
- desired value- Returns:
- this builder
-
build
public @NonNull OvsdbBridgeAugmentation build()
A newOvsdbBridgeAugmentation
instance.- Returns:
- A new
OvsdbBridgeAugmentation
instance.
-
-