Class Api.Builder

    • Method Detail

      • getDefaultInstanceForType

        public Api getDefaultInstanceForType()
        Description copied from interface: MessageLiteOrBuilder
        Get an instance of the type with no fields set. Because no fields are set, all getters for singular fields will return default values and repeated fields will appear empty. This may or may not be a singleton. This differs from the getDefaultInstance() method of generated message classes in that this method is an abstract method of the MessageLite interface whereas getDefaultInstance() is a static method of a specific class. They return the same thing.
        Specified by:
        getDefaultInstanceForType in interface MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface MessageOrBuilder
      • mergeFrom

        public Api.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<Api.Builder>
      • getName

        public java.lang.String getName()
        string name = 1 [json_name = "name"];
        Specified by:
        getName in interface ApiOrBuilder
        Returns:
        The name.
      • getNameBytes

        public ByteString getNameBytes()
        string name = 1 [json_name = "name"];
        Specified by:
        getNameBytes in interface ApiOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Api.Builder setName​(java.lang.String value)
        string name = 1 [json_name = "name"];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Api.Builder clearName()
        string name = 1 [json_name = "name"];
        Returns:
        This builder for chaining.
      • setNameBytes

        public Api.Builder setNameBytes​(ByteString value)
        string name = 1 [json_name = "name"];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getMethodsList

        public java.util.List<Method> getMethodsList()
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
        Specified by:
        getMethodsList in interface ApiOrBuilder
      • getMethodsCount

        public int getMethodsCount()
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
        Specified by:
        getMethodsCount in interface ApiOrBuilder
      • getMethods

        public Method getMethods​(int index)
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
        Specified by:
        getMethods in interface ApiOrBuilder
      • setMethods

        public Api.Builder setMethods​(int index,
                                      Method value)
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
      • setMethods

        public Api.Builder setMethods​(int index,
                                      Method.Builder builderForValue)
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
      • addMethods

        public Api.Builder addMethods​(Method value)
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
      • addMethods

        public Api.Builder addMethods​(int index,
                                      Method value)
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
      • addMethods

        public Api.Builder addMethods​(Method.Builder builderForValue)
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
      • addMethods

        public Api.Builder addMethods​(int index,
                                      Method.Builder builderForValue)
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
      • addAllMethods

        public Api.Builder addAllMethods​(java.lang.Iterable<? extends Method> values)
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
      • clearMethods

        public Api.Builder clearMethods()
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
      • removeMethods

        public Api.Builder removeMethods​(int index)
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
      • getMethodsBuilder

        public Method.Builder getMethodsBuilder​(int index)
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
      • addMethodsBuilder

        public Method.Builder addMethodsBuilder()
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
      • addMethodsBuilder

        public Method.Builder addMethodsBuilder​(int index)
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
      • getMethodsBuilderList

        public java.util.List<Method.Builder> getMethodsBuilderList()
        repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
      • getOptionsList

        public java.util.List<Option> getOptionsList()
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
        Specified by:
        getOptionsList in interface ApiOrBuilder
      • getOptionsCount

        public int getOptionsCount()
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
        Specified by:
        getOptionsCount in interface ApiOrBuilder
      • getOptions

        public Option getOptions​(int index)
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
        Specified by:
        getOptions in interface ApiOrBuilder
      • setOptions

        public Api.Builder setOptions​(int index,
                                      Option value)
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
      • setOptions

        public Api.Builder setOptions​(int index,
                                      Option.Builder builderForValue)
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
      • addOptions

        public Api.Builder addOptions​(Option value)
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
      • addOptions

        public Api.Builder addOptions​(int index,
                                      Option value)
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
      • addOptions

        public Api.Builder addOptions​(Option.Builder builderForValue)
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
      • addOptions

        public Api.Builder addOptions​(int index,
                                      Option.Builder builderForValue)
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
      • addAllOptions

        public Api.Builder addAllOptions​(java.lang.Iterable<? extends Option> values)
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
      • clearOptions

        public Api.Builder clearOptions()
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
      • removeOptions

        public Api.Builder removeOptions​(int index)
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
      • getOptionsBuilder

        public Option.Builder getOptionsBuilder​(int index)
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
      • addOptionsBuilder

        public Option.Builder addOptionsBuilder()
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
      • addOptionsBuilder

        public Option.Builder addOptionsBuilder​(int index)
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
      • getOptionsBuilderList

        public java.util.List<Option.Builder> getOptionsBuilderList()
        repeated .google.protobuf.Option options = 3 [json_name = "options"];
      • getVersion

        public java.lang.String getVersion()
        string version = 4 [json_name = "version"];
        Specified by:
        getVersion in interface ApiOrBuilder
        Returns:
        The version.
      • getVersionBytes

        public ByteString getVersionBytes()
        string version = 4 [json_name = "version"];
        Specified by:
        getVersionBytes in interface ApiOrBuilder
        Returns:
        The bytes for version.
      • setVersion

        public Api.Builder setVersion​(java.lang.String value)
        string version = 4 [json_name = "version"];
        Parameters:
        value - The version to set.
        Returns:
        This builder for chaining.
      • clearVersion

        public Api.Builder clearVersion()
        string version = 4 [json_name = "version"];
        Returns:
        This builder for chaining.
      • setVersionBytes

        public Api.Builder setVersionBytes​(ByteString value)
        string version = 4 [json_name = "version"];
        Parameters:
        value - The bytes for version to set.
        Returns:
        This builder for chaining.
      • hasSourceContext

        public boolean hasSourceContext()
        .google.protobuf.SourceContext source_context = 5 [json_name = "sourceContext"];
        Specified by:
        hasSourceContext in interface ApiOrBuilder
        Returns:
        Whether the sourceContext field is set.
      • getSourceContext

        public SourceContext getSourceContext()
        .google.protobuf.SourceContext source_context = 5 [json_name = "sourceContext"];
        Specified by:
        getSourceContext in interface ApiOrBuilder
        Returns:
        The sourceContext.
      • setSourceContext

        public Api.Builder setSourceContext​(SourceContext value)
        .google.protobuf.SourceContext source_context = 5 [json_name = "sourceContext"];
      • setSourceContext

        public Api.Builder setSourceContext​(SourceContext.Builder builderForValue)
        .google.protobuf.SourceContext source_context = 5 [json_name = "sourceContext"];
      • mergeSourceContext

        public Api.Builder mergeSourceContext​(SourceContext value)
        .google.protobuf.SourceContext source_context = 5 [json_name = "sourceContext"];
      • clearSourceContext

        public Api.Builder clearSourceContext()
        .google.protobuf.SourceContext source_context = 5 [json_name = "sourceContext"];
      • getSourceContextBuilder

        public SourceContext.Builder getSourceContextBuilder()
        .google.protobuf.SourceContext source_context = 5 [json_name = "sourceContext"];
      • getMixinsList

        public java.util.List<Mixin> getMixinsList()
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
        Specified by:
        getMixinsList in interface ApiOrBuilder
      • getMixinsCount

        public int getMixinsCount()
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
        Specified by:
        getMixinsCount in interface ApiOrBuilder
      • getMixins

        public Mixin getMixins​(int index)
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
        Specified by:
        getMixins in interface ApiOrBuilder
      • setMixins

        public Api.Builder setMixins​(int index,
                                     Mixin value)
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
      • setMixins

        public Api.Builder setMixins​(int index,
                                     Mixin.Builder builderForValue)
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
      • addMixins

        public Api.Builder addMixins​(Mixin value)
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
      • addMixins

        public Api.Builder addMixins​(int index,
                                     Mixin value)
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
      • addMixins

        public Api.Builder addMixins​(Mixin.Builder builderForValue)
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
      • addMixins

        public Api.Builder addMixins​(int index,
                                     Mixin.Builder builderForValue)
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
      • addAllMixins

        public Api.Builder addAllMixins​(java.lang.Iterable<? extends Mixin> values)
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
      • clearMixins

        public Api.Builder clearMixins()
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
      • removeMixins

        public Api.Builder removeMixins​(int index)
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
      • getMixinsBuilder

        public Mixin.Builder getMixinsBuilder​(int index)
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
      • addMixinsBuilder

        public Mixin.Builder addMixinsBuilder()
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
      • addMixinsBuilder

        public Mixin.Builder addMixinsBuilder​(int index)
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
      • getMixinsBuilderList

        public java.util.List<Mixin.Builder> getMixinsBuilderList()
        repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
      • getSyntaxValue

        public int getSyntaxValue()
        .google.protobuf.Syntax syntax = 7 [json_name = "syntax"];
        Specified by:
        getSyntaxValue in interface ApiOrBuilder
        Returns:
        The enum numeric value on the wire for syntax.
      • setSyntaxValue

        public Api.Builder setSyntaxValue​(int value)
        .google.protobuf.Syntax syntax = 7 [json_name = "syntax"];
        Parameters:
        value - The enum numeric value on the wire for syntax to set.
        Returns:
        This builder for chaining.
      • getSyntax

        public Syntax getSyntax()
        .google.protobuf.Syntax syntax = 7 [json_name = "syntax"];
        Specified by:
        getSyntax in interface ApiOrBuilder
        Returns:
        The syntax.
      • setSyntax

        public Api.Builder setSyntax​(Syntax value)
        .google.protobuf.Syntax syntax = 7 [json_name = "syntax"];
        Parameters:
        value - The syntax to set.
        Returns:
        This builder for chaining.
      • clearSyntax

        public Api.Builder clearSyntax()
        .google.protobuf.Syntax syntax = 7 [json_name = "syntax"];
        Returns:
        This builder for chaining.