Class 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 type GroupEntity. Initialize attributes and then invoke the build() 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 Detail

      • GroupEntityBuilder

        public GroupEntityBuilder()
        Creates a builder for GroupEntity instances.
         new GroupEntityBuilder()
            .setDpnId(org.opendaylight.yangtools.yang.common.Uint64) // required dpnId
            .addBucketInfoList|addAllBucketInfoList(org.opendaylight.genius.mdsalutil.BucketInfo) // bucketInfoList elements
            .setGroupId(long) // required groupId
            .setGroupName(String) // required groupName
            .setGroupType(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupTypes) // required groupType
            .build();
         
    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final GroupEntityBuilder from​(AbstractSwitchEntity instance)
        Fill a builder with attribute values from the provided org.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 provided org.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 the dpnId 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 to bucketInfoList 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 to bucketInfoList 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 for bucketInfoList 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 to bucketInfoList 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 the groupId 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 the groupName 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 the groupType attribute.
        Parameters:
        groupType - The value for groupType
        Returns:
        this builder for use in a chained invocation
      • build

        public GroupEntity build()
        Builds a new GroupEntity.
        Returns:
        An immutable instance of GroupEntity
        Throws:
        java.lang.IllegalStateException - if any required attributes are missing