Package io.spine.net

Class Uri.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, UriOrBuilder, io.spine.validate.ValidatingBuilder<Uri>, Cloneable
    Enclosing class:
    Uri

    public static final class Uri.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Uri.Builder>
    implements io.spine.validate.ValidatingBuilder<Uri>, UriOrBuilder
     A URL in a structured form.
     This type represents URL according to RFC 3986.
     Using this type makes it easier to operate concrete URL attributes.
     Please see https://tools.ietf.org/html/rfc3986.
     This type is intended to be used only by parsing or validating utilities.
     For general purpose usage, please use `Url`.
     
    Protobuf type spine.net.Uri
    • 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<Uri.Builder>
      • clear

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

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

        public Uri build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
        Specified by:
        build in interface io.spine.validate.ValidatingBuilder<Uri>
      • buildPartial

        public Uri buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
        Specified by:
        buildPartial in interface io.spine.validate.ValidatingBuilder<Uri>
      • clone

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

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

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

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

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

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

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

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

        public Uri.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<Uri.Builder>
        Throws:
        IOException
      • hasProtocol

        public boolean hasProtocol()
         Application layer protocol.
         
        .spine.net.Uri.Protocol protocol = 1;
        Specified by:
        hasProtocol in interface UriOrBuilder
        Returns:
        Whether the protocol field is set.
      • getProtocol

        public Uri.Protocol getProtocol()
         Application layer protocol.
         
        .spine.net.Uri.Protocol protocol = 1;
        Specified by:
        getProtocol in interface UriOrBuilder
        Returns:
        The protocol.
      • setProtocol

        public Uri.Builder setProtocol​(Uri.Protocol value)
         Application layer protocol.
         
        .spine.net.Uri.Protocol protocol = 1;
      • mergeProtocol

        public Uri.Builder mergeProtocol​(Uri.Protocol value)
         Application layer protocol.
         
        .spine.net.Uri.Protocol protocol = 1;
      • clearProtocol

        public Uri.Builder clearProtocol()
         Application layer protocol.
         
        .spine.net.Uri.Protocol protocol = 1;
      • getProtocolBuilder

        public Uri.Protocol.Builder getProtocolBuilder()
         Application layer protocol.
         
        .spine.net.Uri.Protocol protocol = 1;
      • hasAuth

        public boolean hasAuth()
         User's email and password (both optional).
         
        .spine.net.Uri.Authorization auth = 2 [(.required) = false, (.validate) = true];
        Specified by:
        hasAuth in interface UriOrBuilder
        Returns:
        Whether the auth field is set.
      • getAuth

        public Uri.Authorization getAuth()
         User's email and password (both optional).
         
        .spine.net.Uri.Authorization auth = 2 [(.required) = false, (.validate) = true];
        Specified by:
        getAuth in interface UriOrBuilder
        Returns:
        The auth.
      • setAuth

        public Uri.Builder setAuth​(Uri.Authorization value)
         User's email and password (both optional).
         
        .spine.net.Uri.Authorization auth = 2 [(.required) = false, (.validate) = true];
      • setAuth

        public Uri.Builder setAuth​(Uri.Authorization.Builder builderForValue)
         User's email and password (both optional).
         
        .spine.net.Uri.Authorization auth = 2 [(.required) = false, (.validate) = true];
      • mergeAuth

        public Uri.Builder mergeAuth​(Uri.Authorization value)
         User's email and password (both optional).
         
        .spine.net.Uri.Authorization auth = 2 [(.required) = false, (.validate) = true];
      • clearAuth

        public Uri.Builder clearAuth()
         User's email and password (both optional).
         
        .spine.net.Uri.Authorization auth = 2 [(.required) = false, (.validate) = true];
      • getAuthBuilder

        public Uri.Authorization.Builder getAuthBuilder()
         User's email and password (both optional).
         
        .spine.net.Uri.Authorization auth = 2 [(.required) = false, (.validate) = true];
      • getHost

        public String getHost()
         Domain name.
         
        string host = 3;
        Specified by:
        getHost in interface UriOrBuilder
        Returns:
        The host.
      • getHostBytes

        public com.google.protobuf.ByteString getHostBytes()
         Domain name.
         
        string host = 3;
        Specified by:
        getHostBytes in interface UriOrBuilder
        Returns:
        The bytes for host.
      • setHost

        public Uri.Builder setHost​(String value)
         Domain name.
         
        string host = 3;
        Parameters:
        value - The host to set.
        Returns:
        This builder for chaining.
      • clearHost

        public Uri.Builder clearHost()
         Domain name.
         
        string host = 3;
        Returns:
        This builder for chaining.
      • setHostBytes

        public Uri.Builder setHostBytes​(com.google.protobuf.ByteString value)
         Domain name.
         
        string host = 3;
        Parameters:
        value - The bytes for host to set.
        Returns:
        This builder for chaining.
      • getPort

        public String getPort()
         Server's port (e.g. :8080).
         We leave port as string, because port 0 is hypothetically possible to use.
         
        string port = 4;
        Specified by:
        getPort in interface UriOrBuilder
        Returns:
        The port.
      • getPortBytes

        public com.google.protobuf.ByteString getPortBytes()
         Server's port (e.g. :8080).
         We leave port as string, because port 0 is hypothetically possible to use.
         
        string port = 4;
        Specified by:
        getPortBytes in interface UriOrBuilder
        Returns:
        The bytes for port.
      • setPort

        public Uri.Builder setPort​(String value)
         Server's port (e.g. :8080).
         We leave port as string, because port 0 is hypothetically possible to use.
         
        string port = 4;
        Parameters:
        value - The port to set.
        Returns:
        This builder for chaining.
      • clearPort

        public Uri.Builder clearPort()
         Server's port (e.g. :8080).
         We leave port as string, because port 0 is hypothetically possible to use.
         
        string port = 4;
        Returns:
        This builder for chaining.
      • setPortBytes

        public Uri.Builder setPortBytes​(com.google.protobuf.ByteString value)
         Server's port (e.g. :8080).
         We leave port as string, because port 0 is hypothetically possible to use.
         
        string port = 4;
        Parameters:
        value - The bytes for port to set.
        Returns:
        This builder for chaining.
      • getPath

        public String getPath()
         Relative path to desired resource (e.g. "/index" or "/js/app.js").
         
        string path = 5;
        Specified by:
        getPath in interface UriOrBuilder
        Returns:
        The path.
      • getPathBytes

        public com.google.protobuf.ByteString getPathBytes()
         Relative path to desired resource (e.g. "/index" or "/js/app.js").
         
        string path = 5;
        Specified by:
        getPathBytes in interface UriOrBuilder
        Returns:
        The bytes for path.
      • setPath

        public Uri.Builder setPath​(String value)
         Relative path to desired resource (e.g. "/index" or "/js/app.js").
         
        string path = 5;
        Parameters:
        value - The path to set.
        Returns:
        This builder for chaining.
      • clearPath

        public Uri.Builder clearPath()
         Relative path to desired resource (e.g. "/index" or "/js/app.js").
         
        string path = 5;
        Returns:
        This builder for chaining.
      • setPathBytes

        public Uri.Builder setPathBytes​(com.google.protobuf.ByteString value)
         Relative path to desired resource (e.g. "/index" or "/js/app.js").
         
        string path = 5;
        Parameters:
        value - The bytes for path to set.
        Returns:
        This builder for chaining.
      • getQueryCount

        public int getQueryCount()
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
        Specified by:
        getQueryCount in interface UriOrBuilder
      • getQuery

        public Uri.QueryParameter getQuery​(int index)
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
        Specified by:
        getQuery in interface UriOrBuilder
      • setQuery

        public Uri.Builder setQuery​(int index,
                                    Uri.QueryParameter value)
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
      • setQuery

        public Uri.Builder setQuery​(int index,
                                    Uri.QueryParameter.Builder builderForValue)
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
      • addQuery

        public Uri.Builder addQuery​(Uri.QueryParameter value)
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
      • addQuery

        public Uri.Builder addQuery​(int index,
                                    Uri.QueryParameter value)
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
      • addQuery

        public Uri.Builder addQuery​(Uri.QueryParameter.Builder builderForValue)
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
      • addQuery

        public Uri.Builder addQuery​(int index,
                                    Uri.QueryParameter.Builder builderForValue)
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
      • addAllQuery

        public Uri.Builder addAllQuery​(Iterable<? extends Uri.QueryParameter> values)
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
      • clearQuery

        public Uri.Builder clearQuery()
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
      • removeQuery

        public Uri.Builder removeQuery​(int index)
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
      • getQueryBuilder

        public Uri.QueryParameter.Builder getQueryBuilder​(int index)
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
      • addQueryBuilder

        public Uri.QueryParameter.Builder addQueryBuilder()
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
      • addQueryBuilder

        public Uri.QueryParameter.Builder addQueryBuilder​(int index)
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
      • getQueryBuilderList

        public List<Uri.QueryParameter.Builder> getQueryBuilderList()
         A list of key-value pairs (?key1=value1&key2=value2).
         
        repeated .spine.net.Uri.QueryParameter query = 6;
      • getFragment

        public String getFragment()
         Sub-resource (e.g. "#article").
         
        string fragment = 7;
        Specified by:
        getFragment in interface UriOrBuilder
        Returns:
        The fragment.
      • getFragmentBytes

        public com.google.protobuf.ByteString getFragmentBytes()
         Sub-resource (e.g. "#article").
         
        string fragment = 7;
        Specified by:
        getFragmentBytes in interface UriOrBuilder
        Returns:
        The bytes for fragment.
      • setFragment

        public Uri.Builder setFragment​(String value)
         Sub-resource (e.g. "#article").
         
        string fragment = 7;
        Parameters:
        value - The fragment to set.
        Returns:
        This builder for chaining.
      • clearFragment

        public Uri.Builder clearFragment()
         Sub-resource (e.g. "#article").
         
        string fragment = 7;
        Returns:
        This builder for chaining.
      • setFragmentBytes

        public Uri.Builder setFragmentBytes​(com.google.protobuf.ByteString value)
         Sub-resource (e.g. "#article").
         
        string fragment = 7;
        Parameters:
        value - The bytes for fragment to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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