Class GroupEntityBuilder
- java.lang.Object
-
- org.opendaylight.genius.mdsalutil.GroupEntity.Builder
-
- org.opendaylight.genius.mdsalutil.GroupEntityBuilder
-
- All Implemented Interfaces:
org.opendaylight.yangtools.concepts.Builder<GroupEntity>
,org.opendaylight.yangtools.concepts.CheckedBuilder<GroupEntity,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 GroupEntityBuilder extends GroupEntity.Builder
Builds instances of typeGroupEntity
. Initialize attributes and then invoke thebuild()
method to create an immutable instance.GroupEntityBuilder
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 GroupEntityBuilder()
Creates a builder forGroupEntity
instances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GroupEntityBuilder
addAllBucketInfoList(java.lang.Iterable<? extends BucketInfo> elements)
Adds elements tobucketInfoList
list.GroupEntityBuilder
addBucketInfoList(BucketInfo element)
Adds one element tobucketInfoList
list.GroupEntityBuilder
addBucketInfoList(BucketInfo... elements)
Adds elements tobucketInfoList
list.GroupEntity
build()
Builds a newGroupEntity
.GroupEntityBuilder
from(AbstractSwitchEntity instance)
Fill a builder with attribute values from the providedorg.opendaylight.genius.mdsalutil.AbstractSwitchEntity
instance.GroupEntityBuilder
from(GroupEntity instance)
Fill a builder with attribute values from the providedorg.opendaylight.genius.mdsalutil.GroupEntity
instance.GroupEntityBuilder
setBucketInfoList(java.lang.Iterable<? extends BucketInfo> elements)
Sets or replaces all elements forbucketInfoList
list.GroupEntityBuilder
setDpnId(org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Initializes the value for thedpnId
attribute.GroupEntityBuilder
setGroupId(long groupId)
Initializes the value for thegroupId
attribute.GroupEntityBuilder
setGroupName(java.lang.String groupName)
Initializes the value for thegroupName
attribute.GroupEntityBuilder
setGroupType(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupTypes groupType)
Initializes the value for thegroupType
attribute.
-
-
-
Constructor Detail
-
GroupEntityBuilder
public GroupEntityBuilder()
Creates a builder forGroupEntity
instances.new GroupEntityBuilder() .setDpnId(org.opendaylight.yangtools.yang.common.Uint64) // required
dpnId
.addBucketInfoList|addAllBucketInfoList(org.opendaylight.genius.mdsalutil.BucketInfo) //bucketInfoList
elements .setGroupId(long) // requiredgroupId
.setGroupName(String) // requiredgroupName
.setGroupType(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupTypes) // requiredgroupType
.build();
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final GroupEntityBuilder 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 GroupEntityBuilder from(GroupEntity instance)
Fill a builder with attribute values from the providedorg.opendaylight.genius.mdsalutil.GroupEntity
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setDpnId
@CanIgnoreReturnValue public final GroupEntityBuilder 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
-
addBucketInfoList
@CanIgnoreReturnValue public final GroupEntityBuilder addBucketInfoList(BucketInfo element)
Adds one element tobucketInfoList
list.- Parameters:
element
- A bucketInfoList element- Returns:
this
builder for use in a chained invocation
-
addBucketInfoList
@CanIgnoreReturnValue public final GroupEntityBuilder addBucketInfoList(BucketInfo... elements)
Adds elements tobucketInfoList
list.- Parameters:
elements
- An array of bucketInfoList elements- Returns:
this
builder for use in a chained invocation
-
setBucketInfoList
@CanIgnoreReturnValue public final GroupEntityBuilder setBucketInfoList(java.lang.Iterable<? extends BucketInfo> elements)
Sets or replaces all elements forbucketInfoList
list.- Parameters:
elements
- An iterable of bucketInfoList elements- Returns:
this
builder for use in a chained invocation
-
addAllBucketInfoList
@CanIgnoreReturnValue public final GroupEntityBuilder addAllBucketInfoList(java.lang.Iterable<? extends BucketInfo> elements)
Adds elements tobucketInfoList
list.- Parameters:
elements
- An iterable of bucketInfoList elements- Returns:
this
builder for use in a chained invocation
-
setGroupId
@CanIgnoreReturnValue public final GroupEntityBuilder setGroupId(long groupId)
Initializes the value for thegroupId
attribute.- Parameters:
groupId
- The value for groupId- Returns:
this
builder for use in a chained invocation
-
setGroupName
@CanIgnoreReturnValue public final GroupEntityBuilder setGroupName(java.lang.String groupName)
Initializes the value for thegroupName
attribute.- Parameters:
groupName
- The value for groupName- Returns:
this
builder for use in a chained invocation
-
setGroupType
@CanIgnoreReturnValue public final GroupEntityBuilder setGroupType(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupTypes groupType)
Initializes the value for thegroupType
attribute.- Parameters:
groupType
- The value for groupType- Returns:
this
builder for use in a chained invocation
-
build
public GroupEntity build()
Builds a newGroupEntity
.- Returns:
- An immutable instance of GroupEntity
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-
-