class_docstr: Descriptor for a single field in a .proto file.
  
  Attributes:
    name (str): Name of this field, exactly as it appears in .proto.
    full_name (str): Name of this field, including containing scope.  This is
      particularly relevant for extensions.
    index (int): Dense, 0-indexed index giving the order that this
      field textually appears within its message in the .proto file.
    number (int): Tag number declared for this field in the .proto file.
  
    type (int): (One of the TYPE_* constants below) Declared type.
    cpp_type (int): (One of the CPPTYPE_* constants below) C++ type used to
      represent this field.
  
    label (int): (One of the LABEL_* constants below) Tells whether this
      field is optional, required, or repeated.
    has_default_value (bool): True if this field has a default value defined,
      otherwise false.
    default_value (Varies): Default value of this field.  Only
      meaningful for non-repeated scalar fields.  Repeated fields
      should always set this to [], and non-repeated composite
      fields should always set this to None.
  
    containing_type (Descriptor): Descriptor of the protocol message
      type that contains this field.  Set by the Descriptor constructor
      if we're passed into one.
      Somewhat confusingly, for extension fields, this is the
      descriptor of the EXTENDED message, not the descriptor
      of the message containing this field.  (See is_extension and
      extension_scope below).
    message_type (Descriptor): If a composite field, a descriptor
      of the message type contained in this field.  Otherwise, this is None.
    enum_type (EnumDescriptor): If this field contains an enum, a
      descriptor of that enum.  Otherwise, this is None.
  
    is_extension: True iff this describes an extension field.
    extension_scope (Descriptor): Only meaningful if is_extension is True.
      Gives the message that immediately contains this extension field.
      Will be None iff we're a top-level (file-level) extension field.
  
    options (descriptor_pb2.FieldOptions): Protocol message field options or
      None to use default field options.
  
    containing_oneof (OneofDescriptor): If the field is a member of a oneof
      union, contains its descriptor. Otherwise, None.
  
    file (FileDescriptor): Reference to file descriptor.
class_docstr_tok: ["Descriptor","for","a","single","field","in","a",".proto","file",".","Attributes",":","name","(","str",")",":","Name","of","this","field",",","exactly","as","it","appears","in",".proto",".","full_name","(","str",")",":","Name","of","this","field",",","including","containing","scope",".","This","is","particularly","relevant","for","extensions",".","index","(","int",")",":","Dense",",","0-indexed","index","giving","the","order","that","this","field","textually","appears","within","its","message","in","the",".proto","file",".","number","(","int",")",":","Tag","number","declared","for","this","field","in","the",".proto","file",".","type","(","int",")",":","(","One","of","the","TYPE_","*","constants","below",")","Declared","type",".","cpp_type","(","int",")",":","(","One","of","the","CPPTYPE_","*","constants","below",")","C++","type","used","to","represent","this","field",".","label","(","int",")",":","(","One","of","the","LABEL_","*","constants","below",")","Tells","whether","this","field","is","optional",",","required",",","or","repeated",".","has_default_value","(","bool",")",":","True","if","this","field","has","a","default","value","defined",",","otherwise","false",".","default_value","(","Varies",")",":","Default","value","of","this","field",".","Only","meaningful","for","non-repeated","scalar","fields",".","Repeated","fields","should","always","set","this","to","[","]",",","and","non-repeated","composite","fields","should","always","set","this","to","None",".","containing_type","(","Descriptor",")",":","Descriptor","of","the","protocol","message","type","that","contains","this","field",".","Set","by","the","Descriptor","constructor","if","we","'re","passed","into","one",".","Somewhat","confusingly",",","for","extension","fields",",","this","is","the","descriptor","of","the","EXTENDED","message",",","not","the","descriptor","of","the","message","containing","this","field",".","(","See","is_extension","and","extension_scope","below",")",".","message_type","(","Descriptor",")",":","If","a","composite","field",",","a","descriptor","of","the","message","type","contained","in","this","field",".","Otherwise",",","this","is","None",".","enum_type","(","EnumDescriptor",")",":","If","this","field","contains","an","enum",",","a","descriptor","of","that","enum",".","Otherwise",",","this","is","None",".","is_extension",":","True","iff","this","describes","an","extension","field",".","extension_scope","(","Descriptor",")",":","Only","meaningful","if","is_extension","is","True",".","Gives","the","message","that","immediately","contains","this","extension","field",".","Will","be","None","iff","we","'re","a","top-level","(","file-level",")","extension","field",".","options","(","descriptor_pb2.FieldOptions",")",":","Protocol","message","field","options","or","None","to","use","default","field","options",".","containing_oneof","(","OneofDescriptor",")",":","If","the","field","is","a","member","of","a","oneof","union",",","contains","its","descriptor",".","Otherwise",",","None",".","file","(","FileDescriptor",")",":","Reference","to","file","descriptor","."]
docstr: The arguments are as described in the description of FieldDescriptor
  attributes above.
  
  Note that containing_type may be None, and may be set later if necessary
  (to deal with circular references between message types, for example).
  Likewise for extension_scope.
code: def __init__(
      self,
      name,
      full_name,
      index,
      number,
      type,
      cpp_type,
      label,
      default_value,
      message_type,
      enum_type,
      containing_type,
      is_extension,
      extension_scope,
      options=None,
      serialized_options=None,
      has_default_value=True,
      containing_oneof=None,
      json_name=None,
      file=None,
      create_key=None,
  ):  # pylint: disable=redefined-builtin
      """The arguments are as described in the description of FieldDescriptor
      attributes above.
  
      Note that containing_type may be None, and may be set later if necessary
      (to deal with circular references between message types, for example).
      Likewise for extension_scope.
      """
      if create_key is not _internal_create_key:
          _Deprecated("FieldDescriptor")
  
      super(FieldDescriptor, self).__init__(
          options, serialized_options, "FieldOptions"
      )
      self.name = name
      self.full_name = full_name
      self.file = file
      self._camelcase_name = None
      if json_name is None:
          self.json_name = _ToJsonName(name)
      else:
          self.json_name = json_name
      self.index = index
      self.number = number
      self.type = type
      self.cpp_type = cpp_type
      self.label = label
      self.has_default_value = has_default_value
      self.default_value = default_value
      self.containing_type = containing_type
      self.message_type = message_type
      self.enum_type = enum_type
      self.is_extension = is_extension
      self.extension_scope = extension_scope
      self.containing_oneof = containing_oneof
      if api_implementation.Type() == "cpp":
          if is_extension:
              self._cdescriptor = (
                  _message.default_pool.FindExtensionByName(full_name)
              )
          else:
              self._cdescriptor = _message.default_pool.FindFieldByName(
                  full_name
              )
      else:
          self._cdescriptor = None
  
imports: import threading
  import warnings
  import six
  from google.protobuf.internal import api_implementation
label_desc: Use image node_id 1 to create a new FieldDescriptor object from inherited base classes: DescriptorBase with example: obj = FieldDescriptor(name, full_name, index, number, type, cpp_type, label, default_value, message_type, enum_type, containing_type, is_extension, extension_scope, options, serialized_options, has_default_value, containing_oneof, json_name, file, create_key)