Class Api.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
All Implemented Interfaces:
ApiOrBuilder, Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, MessageOrBuilder, Cloneable
Enclosing class:
Api

public static final class Api.Builder extends GeneratedMessage.Builder<Api.Builder> implements ApiOrBuilder
Protobuf type google.protobuf.Api
  • Method Details

    • getDescriptor

      public static final Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Description copied from class: GeneratedMessage.Builder
      Get the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.
      Specified by:
      internalGetFieldAccessorTable in class GeneratedMessage.Builder<Api.Builder>
    • clear

      public Api.Builder clear()
      Description copied from class: GeneratedMessage.Builder
      Called by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.
      Specified by:
      clear in interface Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class GeneratedMessage.Builder<Api.Builder>
    • getDescriptorForType

      public Descriptors.Descriptor getDescriptorForType()
      Description copied from interface: Message.Builder
      Get the message's type's descriptor. See MessageOrBuilder.getDescriptorForType().
      Specified by:
      getDescriptorForType in interface Message.Builder
      Specified by:
      getDescriptorForType in interface MessageOrBuilder
      Overrides:
      getDescriptorForType in class GeneratedMessage.Builder<Api.Builder>
    • getDefaultInstanceForType

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

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

      public Api buildPartial()
      Specified by:
      buildPartial in interface Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • 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>
    • mergeFrom

      public Api.Builder mergeFrom(Api other)
    • isInitialized

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

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

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

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

      public Api.Builder setName(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(com.google.protobuf.ByteString value)
      string name = 1 [json_name = "name"];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getMethodsList

      public 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(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"];
    • getMethodsOrBuilder

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

      public List<? extends MethodOrBuilder> getMethodsOrBuilderList()
      repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
      Specified by:
      getMethodsOrBuilderList in interface ApiOrBuilder
    • 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 List<Method.Builder> getMethodsBuilderList()
      repeated .google.protobuf.Method methods = 2 [json_name = "methods"];
    • getOptionsList

      public 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(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"];
    • getOptionsOrBuilder

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

      public List<? extends OptionOrBuilder> getOptionsOrBuilderList()
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
      Specified by:
      getOptionsOrBuilderList in interface ApiOrBuilder
    • 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 List<Option.Builder> getOptionsBuilderList()
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
    • getVersion

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

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

      public Api.Builder setVersion(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(com.google.protobuf.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"];
    • getSourceContextOrBuilder

      public SourceContextOrBuilder getSourceContextOrBuilder()
      .google.protobuf.SourceContext source_context = 5 [json_name = "sourceContext"];
      Specified by:
      getSourceContextOrBuilder in interface ApiOrBuilder
    • getMixinsList

      public 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(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"];
    • getMixinsOrBuilder

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

      public List<? extends MixinOrBuilder> getMixinsOrBuilderList()
      repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];
      Specified by:
      getMixinsOrBuilderList in interface ApiOrBuilder
    • 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 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.