Class FlowEntityBuilder

  • All Implemented Interfaces:
    org.opendaylight.yangtools.concepts.Builder<FlowEntity>, org.opendaylight.yangtools.concepts.CheckedBuilder<FlowEntity,​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 FlowEntityBuilder
    extends FlowEntity.Builder
    Builds instances of type FlowEntity. Initialize attributes and then invoke the build() method to create an immutable instance.

    FlowEntityBuilder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Constructor Detail

      • FlowEntityBuilder

        public FlowEntityBuilder()
        Creates a builder for FlowEntity instances.
         new FlowEntityBuilder()
            .setDpnId(org.opendaylight.yangtools.yang.common.Uint64) // required dpnId
            .setCookie(org.opendaylight.yangtools.yang.common.Uint64) // optional cookie
            .setFlowId(String) // required flowId
            .setFlowName(@org.eclipse.jdt.annotation.Nullable String | null) // nullable flowName
            .setHardTimeOut(int) // optional hardTimeOut
            .setIdleTimeOut(int) // optional idleTimeOut
            .addInstructionInfoList|addAllInstructionInfoList(org.opendaylight.genius.mdsalutil.InstructionInfo) // instructionInfoList elements
            .addMatchInfoList|addAllMatchInfoList(org.opendaylight.genius.mdsalutil.MatchInfoBase) // matchInfoList elements
            .setPriority(int) // optional priority
            .setSendFlowRemFlag(boolean) // optional sendFlowRemFlag
            .setStrictFlag(boolean) // optional strictFlag
            .setTableId(short) // required tableId
            .build();
         
    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final FlowEntityBuilder 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 FlowEntityBuilder from​(FlowEntity instance)
        Fill a builder with attribute values from the provided org.opendaylight.genius.mdsalutil.FlowEntity instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • setDpnId

        @CanIgnoreReturnValue
        public final FlowEntityBuilder 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
      • setCookie

        @CanIgnoreReturnValue
        public final FlowEntityBuilder setCookie​(org.opendaylight.yangtools.yang.common.Uint64 cookie)
        Initializes the value for the cookie attribute.

        If not set, this attribute will have a default value as returned by the initializer of cookie.

        Parameters:
        cookie - The value for cookie
        Returns:
        this builder for use in a chained invocation
      • setFlowId

        @CanIgnoreReturnValue
        public final FlowEntityBuilder setFlowId​(java.lang.String flowId)
        Initializes the value for the flowId attribute.
        Parameters:
        flowId - The value for flowId
        Returns:
        this builder for use in a chained invocation
      • setFlowName

        @CanIgnoreReturnValue
        public final FlowEntityBuilder setFlowName​(@Nullable java.lang.String flowName)
        Initializes the value for the flowName attribute.
        Parameters:
        flowName - The value for flowName (can be null)
        Returns:
        this builder for use in a chained invocation
      • setHardTimeOut

        @CanIgnoreReturnValue
        public final FlowEntityBuilder setHardTimeOut​(int hardTimeOut)
        Initializes the value for the hardTimeOut attribute.

        If not set, this attribute will have a default value as returned by the initializer of hardTimeOut.

        Parameters:
        hardTimeOut - The value for hardTimeOut
        Returns:
        this builder for use in a chained invocation
      • setIdleTimeOut

        @CanIgnoreReturnValue
        public final FlowEntityBuilder setIdleTimeOut​(int idleTimeOut)
        Initializes the value for the idleTimeOut attribute.

        If not set, this attribute will have a default value as returned by the initializer of idleTimeOut.

        Parameters:
        idleTimeOut - The value for idleTimeOut
        Returns:
        this builder for use in a chained invocation
      • addInstructionInfoList

        @CanIgnoreReturnValue
        public final FlowEntityBuilder addInstructionInfoList​(InstructionInfo element)
        Adds one element to instructionInfoList list.
        Parameters:
        element - A instructionInfoList element
        Returns:
        this builder for use in a chained invocation
      • addInstructionInfoList

        @CanIgnoreReturnValue
        public final FlowEntityBuilder addInstructionInfoList​(InstructionInfo... elements)
        Adds elements to instructionInfoList list.
        Parameters:
        elements - An array of instructionInfoList elements
        Returns:
        this builder for use in a chained invocation
      • setInstructionInfoList

        @CanIgnoreReturnValue
        public final FlowEntityBuilder setInstructionInfoList​(java.lang.Iterable<? extends InstructionInfo> elements)
        Sets or replaces all elements for instructionInfoList list.
        Parameters:
        elements - An iterable of instructionInfoList elements
        Returns:
        this builder for use in a chained invocation
      • addAllInstructionInfoList

        @CanIgnoreReturnValue
        public final FlowEntityBuilder addAllInstructionInfoList​(java.lang.Iterable<? extends InstructionInfo> elements)
        Adds elements to instructionInfoList list.
        Parameters:
        elements - An iterable of instructionInfoList elements
        Returns:
        this builder for use in a chained invocation
      • addMatchInfoList

        @CanIgnoreReturnValue
        public final FlowEntityBuilder addMatchInfoList​(MatchInfoBase element)
        Adds one element to matchInfoList list.
        Parameters:
        element - A matchInfoList element
        Returns:
        this builder for use in a chained invocation
      • addMatchInfoList

        @CanIgnoreReturnValue
        public final FlowEntityBuilder addMatchInfoList​(MatchInfoBase... elements)
        Adds elements to matchInfoList list.
        Parameters:
        elements - An array of matchInfoList elements
        Returns:
        this builder for use in a chained invocation
      • setMatchInfoList

        @CanIgnoreReturnValue
        public final FlowEntityBuilder setMatchInfoList​(java.lang.Iterable<? extends MatchInfoBase> elements)
        Sets or replaces all elements for matchInfoList list.
        Parameters:
        elements - An iterable of matchInfoList elements
        Returns:
        this builder for use in a chained invocation
      • addAllMatchInfoList

        @CanIgnoreReturnValue
        public final FlowEntityBuilder addAllMatchInfoList​(java.lang.Iterable<? extends MatchInfoBase> elements)
        Adds elements to matchInfoList list.
        Parameters:
        elements - An iterable of matchInfoList elements
        Returns:
        this builder for use in a chained invocation
      • setPriority

        @CanIgnoreReturnValue
        public final FlowEntityBuilder setPriority​(int priority)
        Initializes the value for the priority attribute.

        If not set, this attribute will have a default value as returned by the initializer of priority.

        Parameters:
        priority - The value for priority
        Returns:
        this builder for use in a chained invocation
      • setSendFlowRemFlag

        @CanIgnoreReturnValue
        public final FlowEntityBuilder setSendFlowRemFlag​(boolean sendFlowRemFlag)
        Initializes the value for the sendFlowRemFlag attribute.

        If not set, this attribute will have a default value as returned by the initializer of sendFlowRemFlag.

        Parameters:
        sendFlowRemFlag - The value for sendFlowRemFlag
        Returns:
        this builder for use in a chained invocation
      • setStrictFlag

        @CanIgnoreReturnValue
        public final FlowEntityBuilder setStrictFlag​(boolean strictFlag)
        Initializes the value for the strictFlag attribute.

        If not set, this attribute will have a default value as returned by the initializer of strictFlag.

        Parameters:
        strictFlag - The value for strictFlag
        Returns:
        this builder for use in a chained invocation
      • setTableId

        @CanIgnoreReturnValue
        public final FlowEntityBuilder setTableId​(short tableId)
        Initializes the value for the tableId attribute.
        Parameters:
        tableId - The value for tableId
        Returns:
        this builder for use in a chained invocation
      • build

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