Class Message.Builder

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

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

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Message.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Message.Builder>
      • internalGetFieldAccessorTable

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

        public Message.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<Message.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<Message.Builder>
      • getDefaultInstanceForType

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

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

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

        public Message.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<Message.Builder>
      • setField

        public Message.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<Message.Builder>
      • clearField

        public Message.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<Message.Builder>
      • clearOneof

        public Message.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<Message.Builder>
      • setRepeatedField

        public Message.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<Message.Builder>
      • addRepeatedField

        public Message.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<Message.Builder>
      • mergeFrom

        public Message.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<Message.Builder>
      • isInitialized

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

        public Message.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<Message.Builder>
        Throws:
        IOException
      • getId

        public String getId()
         ID is an unique identifier inside a queue.
         Any message with the same id and queue will be considered the same message.
         
        string id = 1;
        Specified by:
        getId in interface MessageOrBuilder
        Returns:
        The id.
      • getIdBytes

        public com.google.protobuf.ByteString getIdBytes()
         ID is an unique identifier inside a queue.
         Any message with the same id and queue will be considered the same message.
         
        string id = 1;
        Specified by:
        getIdBytes in interface MessageOrBuilder
        Returns:
        The bytes for id.
      • setId

        public Message.Builder setId​(String value)
         ID is an unique identifier inside a queue.
         Any message with the same id and queue will be considered the same message.
         
        string id = 1;
        Parameters:
        value - The id to set.
        Returns:
        This builder for chaining.
      • clearId

        public Message.Builder clearId()
         ID is an unique identifier inside a queue.
         Any message with the same id and queue will be considered the same message.
         
        string id = 1;
        Returns:
        This builder for chaining.
      • setIdBytes

        public Message.Builder setIdBytes​(com.google.protobuf.ByteString value)
         ID is an unique identifier inside a queue.
         Any message with the same id and queue will be considered the same message.
         
        string id = 1;
        Parameters:
        value - The bytes for id to set.
        Returns:
        This builder for chaining.
      • getDescription

        public String getDescription()
         Description of the message, this should be used as a human readable string to be used in diagnostics.
         
        string description = 2;
        Specified by:
        getDescription in interface MessageOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         Description of the message, this should be used as a human readable string to be used in diagnostics.
         
        string description = 2;
        Specified by:
        getDescriptionBytes in interface MessageOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public Message.Builder setDescription​(String value)
         Description of the message, this should be used as a human readable string to be used in diagnostics.
         
        string description = 2;
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public Message.Builder clearDescription()
         Description of the message, this should be used as a human readable string to be used in diagnostics.
         
        string description = 2;
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public Message.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         Description of the message, this should be used as a human readable string to be used in diagnostics.
         
        string description = 2;
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.
      • getQueue

        public String getQueue()
         Full name of the queue this message belongs (including any prefixes)
         
        string queue = 3;
        Specified by:
        getQueue in interface MessageOrBuilder
        Returns:
        The queue.
      • getQueueBytes

        public com.google.protobuf.ByteString getQueueBytes()
         Full name of the queue this message belongs (including any prefixes)
         
        string queue = 3;
        Specified by:
        getQueueBytes in interface MessageOrBuilder
        Returns:
        The bytes for queue.
      • setQueue

        public Message.Builder setQueue​(String value)
         Full name of the queue this message belongs (including any prefixes)
         
        string queue = 3;
        Parameters:
        value - The queue to set.
        Returns:
        This builder for chaining.
      • clearQueue

        public Message.Builder clearQueue()
         Full name of the queue this message belongs (including any prefixes)
         
        string queue = 3;
        Returns:
        This builder for chaining.
      • setQueueBytes

        public Message.Builder setQueueBytes​(com.google.protobuf.ByteString value)
         Full name of the queue this message belongs (including any prefixes)
         
        string queue = 3;
        Parameters:
        value - The bytes for queue to set.
        Returns:
        This builder for chaining.
      • getPayloadCount

        public int getPayloadCount()
        Description copied from interface: MessageOrBuilder
         A payload map with formatted data to be stored and used by clients.
         
        map<string, .google.protobuf.Any> payload = 8;
        Specified by:
        getPayloadCount in interface MessageOrBuilder
      • containsPayload

        public boolean containsPayload​(String key)
         A payload map with formatted data to be stored and used by clients.
         
        map<string, .google.protobuf.Any> payload = 8;
        Specified by:
        containsPayload in interface MessageOrBuilder
      • getPayloadMap

        public Map<String,​com.google.protobuf.Any> getPayloadMap()
         A payload map with formatted data to be stored and used by clients.
         
        map<string, .google.protobuf.Any> payload = 8;
        Specified by:
        getPayloadMap in interface MessageOrBuilder
      • getPayloadOrDefault

        public com.google.protobuf.Any getPayloadOrDefault​(String key,
                                                           com.google.protobuf.Any defaultValue)
         A payload map with formatted data to be stored and used by clients.
         
        map<string, .google.protobuf.Any> payload = 8;
        Specified by:
        getPayloadOrDefault in interface MessageOrBuilder
      • getPayloadOrThrow

        public com.google.protobuf.Any getPayloadOrThrow​(String key)
         A payload map with formatted data to be stored and used by clients.
         
        map<string, .google.protobuf.Any> payload = 8;
        Specified by:
        getPayloadOrThrow in interface MessageOrBuilder
      • removePayload

        public Message.Builder removePayload​(String key)
         A payload map with formatted data to be stored and used by clients.
         
        map<string, .google.protobuf.Any> payload = 8;
      • getMutablePayload

        @Deprecated
        public Map<String,​com.google.protobuf.Any> getMutablePayload()
        Deprecated.
        Use alternate mutation accessors instead.
      • putPayload

        public Message.Builder putPayload​(String key,
                                          com.google.protobuf.Any value)
         A payload map with formatted data to be stored and used by clients.
         
        map<string, .google.protobuf.Any> payload = 8;
      • putAllPayload

        public Message.Builder putAllPayload​(Map<String,​com.google.protobuf.Any> values)
         A payload map with formatted data to be stored and used by clients.
         
        map<string, .google.protobuf.Any> payload = 8;
      • getMetadataCount

        public int getMetadataCount()
        Description copied from interface: MessageOrBuilder
         Metadata is a map of string to be used as a key-value store.
         It is a simple way to store data that is not part of the message payload.
         
        map<string, string> metadata = 4;
        Specified by:
        getMetadataCount in interface MessageOrBuilder
      • containsMetadata

        public boolean containsMetadata​(String key)
         Metadata is a map of string to be used as a key-value store.
         It is a simple way to store data that is not part of the message payload.
         
        map<string, string> metadata = 4;
        Specified by:
        containsMetadata in interface MessageOrBuilder
      • getMetadataMap

        public Map<String,​String> getMetadataMap()
         Metadata is a map of string to be used as a key-value store.
         It is a simple way to store data that is not part of the message payload.
         
        map<string, string> metadata = 4;
        Specified by:
        getMetadataMap in interface MessageOrBuilder
      • getMetadataOrDefault

        public String getMetadataOrDefault​(String key,
                                           String defaultValue)
         Metadata is a map of string to be used as a key-value store.
         It is a simple way to store data that is not part of the message payload.
         
        map<string, string> metadata = 4;
        Specified by:
        getMetadataOrDefault in interface MessageOrBuilder
      • getMetadataOrThrow

        public String getMetadataOrThrow​(String key)
         Metadata is a map of string to be used as a key-value store.
         It is a simple way to store data that is not part of the message payload.
         
        map<string, string> metadata = 4;
        Specified by:
        getMetadataOrThrow in interface MessageOrBuilder
      • removeMetadata

        public Message.Builder removeMetadata​(String key)
         Metadata is a map of string to be used as a key-value store.
         It is a simple way to store data that is not part of the message payload.
         
        map<string, string> metadata = 4;
      • getMutableMetadata

        @Deprecated
        public Map<String,​String> getMutableMetadata()
        Deprecated.
        Use alternate mutation accessors instead.
      • putMetadata

        public Message.Builder putMetadata​(String key,
                                           String value)
         Metadata is a map of string to be used as a key-value store.
         It is a simple way to store data that is not part of the message payload.
         
        map<string, string> metadata = 4;
      • putAllMetadata

        public Message.Builder putAllMetadata​(Map<String,​String> values)
         Metadata is a map of string to be used as a key-value store.
         It is a simple way to store data that is not part of the message payload.
         
        map<string, string> metadata = 4;
      • getStringPayload

        public String getStringPayload()
         Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose.
         This field can be used to store simple string data instead of using the payload field.
         
        string string_payload = 5;
        Specified by:
        getStringPayload in interface MessageOrBuilder
        Returns:
        The stringPayload.
      • getStringPayloadBytes

        public com.google.protobuf.ByteString getStringPayloadBytes()
         Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose.
         This field can be used to store simple string data instead of using the payload field.
         
        string string_payload = 5;
        Specified by:
        getStringPayloadBytes in interface MessageOrBuilder
        Returns:
        The bytes for stringPayload.
      • setStringPayload

        public Message.Builder setStringPayload​(String value)
         Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose.
         This field can be used to store simple string data instead of using the payload field.
         
        string string_payload = 5;
        Parameters:
        value - The stringPayload to set.
        Returns:
        This builder for chaining.
      • clearStringPayload

        public Message.Builder clearStringPayload()
         Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose.
         This field can be used to store simple string data instead of using the payload field.
         
        string string_payload = 5;
        Returns:
        This builder for chaining.
      • setStringPayloadBytes

        public Message.Builder setStringPayloadBytes​(com.google.protobuf.ByteString value)
         Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose.
         This field can be used to store simple string data instead of using the payload field.
         
        string string_payload = 5;
        Parameters:
        value - The bytes for stringPayload to set.
        Returns:
        This builder for chaining.
      • getScore

        public double getScore()
         Score represents the priority score the message currently have in the queue.
         The lower the score, the higher the priority.
         The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0
         
        double score = 6;
        Specified by:
        getScore in interface MessageOrBuilder
        Returns:
        The score.
      • setScore

        public Message.Builder setScore​(double value)
         Score represents the priority score the message currently have in the queue.
         The lower the score, the higher the priority.
         The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0
         
        double score = 6;
        Parameters:
        value - The score to set.
        Returns:
        This builder for chaining.
      • clearScore

        public Message.Builder clearScore()
         Score represents the priority score the message currently have in the queue.
         The lower the score, the higher the priority.
         The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0
         
        double score = 6;
        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 = 7;
        Specified by:
        getBreakpoint in interface MessageOrBuilder
        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 = 7;
        Specified by:
        getBreakpointBytes in interface MessageOrBuilder
        Returns:
        The bytes for breakpoint.
      • setBreakpoint

        public Message.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 = 7;
        Parameters:
        value - The breakpoint to set.
        Returns:
        This builder for chaining.
      • clearBreakpoint

        public Message.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 = 7;
        Returns:
        This builder for chaining.
      • setBreakpointBytes

        public Message.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 = 7;
        Parameters:
        value - The bytes for breakpoint to set.
        Returns:
        This builder for chaining.
      • hasDiagnostics

        public boolean hasDiagnostics()
         Diagnostics is a field holding information about the message's usage.
         It is useful to track how many times a message was ACKed or NACKed.
         
        .blipai.deckard.MessageDiagnostics diagnostics = 9;
        Specified by:
        hasDiagnostics in interface MessageOrBuilder
        Returns:
        Whether the diagnostics field is set.
      • getDiagnostics

        public MessageDiagnostics getDiagnostics()
         Diagnostics is a field holding information about the message's usage.
         It is useful to track how many times a message was ACKed or NACKed.
         
        .blipai.deckard.MessageDiagnostics diagnostics = 9;
        Specified by:
        getDiagnostics in interface MessageOrBuilder
        Returns:
        The diagnostics.
      • setDiagnostics

        public Message.Builder setDiagnostics​(MessageDiagnostics value)
         Diagnostics is a field holding information about the message's usage.
         It is useful to track how many times a message was ACKed or NACKed.
         
        .blipai.deckard.MessageDiagnostics diagnostics = 9;
      • setDiagnostics

        public Message.Builder setDiagnostics​(MessageDiagnostics.Builder builderForValue)
         Diagnostics is a field holding information about the message's usage.
         It is useful to track how many times a message was ACKed or NACKed.
         
        .blipai.deckard.MessageDiagnostics diagnostics = 9;
      • mergeDiagnostics

        public Message.Builder mergeDiagnostics​(MessageDiagnostics value)
         Diagnostics is a field holding information about the message's usage.
         It is useful to track how many times a message was ACKed or NACKed.
         
        .blipai.deckard.MessageDiagnostics diagnostics = 9;
      • clearDiagnostics

        public Message.Builder clearDiagnostics()
         Diagnostics is a field holding information about the message's usage.
         It is useful to track how many times a message was ACKed or NACKed.
         
        .blipai.deckard.MessageDiagnostics diagnostics = 9;
      • getDiagnosticsBuilder

        public MessageDiagnostics.Builder getDiagnosticsBuilder()
         Diagnostics is a field holding information about the message's usage.
         It is useful to track how many times a message was ACKed or NACKed.
         
        .blipai.deckard.MessageDiagnostics diagnostics = 9;
      • getDiagnosticsOrBuilder

        public MessageDiagnosticsOrBuilder getDiagnosticsOrBuilder()
         Diagnostics is a field holding information about the message's usage.
         It is useful to track how many times a message was ACKed or NACKed.
         
        .blipai.deckard.MessageDiagnostics diagnostics = 9;
        Specified by:
        getDiagnosticsOrBuilder in interface MessageOrBuilder
      • setUnknownFields

        public final Message.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<Message.Builder>
      • mergeUnknownFields

        public final Message.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<Message.Builder>