Class SubnetOpDataEntryBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnet.op.data.SubnetOpDataEntryBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<SubnetOpDataEntry>
,org.opendaylight.yangtools.concepts.CheckedBuilder<SubnetOpDataEntry,java.lang.IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class SubnetOpDataEntryBuilder extends java.lang.Object implements org.opendaylight.yangtools.concepts.Builder<SubnetOpDataEntry>
Class that buildsSubnetOpDataEntryBuilder
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:
SubnetOpDataEntryBuilder createTarget(int fooXyzzy, int barBaz) { return new SubnetOpDataEntryBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of SubnetOpDataEntryBuilder, 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 oportunities, 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:
SubnetOpDataEntryBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description SubnetOpDataEntryBuilder()
SubnetOpDataEntryBuilder(SubnetOpDataEntry base)
SubnetOpDataEntryBuilder(NetworkAttributes arg)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SubnetOpDataEntryBuilder
addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<SubnetOpDataEntry> augmentation)
Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<SubnetOpDataEntry>>
E$$augmentation(java.lang.Class<E$$> augmentationType)
SubnetOpDataEntry
build()
void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.org.opendaylight.yangtools.yang.common.Uint32
getElanTag()
java.lang.Boolean
getExternal()
org.opendaylight.yangtools.yang.common.Uint32
getL3vni()
org.opendaylight.yangtools.yang.common.Uint32
getLabel()
TaskState
getLastAdvState()
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid
getNetworkId()
NetworkAttributes.NetworkType
getNetworkType()
org.opendaylight.yangtools.yang.common.Uint64
getNhDpnId()
TaskState
getRouteAdvState()
org.opendaylight.yangtools.yang.common.Uint32
getSegmentationId()
java.lang.String
getSubnetCidr()
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid
getSubnetId()
java.util.Map<SubnetToDpnKey,SubnetToDpn>
getSubnetToDpn()
java.lang.String
getVpnName()
java.lang.String
getVrfId()
java.lang.Boolean
isExternal()
Deprecated, for removal: This API element is subject to removal in a future version.SubnetOpDataEntryKey
key()
SubnetOpDataEntryBuilder
removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<SubnetOpDataEntry>> augmentationType)
Remove an augmentation from this builder's product.SubnetOpDataEntryBuilder
setElanTag(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetElanTag(Uint32)
instead.SubnetOpDataEntryBuilder
setElanTag(org.opendaylight.yangtools.yang.common.Uint32 value)
SubnetOpDataEntryBuilder
setExternal(java.lang.Boolean value)
SubnetOpDataEntryBuilder
setL3vni(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetL3vni(Uint32)
instead.SubnetOpDataEntryBuilder
setL3vni(org.opendaylight.yangtools.yang.common.Uint32 value)
SubnetOpDataEntryBuilder
setLabel(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetLabel(Uint32)
instead.SubnetOpDataEntryBuilder
setLabel(org.opendaylight.yangtools.yang.common.Uint32 value)
SubnetOpDataEntryBuilder
setLastAdvState(TaskState value)
SubnetOpDataEntryBuilder
setNetworkId(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value)
SubnetOpDataEntryBuilder
setNetworkType(NetworkAttributes.NetworkType value)
SubnetOpDataEntryBuilder
setNhDpnId(java.math.BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetNhDpnId(Uint64)
instead.SubnetOpDataEntryBuilder
setNhDpnId(org.opendaylight.yangtools.yang.common.Uint64 value)
SubnetOpDataEntryBuilder
setRouteAdvState(TaskState value)
SubnetOpDataEntryBuilder
setSegmentationId(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetSegmentationId(Uint32)
instead.SubnetOpDataEntryBuilder
setSegmentationId(org.opendaylight.yangtools.yang.common.Uint32 value)
SubnetOpDataEntryBuilder
setSubnetCidr(java.lang.String value)
SubnetOpDataEntryBuilder
setSubnetId(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value)
SubnetOpDataEntryBuilder
setSubnetToDpn(java.util.List<SubnetToDpn> values)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetSubnetToDpn(Map)
instead.SubnetOpDataEntryBuilder
setSubnetToDpn(java.util.Map<SubnetToDpnKey,SubnetToDpn> values)
SubnetOpDataEntryBuilder
setVpnName(java.lang.String value)
SubnetOpDataEntryBuilder
setVrfId(java.lang.String value)
SubnetOpDataEntryBuilder
withKey(SubnetOpDataEntryKey key)
-
-
-
Constructor Detail
-
SubnetOpDataEntryBuilder
public SubnetOpDataEntryBuilder()
-
SubnetOpDataEntryBuilder
public SubnetOpDataEntryBuilder(NetworkAttributes arg)
-
SubnetOpDataEntryBuilder
public SubnetOpDataEntryBuilder(SubnetOpDataEntry base)
-
-
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:- org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.NetworkAttributes
- Parameters:
arg
- grouping object- Throws:
java.lang.IllegalArgumentException
- if given argument is none of valid types or has property with incompatible value
-
key
public SubnetOpDataEntryKey key()
-
getElanTag
public org.opendaylight.yangtools.yang.common.Uint32 getElanTag()
-
getExternal
public java.lang.Boolean getExternal()
-
isExternal
@Deprecated(forRemoval=true) public final java.lang.Boolean isExternal()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getL3vni
public org.opendaylight.yangtools.yang.common.Uint32 getL3vni()
-
getLabel
public org.opendaylight.yangtools.yang.common.Uint32 getLabel()
-
getLastAdvState
public TaskState getLastAdvState()
-
getNetworkId
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid getNetworkId()
-
getNetworkType
public NetworkAttributes.NetworkType getNetworkType()
-
getNhDpnId
public org.opendaylight.yangtools.yang.common.Uint64 getNhDpnId()
-
getRouteAdvState
public TaskState getRouteAdvState()
-
getSegmentationId
public org.opendaylight.yangtools.yang.common.Uint32 getSegmentationId()
-
getSubnetCidr
public java.lang.String getSubnetCidr()
-
getSubnetId
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid getSubnetId()
-
getSubnetToDpn
public java.util.Map<SubnetToDpnKey,SubnetToDpn> getSubnetToDpn()
-
getVpnName
public java.lang.String getVpnName()
-
getVrfId
public java.lang.String getVrfId()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<SubnetOpDataEntry>> E$$ augmentation(java.lang.Class<E$$> augmentationType)
-
withKey
public SubnetOpDataEntryBuilder withKey(SubnetOpDataEntryKey key)
-
setElanTag
public SubnetOpDataEntryBuilder setElanTag(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setElanTag
@Deprecated(forRemoval=true) public SubnetOpDataEntryBuilder setElanTag(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetElanTag(Uint32)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setExternal
public SubnetOpDataEntryBuilder setExternal(java.lang.Boolean value)
-
setL3vni
public SubnetOpDataEntryBuilder setL3vni(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setL3vni
@Deprecated(forRemoval=true) public SubnetOpDataEntryBuilder setL3vni(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetL3vni(Uint32)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setLabel
public SubnetOpDataEntryBuilder setLabel(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setLabel
@Deprecated(forRemoval=true) public SubnetOpDataEntryBuilder setLabel(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetLabel(Uint32)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setLastAdvState
public SubnetOpDataEntryBuilder setLastAdvState(TaskState value)
-
setNetworkId
public SubnetOpDataEntryBuilder setNetworkId(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value)
-
setNetworkType
public SubnetOpDataEntryBuilder setNetworkType(NetworkAttributes.NetworkType value)
-
setNhDpnId
public SubnetOpDataEntryBuilder setNhDpnId(org.opendaylight.yangtools.yang.common.Uint64 value)
-
setNhDpnId
@Deprecated(forRemoval=true) public SubnetOpDataEntryBuilder setNhDpnId(java.math.BigInteger value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetNhDpnId(Uint64)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setRouteAdvState
public SubnetOpDataEntryBuilder setRouteAdvState(TaskState value)
-
setSegmentationId
public SubnetOpDataEntryBuilder setSegmentationId(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setSegmentationId
@Deprecated(forRemoval=true) public SubnetOpDataEntryBuilder setSegmentationId(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetSegmentationId(Uint32)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setSubnetCidr
public SubnetOpDataEntryBuilder setSubnetCidr(java.lang.String value)
-
setSubnetId
public SubnetOpDataEntryBuilder setSubnetId(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid value)
-
setSubnetToDpn
public SubnetOpDataEntryBuilder setSubnetToDpn(java.util.Map<SubnetToDpnKey,SubnetToDpn> values)
-
setSubnetToDpn
@Deprecated(forRemoval=true) public SubnetOpDataEntryBuilder setSubnetToDpn(java.util.List<SubnetToDpn> values)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetSubnetToDpn(Map)
instead.Utility migration setter. IMPORTANT NOTE: This method does not completely match previous mechanics, as the list is processed as during this method's execution. Any future modifications of the list are NOT reflected in this builder nor its products.- Parameters:
values
- Legacy List of values- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- if the list contains entries with the same keyjava.lang.NullPointerException
- if the list contains a null entry
-
setVpnName
public SubnetOpDataEntryBuilder setVpnName(java.lang.String value)
-
setVrfId
public SubnetOpDataEntryBuilder setVrfId(java.lang.String value)
-
addAugmentation
public SubnetOpDataEntryBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<SubnetOpDataEntry> augmentation)
Add an augmentation to this builder's product.- Parameters:
augmentation
- augmentation to be added- Returns:
- this builder
- Throws:
java.lang.NullPointerException
- ifaugmentation
is null
-
removeAugmentation
public SubnetOpDataEntryBuilder removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<SubnetOpDataEntry>> augmentationType)
Remove an augmentation from this builder's product. If this builder does not track such an augmentation type, this method does nothing.- Parameters:
augmentationType
- augmentation type to be removed- Returns:
- this builder
-
build
public SubnetOpDataEntry build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<SubnetOpDataEntry>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<SubnetOpDataEntry,java.lang.IllegalArgumentException>
-
-