Class Any.Builder

    • Method Detail

      • getDefaultInstanceForType

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

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

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

        public Any.Builder mergeFrom​(Message other)
        Description copied from interface: Message.Builder
        Merge other into the message being built. other must have the exact same type as this (i.e. getDescriptorForType() == other.getDescriptorForType()).

        Merging occurs as follows. For each field:
        * For singular primitive fields, if the field is set in other, then other's value overwrites the value in this message.
        * For singular message fields, if the field is set in other, it is merged into the corresponding sub-message of this message using the same merging rules.
        * For repeated fields, the elements in other are concatenated with the elements in this message.
        * For oneof groups, if the other message has one of the fields set, the group of this message is cleared and replaced by the field of the other message, so that the oneof constraint is preserved.

        This is equivalent to the Message::MergeFrom method in C++.

        Specified by:
        mergeFrom in interface Message.Builder
        Overrides:
        mergeFrom in class AbstractMessage.Builder<Any.Builder>
      • mergeFrom

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

        public java.lang.String getTypeUrl()
        string type_url = 1 [json_name = "typeUrl"];
        Specified by:
        getTypeUrl in interface AnyOrBuilder
        Returns:
        The typeUrl.
      • getTypeUrlBytes

        public com.google.protobuf.ByteString getTypeUrlBytes()
        string type_url = 1 [json_name = "typeUrl"];
        Specified by:
        getTypeUrlBytes in interface AnyOrBuilder
        Returns:
        The bytes for typeUrl.
      • setTypeUrl

        public Any.Builder setTypeUrl​(java.lang.String value)
        string type_url = 1 [json_name = "typeUrl"];
        Parameters:
        value - The typeUrl to set.
        Returns:
        This builder for chaining.
      • clearTypeUrl

        public Any.Builder clearTypeUrl()
        string type_url = 1 [json_name = "typeUrl"];
        Returns:
        This builder for chaining.
      • setTypeUrlBytes

        public Any.Builder setTypeUrlBytes​(com.google.protobuf.ByteString value)
        string type_url = 1 [json_name = "typeUrl"];
        Parameters:
        value - The bytes for typeUrl to set.
        Returns:
        This builder for chaining.
      • getValue

        public com.google.protobuf.ByteString getValue()
        bytes value = 2 [json_name = "value"];
        Specified by:
        getValue in interface AnyOrBuilder
        Returns:
        The value.
      • setValue

        public Any.Builder setValue​(com.google.protobuf.ByteString value)
        bytes value = 2 [json_name = "value"];
        Parameters:
        value - The value to set.
        Returns:
        This builder for chaining.
      • clearValue

        public Any.Builder clearValue()
        bytes value = 2 [json_name = "value"];
        Returns:
        This builder for chaining.