Class VpnInstanceOpDataEntryBuilder
- java.lang.Object
-
- org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntryBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<VpnInstanceOpDataEntry>
,org.opendaylight.yangtools.concepts.CheckedBuilder<VpnInstanceOpDataEntry,java.lang.IllegalArgumentException>
,org.opendaylight.yangtools.concepts.Mutable
,org.opendaylight.yangtools.concepts.MutationBehaviour<org.opendaylight.yangtools.concepts.Mutable>
@Generated("mdsal-binding-generator") public class VpnInstanceOpDataEntryBuilder extends java.lang.Object implements org.opendaylight.yangtools.concepts.Builder<VpnInstanceOpDataEntry>
Class that buildsVpnInstanceOpDataEntryBuilder
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:
VpnInstanceOpDataEntryBuilder createTarget(int fooXyzzy, int barBaz) { return new VpnInstanceOpDataEntryBuilderBuilder() .setFoo(new FooBuilder().setXyzzy(fooXyzzy).build()) .setBar(new BarBuilder().setBaz(barBaz).build()) .build(); }
This pattern is supported by the immutable nature of VpnInstanceOpDataEntryBuilder, 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:
VpnInstanceOpDataEntryBuilder
,Builder
-
-
Constructor Summary
Constructors Constructor Description VpnInstanceOpDataEntryBuilder()
VpnInstanceOpDataEntryBuilder(VpnInstanceOpDataEntry base)
VpnInstanceOpDataEntryBuilder(VpnRouteList arg)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description VpnInstanceOpDataEntryBuilder
addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<VpnInstanceOpDataEntry> augmentation)
Add an augmentation to this builder's product.<E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<VpnInstanceOpDataEntry>>
E$$augmentation(java.lang.Class<E$$> augmentationType)
VpnInstanceOpDataEntry
build()
void
fieldsFrom(org.opendaylight.yangtools.yang.binding.DataObject arg)
Set fields from given grouping argument.VpnInstanceOpDataEntry.BgpvpnType
getBgpvpnType()
VpnInstanceOpDataEntry.IpAddressFamilyConfigured
getIpAddressFamilyConfigured()
org.opendaylight.yangtools.yang.common.Uint32
getL3vni()
java.util.List<java.lang.String>
getRd()
java.util.List<org.opendaylight.yangtools.yang.common.Uint32>
getRouteEntryId()
VpnInstanceOpDataEntry.Type
getType()
org.opendaylight.yangtools.yang.common.Uint32
getVpnId()
java.lang.String
getVpnInstanceName()
org.opendaylight.yangtools.yang.common.Uint32
getVpnInterfaceCount()
VpnInstanceOpDataEntry.VpnState
getVpnState()
VpnTargets
getVpnTargets()
java.util.Map<VpnToDpnListKey,VpnToDpnList>
getVpnToDpnList()
java.lang.String
getVrfId()
VpnInstanceOpDataEntryKey
key()
VpnInstanceOpDataEntryBuilder
removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<VpnInstanceOpDataEntry>> augmentationType)
Remove an augmentation from this builder's product.VpnInstanceOpDataEntryBuilder
setBgpvpnType(VpnInstanceOpDataEntry.BgpvpnType value)
VpnInstanceOpDataEntryBuilder
setIpAddressFamilyConfigured(VpnInstanceOpDataEntry.IpAddressFamilyConfigured value)
VpnInstanceOpDataEntryBuilder
setL3vni(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetL3vni(Uint32)
instead.VpnInstanceOpDataEntryBuilder
setL3vni(org.opendaylight.yangtools.yang.common.Uint32 value)
VpnInstanceOpDataEntryBuilder
setRd(java.util.List<java.lang.String> values)
VpnInstanceOpDataEntryBuilder
setRouteEntryId(java.util.List<org.opendaylight.yangtools.yang.common.Uint32> values)
VpnInstanceOpDataEntryBuilder
setType(VpnInstanceOpDataEntry.Type value)
VpnInstanceOpDataEntryBuilder
setVpnId(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetVpnId(Uint32)
instead.VpnInstanceOpDataEntryBuilder
setVpnId(org.opendaylight.yangtools.yang.common.Uint32 value)
VpnInstanceOpDataEntryBuilder
setVpnInstanceName(java.lang.String value)
VpnInstanceOpDataEntryBuilder
setVpnInterfaceCount(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetVpnInterfaceCount(Uint32)
instead.VpnInstanceOpDataEntryBuilder
setVpnInterfaceCount(org.opendaylight.yangtools.yang.common.Uint32 value)
VpnInstanceOpDataEntryBuilder
setVpnState(VpnInstanceOpDataEntry.VpnState value)
VpnInstanceOpDataEntryBuilder
setVpnTargets(VpnTargets value)
VpnInstanceOpDataEntryBuilder
setVpnToDpnList(java.util.List<VpnToDpnList> values)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetVpnToDpnList(Map)
instead.VpnInstanceOpDataEntryBuilder
setVpnToDpnList(java.util.Map<VpnToDpnListKey,VpnToDpnList> values)
VpnInstanceOpDataEntryBuilder
setVrfId(java.lang.String value)
VpnInstanceOpDataEntryBuilder
withKey(VpnInstanceOpDataEntryKey key)
-
-
-
Constructor Detail
-
VpnInstanceOpDataEntryBuilder
public VpnInstanceOpDataEntryBuilder()
-
VpnInstanceOpDataEntryBuilder
public VpnInstanceOpDataEntryBuilder(VpnRouteList arg)
-
VpnInstanceOpDataEntryBuilder
public VpnInstanceOpDataEntryBuilder(VpnInstanceOpDataEntry 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.l3vpn.rev130911.VpnRouteList
- Parameters:
arg
- grouping object- Throws:
java.lang.IllegalArgumentException
- if given argument is none of valid types or has property with incompatible value
-
key
public VpnInstanceOpDataEntryKey key()
-
getBgpvpnType
public VpnInstanceOpDataEntry.BgpvpnType getBgpvpnType()
-
getIpAddressFamilyConfigured
public VpnInstanceOpDataEntry.IpAddressFamilyConfigured getIpAddressFamilyConfigured()
-
getL3vni
public org.opendaylight.yangtools.yang.common.Uint32 getL3vni()
-
getRd
public java.util.List<java.lang.String> getRd()
-
getRouteEntryId
public java.util.List<org.opendaylight.yangtools.yang.common.Uint32> getRouteEntryId()
-
getType
public VpnInstanceOpDataEntry.Type getType()
-
getVpnId
public org.opendaylight.yangtools.yang.common.Uint32 getVpnId()
-
getVpnInstanceName
public java.lang.String getVpnInstanceName()
-
getVpnInterfaceCount
public org.opendaylight.yangtools.yang.common.Uint32 getVpnInterfaceCount()
-
getVpnState
public VpnInstanceOpDataEntry.VpnState getVpnState()
-
getVpnTargets
public VpnTargets getVpnTargets()
-
getVpnToDpnList
public java.util.Map<VpnToDpnListKey,VpnToDpnList> getVpnToDpnList()
-
getVrfId
public java.lang.String getVrfId()
-
augmentation
public <E$$ extends org.opendaylight.yangtools.yang.binding.Augmentation<VpnInstanceOpDataEntry>> E$$ augmentation(java.lang.Class<E$$> augmentationType)
-
withKey
public VpnInstanceOpDataEntryBuilder withKey(VpnInstanceOpDataEntryKey key)
-
setBgpvpnType
public VpnInstanceOpDataEntryBuilder setBgpvpnType(VpnInstanceOpDataEntry.BgpvpnType value)
-
setIpAddressFamilyConfigured
public VpnInstanceOpDataEntryBuilder setIpAddressFamilyConfigured(VpnInstanceOpDataEntry.IpAddressFamilyConfigured value)
-
setL3vni
public VpnInstanceOpDataEntryBuilder setL3vni(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setL3vni
@Deprecated(forRemoval=true) public VpnInstanceOpDataEntryBuilder 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
-
setRd
public VpnInstanceOpDataEntryBuilder setRd(java.util.List<java.lang.String> values)
-
setRouteEntryId
public VpnInstanceOpDataEntryBuilder setRouteEntryId(java.util.List<org.opendaylight.yangtools.yang.common.Uint32> values)
-
setType
public VpnInstanceOpDataEntryBuilder setType(VpnInstanceOpDataEntry.Type value)
-
setVpnId
public VpnInstanceOpDataEntryBuilder setVpnId(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setVpnId
@Deprecated(forRemoval=true) public VpnInstanceOpDataEntryBuilder setVpnId(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetVpnId(Uint32)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setVpnInstanceName
public VpnInstanceOpDataEntryBuilder setVpnInstanceName(java.lang.String value)
-
setVpnInterfaceCount
public VpnInstanceOpDataEntryBuilder setVpnInterfaceCount(org.opendaylight.yangtools.yang.common.Uint32 value)
-
setVpnInterfaceCount
@Deprecated(forRemoval=true) public VpnInstanceOpDataEntryBuilder setVpnInterfaceCount(java.lang.Long value)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetVpnInterfaceCount(Uint32)
instead.Utility migration setter.- Parameters:
value
- field value in legacy type- Returns:
- this builder
-
setVpnState
public VpnInstanceOpDataEntryBuilder setVpnState(VpnInstanceOpDataEntry.VpnState value)
-
setVpnTargets
public VpnInstanceOpDataEntryBuilder setVpnTargets(VpnTargets value)
-
setVpnToDpnList
public VpnInstanceOpDataEntryBuilder setVpnToDpnList(java.util.Map<VpnToDpnListKey,VpnToDpnList> values)
-
setVpnToDpnList
@Deprecated(forRemoval=true) public VpnInstanceOpDataEntryBuilder setVpnToDpnList(java.util.List<VpnToDpnList> values)
Deprecated, for removal: This API element is subject to removal in a future version.UsesetVpnToDpnList(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
-
setVrfId
public VpnInstanceOpDataEntryBuilder setVrfId(java.lang.String value)
-
addAugmentation
public VpnInstanceOpDataEntryBuilder addAugmentation(org.opendaylight.yangtools.yang.binding.Augmentation<VpnInstanceOpDataEntry> 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 VpnInstanceOpDataEntryBuilder removeAugmentation(java.lang.Class<? extends org.opendaylight.yangtools.yang.binding.Augmentation<VpnInstanceOpDataEntry>> 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 VpnInstanceOpDataEntry build()
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.Builder<VpnInstanceOpDataEntry>
- Specified by:
build
in interfaceorg.opendaylight.yangtools.concepts.CheckedBuilder<VpnInstanceOpDataEntry,java.lang.IllegalArgumentException>
-
-