Class StardocOutputProtos.AttributeInfo.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<StardocOutputProtos.AttributeInfo.Builder>
com.google.devtools.build.lib.starlarkdocextract.StardocOutputProtos.AttributeInfo.Builder
All Implemented Interfaces:
StardocOutputProtos.AttributeInfoOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
StardocOutputProtos.AttributeInfo

public static final class StardocOutputProtos.AttributeInfo.Builder extends com.google.protobuf.GeneratedMessage.Builder<StardocOutputProtos.AttributeInfo.Builder> implements StardocOutputProtos.AttributeInfoOrBuilder
 Representation of a Starlark rule, repository rule, or module extension tag
 attribute definition, comprised of an attribute name, and a schema defined by
 a call to one of the 'attr' module methods enumerated at
 https://bazel.build/rules/lib/attr
 
Protobuf type stardoc_output.AttributeInfo
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<StardocOutputProtos.AttributeInfo.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.GeneratedMessage.Builder<StardocOutputProtos.AttributeInfo.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.GeneratedMessage.Builder<StardocOutputProtos.AttributeInfo.Builder>
    • getDefaultInstanceForType

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

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

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

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

    • isInitialized

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

      public StardocOutputProtos.AttributeInfo.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<StardocOutputProtos.AttributeInfo.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       The name of the attribute.
       
      string name = 1;
      Specified by:
      getName in interface StardocOutputProtos.AttributeInfoOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The name of the attribute.
       
      string name = 1;
      Specified by:
      getNameBytes in interface StardocOutputProtos.AttributeInfoOrBuilder
      Returns:
      The bytes for name.
    • setName

       The name of the attribute.
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

       The name of the attribute.
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public StardocOutputProtos.AttributeInfo.Builder setNameBytes(com.google.protobuf.ByteString value)
       The name of the attribute.
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDocString

      public String getDocString()
       The documentation string of the attribute, supplied via the 'doc'
       parameter to the schema-creation call.
       
      string doc_string = 2;
      Specified by:
      getDocString in interface StardocOutputProtos.AttributeInfoOrBuilder
      Returns:
      The docString.
    • getDocStringBytes

      public com.google.protobuf.ByteString getDocStringBytes()
       The documentation string of the attribute, supplied via the 'doc'
       parameter to the schema-creation call.
       
      string doc_string = 2;
      Specified by:
      getDocStringBytes in interface StardocOutputProtos.AttributeInfoOrBuilder
      Returns:
      The bytes for docString.
    • setDocString

       The documentation string of the attribute, supplied via the 'doc'
       parameter to the schema-creation call.
       
      string doc_string = 2;
      Parameters:
      value - The docString to set.
      Returns:
      This builder for chaining.
    • clearDocString

       The documentation string of the attribute, supplied via the 'doc'
       parameter to the schema-creation call.
       
      string doc_string = 2;
      Returns:
      This builder for chaining.
    • setDocStringBytes

      public StardocOutputProtos.AttributeInfo.Builder setDocStringBytes(com.google.protobuf.ByteString value)
       The documentation string of the attribute, supplied via the 'doc'
       parameter to the schema-creation call.
       
      string doc_string = 2;
      Parameters:
      value - The bytes for docString to set.
      Returns:
      This builder for chaining.
    • getTypeValue

      public int getTypeValue()
       The type of the attribute, defined generally by which function is invoked
       in the attr module.
       
      .stardoc_output.AttributeType type = 3;
      Specified by:
      getTypeValue in interface StardocOutputProtos.AttributeInfoOrBuilder
      Returns:
      The enum numeric value on the wire for type.
    • setTypeValue

      public StardocOutputProtos.AttributeInfo.Builder setTypeValue(int value)
       The type of the attribute, defined generally by which function is invoked
       in the attr module.
       
      .stardoc_output.AttributeType type = 3;
      Parameters:
      value - The enum numeric value on the wire for type to set.
      Returns:
      This builder for chaining.
    • getType

       The type of the attribute, defined generally by which function is invoked
       in the attr module.
       
      .stardoc_output.AttributeType type = 3;
      Specified by:
      getType in interface StardocOutputProtos.AttributeInfoOrBuilder
      Returns:
      The type.
    • setType

       The type of the attribute, defined generally by which function is invoked
       in the attr module.
       
      .stardoc_output.AttributeType type = 3;
      Parameters:
      value - The type to set.
      Returns:
      This builder for chaining.
    • clearType

       The type of the attribute, defined generally by which function is invoked
       in the attr module.
       
      .stardoc_output.AttributeType type = 3;
      Returns:
      This builder for chaining.
    • getMandatory

      public boolean getMandatory()
       If true, all targets of the rule must specify a value for this attribute.
       
      bool mandatory = 4;
      Specified by:
      getMandatory in interface StardocOutputProtos.AttributeInfoOrBuilder
      Returns:
      The mandatory.
    • setMandatory

      public StardocOutputProtos.AttributeInfo.Builder setMandatory(boolean value)
       If true, all targets of the rule must specify a value for this attribute.
       
      bool mandatory = 4;
      Parameters:
      value - The mandatory to set.
      Returns:
      This builder for chaining.
    • clearMandatory

       If true, all targets of the rule must specify a value for this attribute.
       
      bool mandatory = 4;
      Returns:
      This builder for chaining.
    • getProviderNameGroupList

      public List<StardocOutputProtos.ProviderNameGroup> getProviderNameGroupList()
       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
      Specified by:
      getProviderNameGroupList in interface StardocOutputProtos.AttributeInfoOrBuilder
    • getProviderNameGroupCount

      public int getProviderNameGroupCount()
       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
      Specified by:
      getProviderNameGroupCount in interface StardocOutputProtos.AttributeInfoOrBuilder
    • getProviderNameGroup

      public StardocOutputProtos.ProviderNameGroup getProviderNameGroup(int index)
       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
      Specified by:
      getProviderNameGroup in interface StardocOutputProtos.AttributeInfoOrBuilder
    • setProviderNameGroup

       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
    • setProviderNameGroup

      public StardocOutputProtos.AttributeInfo.Builder setProviderNameGroup(int index, StardocOutputProtos.ProviderNameGroup.Builder builderForValue)
       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
    • addProviderNameGroup

       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
    • addProviderNameGroup

       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
    • addProviderNameGroup

       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
    • addProviderNameGroup

      public StardocOutputProtos.AttributeInfo.Builder addProviderNameGroup(int index, StardocOutputProtos.ProviderNameGroup.Builder builderForValue)
       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
    • addAllProviderNameGroup

       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
    • clearProviderNameGroup

      public StardocOutputProtos.AttributeInfo.Builder clearProviderNameGroup()
       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
    • removeProviderNameGroup

      public StardocOutputProtos.AttributeInfo.Builder removeProviderNameGroup(int index)
       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
    • getProviderNameGroupBuilder

      public StardocOutputProtos.ProviderNameGroup.Builder getProviderNameGroupBuilder(int index)
       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
    • getProviderNameGroupOrBuilder

      public StardocOutputProtos.ProviderNameGroupOrBuilder getProviderNameGroupOrBuilder(int index)
       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
      Specified by:
      getProviderNameGroupOrBuilder in interface StardocOutputProtos.AttributeInfoOrBuilder
    • getProviderNameGroupOrBuilderList

      public List<? extends StardocOutputProtos.ProviderNameGroupOrBuilder> getProviderNameGroupOrBuilderList()
       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
      Specified by:
      getProviderNameGroupOrBuilderList in interface StardocOutputProtos.AttributeInfoOrBuilder
    • addProviderNameGroupBuilder

      public StardocOutputProtos.ProviderNameGroup.Builder addProviderNameGroupBuilder()
       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
    • addProviderNameGroupBuilder

      public StardocOutputProtos.ProviderNameGroup.Builder addProviderNameGroupBuilder(int index)
       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
    • getProviderNameGroupBuilderList

      public List<StardocOutputProtos.ProviderNameGroup.Builder> getProviderNameGroupBuilderList()
       The target(s) in this attribute must define all the providers of at least
       one of the ProviderNameGroups in this list. If the Attribute Type is not a
       label, a label list, or a label-keyed string dictionary, the field will be
       left empty. For attributes of a repository rule or a module extension tag,
       this attribute is meaningless and may be ignored.
       TODO(b/290788853): ensure this field is always empty for attributes of a
       repository rule or a module extension tag.
       
      repeated .stardoc_output.ProviderNameGroup provider_name_group = 5;
    • getDefaultValue

      public String getDefaultValue()
       The string representation of the default value of this attribute.
       
      string default_value = 6;
      Specified by:
      getDefaultValue in interface StardocOutputProtos.AttributeInfoOrBuilder
      Returns:
      The defaultValue.
    • getDefaultValueBytes

      public com.google.protobuf.ByteString getDefaultValueBytes()
       The string representation of the default value of this attribute.
       
      string default_value = 6;
      Specified by:
      getDefaultValueBytes in interface StardocOutputProtos.AttributeInfoOrBuilder
      Returns:
      The bytes for defaultValue.
    • setDefaultValue

      public StardocOutputProtos.AttributeInfo.Builder setDefaultValue(String value)
       The string representation of the default value of this attribute.
       
      string default_value = 6;
      Parameters:
      value - The defaultValue to set.
      Returns:
      This builder for chaining.
    • clearDefaultValue

      public StardocOutputProtos.AttributeInfo.Builder clearDefaultValue()
       The string representation of the default value of this attribute.
       
      string default_value = 6;
      Returns:
      This builder for chaining.
    • setDefaultValueBytes

      public StardocOutputProtos.AttributeInfo.Builder setDefaultValueBytes(com.google.protobuf.ByteString value)
       The string representation of the default value of this attribute.
       
      string default_value = 6;
      Parameters:
      value - The bytes for defaultValue to set.
      Returns:
      This builder for chaining.
    • getNonconfigurable

      public boolean getNonconfigurable()
       If true, the attribute is non-configurable.
       
      bool nonconfigurable = 7;
      Specified by:
      getNonconfigurable in interface StardocOutputProtos.AttributeInfoOrBuilder
      Returns:
      The nonconfigurable.
    • setNonconfigurable

      public StardocOutputProtos.AttributeInfo.Builder setNonconfigurable(boolean value)
       If true, the attribute is non-configurable.
       
      bool nonconfigurable = 7;
      Parameters:
      value - The nonconfigurable to set.
      Returns:
      This builder for chaining.
    • clearNonconfigurable

      public StardocOutputProtos.AttributeInfo.Builder clearNonconfigurable()
       If true, the attribute is non-configurable.
       
      bool nonconfigurable = 7;
      Returns:
      This builder for chaining.