Class AckRequest.Builder

  • All Implemented Interfaces:
    AckRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    AckRequest

    public static final class AckRequest.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
    implements AckRequestOrBuilder
    Protobuf type blipai.deckard.AckRequest
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
      • clear

        public AckRequest.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
      • getDefaultInstanceForType

        public AckRequest getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public AckRequest build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public AckRequest buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public AckRequest.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
      • setField

        public AckRequest.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                           Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
      • clearField

        public AckRequest.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
      • clearOneof

        public AckRequest.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
      • setRepeatedField

        public AckRequest.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   int index,
                                                   Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
      • addRepeatedField

        public AckRequest.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
      • mergeFrom

        public AckRequest.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AckRequest.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
      • mergeFrom

        public AckRequest.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AckRequest.Builder>
        Throws:
        IOException
      • getIdBytes

        public com.google.protobuf.ByteString getIdBytes()
         ID of the message
         
        string id = 1;
        Specified by:
        getIdBytes in interface AckRequestOrBuilder
        Returns:
        The bytes for id.
      • setId

        public AckRequest.Builder setId​(String value)
         ID of the message
         
        string id = 1;
        Parameters:
        value - The id to set.
        Returns:
        This builder for chaining.
      • clearId

        public AckRequest.Builder clearId()
         ID of the message
         
        string id = 1;
        Returns:
        This builder for chaining.
      • setIdBytes

        public AckRequest.Builder setIdBytes​(com.google.protobuf.ByteString value)
         ID of the message
         
        string id = 1;
        Parameters:
        value - The bytes for id to set.
        Returns:
        This builder for chaining.
      • getQueue

        public String getQueue()
         Queue where this message is stored
         
        string queue = 2;
        Specified by:
        getQueue in interface AckRequestOrBuilder
        Returns:
        The queue.
      • getQueueBytes

        public com.google.protobuf.ByteString getQueueBytes()
         Queue where this message is stored
         
        string queue = 2;
        Specified by:
        getQueueBytes in interface AckRequestOrBuilder
        Returns:
        The bytes for queue.
      • setQueue

        public AckRequest.Builder setQueue​(String value)
         Queue where this message is stored
         
        string queue = 2;
        Parameters:
        value - The queue to set.
        Returns:
        This builder for chaining.
      • clearQueue

        public AckRequest.Builder clearQueue()
         Queue where this message is stored
         
        string queue = 2;
        Returns:
        This builder for chaining.
      • setQueueBytes

        public AckRequest.Builder setQueueBytes​(com.google.protobuf.ByteString value)
         Queue where this message is stored
         
        string queue = 2;
        Parameters:
        value - The bytes for queue to set.
        Returns:
        This builder for chaining.
      • getReason

        public String getReason()
         Reason of this result.
         
         Useful for audit, mostly on 'nack' signals.
         
        string reason = 5;
        Specified by:
        getReason in interface AckRequestOrBuilder
        Returns:
        The reason.
      • getReasonBytes

        public com.google.protobuf.ByteString getReasonBytes()
         Reason of this result.
         
         Useful for audit, mostly on 'nack' signals.
         
        string reason = 5;
        Specified by:
        getReasonBytes in interface AckRequestOrBuilder
        Returns:
        The bytes for reason.
      • setReason

        public AckRequest.Builder setReason​(String value)
         Reason of this result.
         
         Useful for audit, mostly on 'nack' signals.
         
        string reason = 5;
        Parameters:
        value - The reason to set.
        Returns:
        This builder for chaining.
      • clearReason

        public AckRequest.Builder clearReason()
         Reason of this result.
         
         Useful for audit, mostly on 'nack' signals.
         
        string reason = 5;
        Returns:
        This builder for chaining.
      • setReasonBytes

        public AckRequest.Builder setReasonBytes​(com.google.protobuf.ByteString value)
         Reason of this result.
         
         Useful for audit, mostly on 'nack' signals.
         
        string reason = 5;
        Parameters:
        value - The bytes for reason to set.
        Returns:
        This builder for chaining.
      • getScoreSubtract

        @Deprecated
        public double getScoreSubtract()
        Deprecated.
        blipai.deckard.AckRequest.score_subtract is deprecated. See proto/deckard_service.proto;l=352
         This field is deprecated and will be removed in the future. If you need to change the message score, use the 'score' field.
         
         The value to subtract the score and increase final message priority.
         For example if you want to make this message to have a higher priority you can set 10000 which will represent 10s of score benefit in the default score algorithm.
         If you want to penalize the message you can send a negative number.
         
         IMPORTANT: The message will not be locked by, in the example, 10 seconds. This field is used only to increase or decrease the message priority in the priority queue.
         
         This field is used only for ack requests (since in nack requests the message will return with the lowest score to the queue).
         It will be ignored if used at the same time of 'score' or 'lock_ms' fields.
         
        double score_subtract = 3 [deprecated = true];
        Specified by:
        getScoreSubtract in interface AckRequestOrBuilder
        Returns:
        The scoreSubtract.
      • setScoreSubtract

        @Deprecated
        public AckRequest.Builder setScoreSubtract​(double value)
        Deprecated.
        blipai.deckard.AckRequest.score_subtract is deprecated. See proto/deckard_service.proto;l=352
         This field is deprecated and will be removed in the future. If you need to change the message score, use the 'score' field.
         
         The value to subtract the score and increase final message priority.
         For example if you want to make this message to have a higher priority you can set 10000 which will represent 10s of score benefit in the default score algorithm.
         If you want to penalize the message you can send a negative number.
         
         IMPORTANT: The message will not be locked by, in the example, 10 seconds. This field is used only to increase or decrease the message priority in the priority queue.
         
         This field is used only for ack requests (since in nack requests the message will return with the lowest score to the queue).
         It will be ignored if used at the same time of 'score' or 'lock_ms' fields.
         
        double score_subtract = 3 [deprecated = true];
        Parameters:
        value - The scoreSubtract to set.
        Returns:
        This builder for chaining.
      • clearScoreSubtract

        @Deprecated
        public AckRequest.Builder clearScoreSubtract()
        Deprecated.
        blipai.deckard.AckRequest.score_subtract is deprecated. See proto/deckard_service.proto;l=352
         This field is deprecated and will be removed in the future. If you need to change the message score, use the 'score' field.
         
         The value to subtract the score and increase final message priority.
         For example if you want to make this message to have a higher priority you can set 10000 which will represent 10s of score benefit in the default score algorithm.
         If you want to penalize the message you can send a negative number.
         
         IMPORTANT: The message will not be locked by, in the example, 10 seconds. This field is used only to increase or decrease the message priority in the priority queue.
         
         This field is used only for ack requests (since in nack requests the message will return with the lowest score to the queue).
         It will be ignored if used at the same time of 'score' or 'lock_ms' fields.
         
        double score_subtract = 3 [deprecated = true];
        Returns:
        This builder for chaining.
      • getBreakpoint

        public String getBreakpoint()
         Breakpoint is a field to be used as an auxiliar field for some specific use cases.
         For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system.
        
         Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id.
         Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited.
         
        string breakpoint = 4;
        Specified by:
        getBreakpoint in interface AckRequestOrBuilder
        Returns:
        The breakpoint.
      • getBreakpointBytes

        public com.google.protobuf.ByteString getBreakpointBytes()
         Breakpoint is a field to be used as an auxiliar field for some specific use cases.
         For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system.
        
         Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id.
         Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited.
         
        string breakpoint = 4;
        Specified by:
        getBreakpointBytes in interface AckRequestOrBuilder
        Returns:
        The bytes for breakpoint.
      • setBreakpoint

        public AckRequest.Builder setBreakpoint​(String value)
         Breakpoint is a field to be used as an auxiliar field for some specific use cases.
         For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system.
        
         Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id.
         Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited.
         
        string breakpoint = 4;
        Parameters:
        value - The breakpoint to set.
        Returns:
        This builder for chaining.
      • clearBreakpoint

        public AckRequest.Builder clearBreakpoint()
         Breakpoint is a field to be used as an auxiliar field for some specific use cases.
         For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system.
        
         Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id.
         Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited.
         
        string breakpoint = 4;
        Returns:
        This builder for chaining.
      • setBreakpointBytes

        public AckRequest.Builder setBreakpointBytes​(com.google.protobuf.ByteString value)
         Breakpoint is a field to be used as an auxiliar field for some specific use cases.
         For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system.
        
         Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id.
         Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited.
         
        string breakpoint = 4;
        Parameters:
        value - The bytes for breakpoint to set.
        Returns:
        This builder for chaining.
      • getLockMs

        public long getLockMs()
         Time in milliseconds to lock a message before returning it to the queue.
         For NACK requests the message will be locked before returning to first position in the priority queue. You can change this behavior using the 'score' field.
        
         For ACK requests the message will be locked before returning to last position in the priority queue. You can change this behavior using the 'score' field.
        
         IMPORTANT: Deckard checks for locked messages in a 1-second precision meaning the lock have a second precision and not milliseconds.
         This field is in milliseconds because all duration units on deckard are expressed in milliseconds and the default score algorithm uses milliseconds as well.
         
        int64 lock_ms = 6;
        Specified by:
        getLockMs in interface AckRequestOrBuilder
        Returns:
        The lockMs.
      • setLockMs

        public AckRequest.Builder setLockMs​(long value)
         Time in milliseconds to lock a message before returning it to the queue.
         For NACK requests the message will be locked before returning to first position in the priority queue. You can change this behavior using the 'score' field.
        
         For ACK requests the message will be locked before returning to last position in the priority queue. You can change this behavior using the 'score' field.
        
         IMPORTANT: Deckard checks for locked messages in a 1-second precision meaning the lock have a second precision and not milliseconds.
         This field is in milliseconds because all duration units on deckard are expressed in milliseconds and the default score algorithm uses milliseconds as well.
         
        int64 lock_ms = 6;
        Parameters:
        value - The lockMs to set.
        Returns:
        This builder for chaining.
      • clearLockMs

        public AckRequest.Builder clearLockMs()
         Time in milliseconds to lock a message before returning it to the queue.
         For NACK requests the message will be locked before returning to first position in the priority queue. You can change this behavior using the 'score' field.
        
         For ACK requests the message will be locked before returning to last position in the priority queue. You can change this behavior using the 'score' field.
        
         IMPORTANT: Deckard checks for locked messages in a 1-second precision meaning the lock have a second precision and not milliseconds.
         This field is in milliseconds because all duration units on deckard are expressed in milliseconds and the default score algorithm uses milliseconds as well.
         
        int64 lock_ms = 6;
        Returns:
        This builder for chaining.
      • getRemoveMessage

        public boolean getRemoveMessage()
         Whether the message should be removed when acked/nacked
         
        bool removeMessage = 7;
        Specified by:
        getRemoveMessage in interface AckRequestOrBuilder
        Returns:
        The removeMessage.
      • setRemoveMessage

        public AckRequest.Builder setRemoveMessage​(boolean value)
         Whether the message should be removed when acked/nacked
         
        bool removeMessage = 7;
        Parameters:
        value - The removeMessage to set.
        Returns:
        This builder for chaining.
      • clearRemoveMessage

        public AckRequest.Builder clearRemoveMessage()
         Whether the message should be removed when acked/nacked
         
        bool removeMessage = 7;
        Returns:
        This builder for chaining.
      • getScore

        public double getScore()
         Sets the score of the message when ACKed, to override the default score algorithm.
        
         If used at the same time with the 'lock_ms' attribute, the message will be locked for the specified time and then returned to the queue with the specified score.
        
         For ACK requests, if the score is not provided (or set to 0), the message will return to the queue with the default score algorithm which is the current timestamp in milliseconds.
        
         For NACKs requests, if the score is not provided (or set to 0), the message will return to the queue with the minimum score accepted by Deckard which is 0.
        
         Negative values will be converted to 0, which is how to set the highest priority to a message in a ACK/NACK request.
        
         REMEMBER: the maximum score accepted by Deckard is 9007199254740992 and the minimum is 0, so values outside this range will be capped.
         
        double score = 10;
        Specified by:
        getScore in interface AckRequestOrBuilder
        Returns:
        The score.
      • setScore

        public AckRequest.Builder setScore​(double value)
         Sets the score of the message when ACKed, to override the default score algorithm.
        
         If used at the same time with the 'lock_ms' attribute, the message will be locked for the specified time and then returned to the queue with the specified score.
        
         For ACK requests, if the score is not provided (or set to 0), the message will return to the queue with the default score algorithm which is the current timestamp in milliseconds.
        
         For NACKs requests, if the score is not provided (or set to 0), the message will return to the queue with the minimum score accepted by Deckard which is 0.
        
         Negative values will be converted to 0, which is how to set the highest priority to a message in a ACK/NACK request.
        
         REMEMBER: the maximum score accepted by Deckard is 9007199254740992 and the minimum is 0, so values outside this range will be capped.
         
        double score = 10;
        Parameters:
        value - The score to set.
        Returns:
        This builder for chaining.
      • clearScore

        public AckRequest.Builder clearScore()
         Sets the score of the message when ACKed, to override the default score algorithm.
        
         If used at the same time with the 'lock_ms' attribute, the message will be locked for the specified time and then returned to the queue with the specified score.
        
         For ACK requests, if the score is not provided (or set to 0), the message will return to the queue with the default score algorithm which is the current timestamp in milliseconds.
        
         For NACKs requests, if the score is not provided (or set to 0), the message will return to the queue with the minimum score accepted by Deckard which is 0.
        
         Negative values will be converted to 0, which is how to set the highest priority to a message in a ACK/NACK request.
        
         REMEMBER: the maximum score accepted by Deckard is 9007199254740992 and the minimum is 0, so values outside this range will be capped.
         
        double score = 10;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final AckRequest.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>
      • mergeUnknownFields

        public final AckRequest.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AckRequest.Builder>