Hacked By AnonymousFox

Current Path : /lib/python2.7/site-packages/google/protobuf/
Upload File :
Current File : //lib/python2.7/site-packages/google/protobuf/descriptor.pyo

�
Du�ac@s�dZdZddlZddlmZeZej�dkr}ddlZddl	Z	ddl
mZeede�Znde
fd	��YZd
efd��YZer�defd
��YZneZdeje�fd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZd efd!��YZd"�Zd#�Zd$�Zd%�Z d&e!dd'�Z#dS((s�Descriptors essentially contain exactly the information found in a .proto
file, in types that make this information accessible in Python.
s#robinson@google.com (Will Robinson)i����N(tapi_implementationtcpp(t_messaget_USE_C_DESCRIPTORStErrorcBseZdZRS(sBase error for this module.(t__name__t
__module__t__doc__(((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR2stTypeTransformationErrorcBseZdZRS(sHError transforming between python proto type and corresponding C++ type.(RRR(((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR6stDescriptorMetaclasscBseZd�ZRS(cCs6tt|�j|�rtSt||j�r2tStS(N(tsuperR	t__instancecheck__tTruet
isinstancet_C_DESCRIPTOR_CLASStFalse(tclstobj((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR@s
(RRR(((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR	?stDescriptorBasecBs8eZdZerdZnd�Zd�Zd�ZRS(s�Descriptors base class.

  This class is the base of all descriptor classes. It provides common options
  related functionality.

  Attributes:
    has_options:  True if the descriptor has non-default options.  Usually it
        is not necessary to read this -- just call GetOptions() which will
        happily return the default instance.  However, it's sometimes useful
        for efficiency, and also useful inside the protobuf implementation to
        avoid some bootstrapping issues.
  cCs%||_||_|dk	|_dS(s�Initialize the descriptor given its options message and the name of the
    class of the options message. The name of the class is required in case
    the options message is None and has to be created.
    N(t_optionst_options_class_nametNonethas_options(tselftoptionstoptions_class_name((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyt__init___s		cCs%||_||_|dk	|_dS(s�Sets the descriptor's options

    This function is used in generated proto2 files to update descriptor
    options. It must not be used outside proto2.
    N(RRRR(RRR((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyt_SetOptionsjs		cCsp|jr|jSddlm}yt||j�}Wn$tk
r\td|j��nX|�|_|jS(s�Retrieves descriptor options.

    This method returns the options set or creates the default options for the
    descriptor.
    i����(tdescriptor_pb2sUnknown options class name %s!(Rtgoogle.protobufRtgetattrRtAttributeErrortRuntimeError(RRt
options_class((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyt
GetOptionsvs	
((RRRRRRRR"(((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyRKs
			t_NestedDescriptorBasecBs&eZdZddd�Zd�ZRS(s0Common class for descriptors that can be nested.c		CsStt|�j||�||_||_||_||_||_||_dS(sCConstructor.

    Args:
      options: Protocol message options or None
        to use default message options.
      options_class_name: (str) The class name of the above options.

      name: (str) Name of this protocol message type.
      full_name: (str) Fully-qualified name of this protocol message type,
        which will include protocol "package" name and the name of any
        enclosing types.
      file: (FileDescriptor) Reference to file info.
      containing_type: if provided, this is a nested descriptor, with this
        descriptor as parent, otherwise None.
      serialized_start: The start index (inclusive) in block in the
        file.serialized_pb that describes this descriptor.
      serialized_end: The end index (exclusive) in block in the
        file.serialized_pb that describes this descriptor.
    N(	R
R#Rtnamet	full_nametfiletcontaining_typet_serialized_startt_serialized_end(	RRRR$R%R&R'tserialized_starttserialized_end((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR�s
					cCs`|jdk	rP|jdk	rP|jdk	rP|j|jj|j|j!�ntd��dS(s�Copies this to the matching proto in descriptor_pb2.

    Args:
      proto: An empty proto instance from descriptor_pb2.

    Raises:
      Error: If self couldnt be serialized, due to to few constructor arguments.
    s*Descriptor does not contain serialization.N(R&RR(R)tParseFromStringt
serialized_pbR(Rtproto((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pytCopyToProto�s	N(RRRRRR/(((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR#�s!t
Descriptorc	Bs�eZdZer?ejZdeddddddd�Z	ndeddddddd�Z
ed��Zd�Z
d�ZRS(si	Descriptor for a protocol message type.

  A Descriptor instance has the following attributes:

    name: (str) Name of this protocol message type.
    full_name: (str) Fully-qualified name of this protocol message type,
      which will include protocol "package" name and the name of any
      enclosing types.

    containing_type: (Descriptor) Reference to the descriptor of the
      type containing us, or None if this is top-level.

    fields: (list of FieldDescriptors) Field descriptors for all
      fields in this type.
    fields_by_number: (dict int -> FieldDescriptor) Same FieldDescriptor
      objects as in |fields|, but indexed by "number" attribute in each
      FieldDescriptor.
    fields_by_name: (dict str -> FieldDescriptor) Same FieldDescriptor
      objects as in |fields|, but indexed by "name" attribute in each
      FieldDescriptor.
    fields_by_camelcase_name: (dict str -> FieldDescriptor) Same
      FieldDescriptor objects as in |fields|, but indexed by
      "camelcase_name" attribute in each FieldDescriptor.

    nested_types: (list of Descriptors) Descriptor references
      for all protocol message types nested within this one.
    nested_types_by_name: (dict str -> Descriptor) Same Descriptor
      objects as in |nested_types|, but indexed by "name" attribute
      in each Descriptor.

    enum_types: (list of EnumDescriptors) EnumDescriptor references
      for all enums contained within this type.
    enum_types_by_name: (dict str ->EnumDescriptor) Same EnumDescriptor
      objects as in |enum_types|, but indexed by "name" attribute
      in each EnumDescriptor.
    enum_values_by_name: (dict str -> EnumValueDescriptor) Dict mapping
      from enum value name to EnumValueDescriptor for that value.

    extensions: (list of FieldDescriptor) All extensions defined directly
      within this message type (NOT within a nested type).
    extensions_by_name: (dict, string -> FieldDescriptor) Same FieldDescriptor
      objects as |extensions|, but indexed by "name" attribute of each
      FieldDescriptor.

    is_extendable:  Does this type define any extension ranges?

    oneofs: (list of OneofDescriptor) The list of descriptors for oneof fields
      in this message.
    oneofs_by_name: (dict str -> OneofDescriptor) Same objects as in |oneofs|,
      but indexed by "name" attribute.

    file: (FileDescriptor) Reference to file descriptor.
  cCstjj�tjj|�S(N(RtMessaget_CheckCalledFromGeneratedFiletdefault_pooltFindMessageTypeByName(RR$R%tfilenameR'tfieldstnested_typest
enum_typest
extensionsRt
is_extendabletextension_rangestoneofsR&R*R+tsyntax((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyt__new__�s
cCs�tt|�j|	d|||
|d|d|�||_x|jD]}||_qDWtd�|D��|_td�|D��|_d|_	||_
x|D]}||_q�Wtd�|D��|_||_x|jD]}||_q�Wtd�|D��|_
td�|D��|_||_x|jD]}||_q9Wtd	�|D��|_|
|_||_|dk	r�|ng|_td
�|jD��|_x|jD]}||_q�W|p�d|_dS(
s�Arguments to __init__() are as described in the description
    of Descriptor fields above.

    Note that filename is an obsolete argument, that is not used anymore.
    Please use file.name to access this as an attribute.
    tMessageOptionsR*R+css|]}|j|fVqdS(N(tnumber(t.0tf((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pys	<genexpr>scss|]}|j|fVqdS(N(R$(RARB((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pys	<genexpr>scss|]}|j|fVqdS(N(R$(RAtt((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pys	<genexpr>%scss|]}|j|fVqdS(N(R$(RARC((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pys	<genexpr>*scss.|]$}|jD]}|j|fVqqdS(N(tvaluesR$(RARCtv((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pys	<genexpr>,scss|]}|j|fVqdS(N(R$(RARB((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pys	<genexpr>1scss|]}|j|fVqdS(N(R$(RAto((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pys	<genexpr>5stproto2N(R
R0RR6R'tdicttfields_by_numbertfields_by_nameRt_fields_by_camelcase_nameR7tnested_types_by_nameR8tenum_types_by_nametenum_values_by_nameR9textension_scopetextensions_by_nameR:R;R<toneofs_by_nameR=(RR$R%R5R'R6R7R8R9RR:R;R<R&R*R+R=tfieldtnested_typet	enum_typet	extensiontoneof((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyRs>	
		

	
	
		
cCs5|jdkr.td�|jD��|_n|jS(Ncss|]}|j|fVqdS(N(tcamelcase_name(RARB((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pys	<genexpr>>s(RKRRHR6(R((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pytfields_by_camelcase_name:scCs|j|j|jS(ssReturns the string name of an enum value.

    This is just a small helper method to simplify a common operation.

    Args:
      enum: string name of the Enum.
      value: int, value of the enum.

    Returns:
      string name of the enum value.

    Raises:
      KeyError if either the Enum doesn't exist or the value is not a valid
        value for the enum.
    (RMtvalues_by_numberR$(Rtenumtvalue((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyt
EnumValueNameAscCstt|�j|�dS(svCopies this to a descriptor_pb2.DescriptorProto.

    Args:
      proto: An empty descriptor_pb2.DescriptorProto.
    N(R
R0R/(RR.((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR/SsN(RRRRRR0RRRR>RtpropertyRXR\R/(((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR0�s6					0	tFieldDescriptorcBs�eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZd	Zd
Zd
Z iee6ee6ee6ee6ee6ee6ee6ee6ee6ee6ee6ee6ee	6ee6ee6ee
6ee
6ee6Z!dZ"dZ#dZ$dZ%dZ&dZ'dZ(e)r�e*j+Z,de.dddd�Z/nde.dddd�Z0e1d��Z2e3d��Z4RS(s	Descriptor for a single field in a .proto file.

  A FieldDescriptor instance has the following 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.
    camelcase_name: (str) Camelcase name of this field.
    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: (One of the TYPE_* constants below) Declared type.
    cpp_type: (One of the CPPTYPE_* constants below) C++ type used to
      represent this field.

    label: (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.
  iiiiiiiii	i
iii
iiiiiii8JiNcCs7tjj�|r#tjj|�Stjj|�SdS(N(RR1R2R3tFindExtensionByNametFindFieldByName(RR$R%tindexR@ttypetcpp_typetlabelt
default_valuetmessage_typeRTR'tis_extensionRORthas_default_valuetcontaining_oneoft	json_nameR&((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR>�s
cCs.tt|�j|d�||_||_||_d|_|dkr[t|�|_	n	||_	||_
||_||_||_
||_||_||_||_|	|_|
|_||_|
|_||_tj�dkr!|r	tjj|�|_q*tjj|�|_n	d|_dS(sThe 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.
    tFieldOptionsRN(R
R^RR$R%R&Rt_camelcase_namet_ToJsonNameRjRaR@RbRcRdRhReR'RfRTRgRORiRtTypeRR3R_t_cdescriptorR`(RR$R%RaR@RbRcRdReRfRTR'RgRORRhRiRjR&((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR�s4																		cCs+|jdkr$t|j�|_n|jS(N(RlRt_ToCamelCaseR$(R((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyRW!scCs7ytj|SWn!tk
r2td|��nXdS(s�Converts from a Python proto type to a C++ Proto Type.

    The Python ProtocolBuffer classes specify both the 'Python' datatype and the
    'C++' datatype - and they're not the same. This helper method should
    translate from one to another.

    Args:
      proto_type: the Python proto type (descriptor.FieldDescriptor.TYPE_*)
    Returns:
      descriptor.FieldDescriptor.CPPTYPE_*, the C++ type.
    Raises:
      TypeTransformationError: when the Python proto type isn't known.
    sUnknown proto_type: %sN(R^t_PYTHON_TO_CPP_PROTO_TYPE_MAPtKeyErrorR(t
proto_type((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pytProtoTypeToCppProtoType's
i i���N(5RRRtTYPE_DOUBLEt
TYPE_FLOATt
TYPE_INT64tTYPE_UINT64t
TYPE_INT32tTYPE_FIXED64tTYPE_FIXED32t	TYPE_BOOLtTYPE_STRINGt
TYPE_GROUPtTYPE_MESSAGEt
TYPE_BYTEStTYPE_UINT32t	TYPE_ENUMt
TYPE_SFIXED32t
TYPE_SFIXED64tTYPE_SINT32tTYPE_SINT64tMAX_TYPEt
CPPTYPE_INT32t
CPPTYPE_INT64tCPPTYPE_UINT32tCPPTYPE_UINT64tCPPTYPE_DOUBLEt
CPPTYPE_FLOATtCPPTYPE_BOOLtCPPTYPE_ENUMtCPPTYPE_STRINGtCPPTYPE_MESSAGEtMAX_CPPTYPERqtLABEL_OPTIONALtLABEL_REQUIREDtLABEL_REPEATEDt	MAX_LABELtMAX_FIELD_NUMBERtFIRST_RESERVED_FIELD_NUMBERtLAST_RESERVED_FIELD_NUMBERRRR^RRRR>RR]RWtstaticmethodRt(((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR^hs�3
				&tEnumDescriptorcBsYeZdZer6ejZdddddd�Zndddddd�Z	d�Z
RS(s�Descriptor for an enum defined in a .proto file.

  An EnumDescriptor instance has the following attributes:

    name: (str) Name of the enum type.
    full_name: (str) Full name of the type, including package name
      and any enclosing type(s).

    values: (list of EnumValueDescriptors) List of the values
      in this enum.
    values_by_name: (dict str -> EnumValueDescriptor) Same as |values|,
      but indexed by the "name" field of each EnumValueDescriptor.
    values_by_number: (dict int -> EnumValueDescriptor) Same as |values|,
      but indexed by the "number" field of each EnumValueDescriptor.
    containing_type: (Descriptor) Descriptor of the immediate containing
      type of this enum, or None if this is an enum defined at the
      top level in a .proto file.  Set by Descriptor's constructor
      if we're passed into one.
    file: (FileDescriptor) Reference to file descriptor.
    options: (descriptor_pb2.EnumOptions) Enum options message or
      None to use default enum options.
  c

Cstjj�tjj|�S(N(RR1R2R3tFindEnumTypeByName(
RR$R%R5RDR'RR&R*R+((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR>Xs
c
Cs�tt|�j|d||||d|d|	�||_x|jD]}
||
_qDWtd�|D��|_td�|D��|_dS(s�Arguments are as described in the attribute description above.

    Note that filename is an obsolete argument, that is not used anymore.
    Please use file.name to access this as an attribute.
    tEnumOptionsR*R+css|]}|j|fVqdS(N(R$(RARE((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pys	<genexpr>nscss|]}|j|fVqdS(N(R@(RARE((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pys	<genexpr>osN(R
R�RRDRbRHtvalues_by_nameRY(RR$R%R5RDR'RR&R*R+R[((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR^s	
cCstt|�j|�dS(s~Copies this to a descriptor_pb2.EnumDescriptorProto.

    Args:
      proto: An empty descriptor_pb2.EnumDescriptorProto.
    N(R
R�R/(RR.((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR/qsN(RRRRRR�RRR>RR/(((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR�<s			tEnumValueDescriptorcBs>eZdZer-ejZddd�Znddd�Z	RS(s,Descriptor for a single value within an enum.

    name: (str) Name of this value.
    index: (int) Dense, 0-indexed index giving the order that this
      value appears textually within its enum in the .proto file.
    number: (int) Actual number assigned to this enum value.
    type: (EnumDescriptor) EnumDescriptor to which this value
      belongs.  Set by EnumDescriptor's constructor if we're
      passed into one.
    options: (descriptor_pb2.EnumValueOptions) Enum value options message or
      None to use default enum value options options.
  cCstjj�dS(N(RR1R2R(RR$RaR@RbR((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR>�s
cCsAtt|�j|d�||_||_||_||_dS(s>Arguments are as described in the attribute description above.tEnumValueOptionsN(R
R�RR$RaR@Rb(RR$RaR@RbR((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR�s
			N(
RRRRRR�RRR>R(((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR�{s

	tOneofDescriptorcBs8eZdZer*ejZdd�Zndd�Z	RS(s	Descriptor for a oneof field.

    name: (str) Name of the oneof field.
    full_name: (str) Full name of the oneof field, including package name.
    index: (int) 0-based index giving the order of the oneof field inside
      its containing type.
    containing_type: (Descriptor) Descriptor of the protocol message
      type that contains this field.  Set by the Descriptor constructor
      if we're passed into one.
    fields: (list of FieldDescriptor) The list of field descriptors this
      oneof can contain.
  cCstjj�tjj|�S(N(RR1R2R3tFindOneofByName(RR$R%RaR'R6R((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR>�s
cCsJtt|�j|d�||_||_||_||_||_dS(s>Arguments are as described in the attribute description above.tOneofOptionsN(R
R�RR$R%RaR'R6(RR$R%RaR'R6R((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR�s				N(
RRRRRR�RRR>R(((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR��s
	tServiceDescriptorcBs\eZdZer3ejZddddd�Znddddd�Z	d�Z
d�ZRS(s�Descriptor for a service.

    name: (str) Name of the service.
    full_name: (str) Full name of the service, including package name.
    index: (int) 0-indexed index giving the order that this services
      definition appears withing the .proto file.
    methods: (list of MethodDescriptor) List of methods provided by this
      service.
    methods_by_name: (dict str -> MethodDescriptor) Same MethodDescriptor
      objects as in |methods_by_name|, but indexed by "name" attribute in each
      MethodDescriptor.
    options: (descriptor_pb2.ServiceOptions) Service options message or
      None to use default service options.
    file: (FileDescriptor) Reference to file info.
  c		Cstjj�tjj|�S(N(RR1R2R3tFindServiceByName(	RR$R%RatmethodsRR&R*R+((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR>�s
c	
Cs}tt|�j|d|||dd|d|�||_||_td�|D��|_x|jD]}	||	_qfWdS(NtServiceOptionsR*R+css|]}|j|fVqdS(N(R$(RAtm((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pys	<genexpr>�s(	R
R�RRRaR�RHtmethods_by_nametcontaining_service(
RR$R%RaR�RR&R*R+tmethod((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR�s		cCs|jj|d�S(s>Searches for the specified method, and returns its descriptor.N(R�tgetR(RR$((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pytFindMethodByName�scCstt|�j|�dS(s�Copies this to a descriptor_pb2.ServiceDescriptorProto.

    Args:
      proto: An empty descriptor_pb2.ServiceDescriptorProto.
    N(R
R�R/(RR.((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR/�sN(RRRRRR�RRR>RR�R/(((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR��s		tMethodDescriptorcBs8eZdZer*ejZdd�Zndd�Z	RS(sDescriptor for a method in a service.

  name: (str) Name of the method within the service.
  full_name: (str) Full name of method.
  index: (int) 0-indexed index of the method inside the service.
  containing_service: (ServiceDescriptor) The service that contains this
    method.
  input_type: The descriptor of the message that this method accepts.
  output_type: The descriptor of the message that this method returns.
  options: (descriptor_pb2.MethodOptions) Method options message or
    None to use default method options.
  cCstjj�tjj|�S(N(RR1R2R3R�(RR$R%RaR�t
input_typetoutput_typeR((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR>s
cCsStt|�j|d�||_||_||_||_||_||_dS(s�The arguments are as described in the description of MethodDescriptor
    attributes above.

    Note that containing_service may be None, and may be set later if necessary.
    t
MethodOptionsN(	R
R�RR$R%RaR�R�R�(RR$R%RaR�R�R�R((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyRs					N(
RRRRRR�RRR>R(((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR��s

	tFileDescriptorcBs_eZdZer9ejZddddddd�Znddddddd�Z	d�Z
RS(s;Descriptor for a file. Mimics the descriptor_pb2.FileDescriptorProto.

  Note that enum_types_by_name, extensions_by_name, and dependencies
  fields are only set by the message_factory module, and not by the
  generated proto code.

  name: name of file, relative to root of source tree.
  package: name of the package
  syntax: string indicating syntax of the file (can be "proto2" or "proto3")
  serialized_pb: (str) Byte string of serialized
    descriptor_pb2.FileDescriptorProto.
  dependencies: List of other FileDescriptors this FileDescriptor depends on.
  public_dependencies: A list of FileDescriptors, subset of the dependencies
    above, which were declared as "public".
  message_types_by_name: Dict of message names of their descriptors.
  enum_types_by_name: Dict of enum names and their descriptors.
  extensions_by_name: Dict of extension names and their descriptors.
  services_by_name: Dict of services names and their descriptors.
  pool: the DescriptorPool this descriptor belongs to.  When not passed to the
    constructor, the global default pool is used.
  c		Cs0|rtjj|�Stt|�j|�SdS(N(RR3tAddSerializedFileR
R�R>(	RR$tpackageRR-tdependenciestpublic_dependenciesR=tpool((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR>5sc	
Cs�tt|�j|d�|dkrDddlm}	|	j�}n||_i|_||_	||_
|pqd|_||_i|_
i|_i|_|p�g|_|p�g|_tj�dkr�|jdk	r�tjj|j�ndS(sConstructor.tFileOptionsi����(tdescriptor_poolRGRN(R
R�RRRR�tDefaultR�tmessage_types_by_nameR$R�R=R-RMRPtservices_by_nameR�R�RRnRR3R�(
RR$R�RR-R�R�R=R�R�((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyRAs$								cCs|j|j�dS(s~Copies this to a descriptor_pb2.FileDescriptorProto.

    Args:
      proto: An empty descriptor_pb2.FileDescriptorProto.
    N(R,R-(RR.((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR/[sN(RRRRRR�RRR>RR/(((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR�s	
cCs|j|�|S(s�Parses serialized options.

  This helper function is used to parse serialized options in generated
  proto2 files. It must not be used outside proto2.
  (R,(tmessagetstring((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyt
_ParseOptionsds
cCs�t}g}xX|D]P}|dkr7|rct}qcq|rY|j|j��t}q||7}qW|r�|dj�r�|dj�|d<ndj|�S(s+Converts name to camel-case and returns it.t_it(RRtappendtuppertisuppertlowertjoin(R$tcapitalize_nexttresulttc((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyRpns
	cCs|jd�r|jSdSdS(sCReturns the value of the field `options`, or None if it is not set.RN(tHasFieldRR(tdescriptor_proto((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyt_OptionsOrNone�scCskt}g}xO|D]G}|dkr.t}q|rP|j|j��t}q||7}qWdj|�S(s*Converts name to Json name and returns it.R�R�(RRR�R�R�(R$R�R�R�((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyRm�s
		R�cCs�tj�dkr�|r�ddlm}|j�}|jj�j|�tt	j
��}|r�tjj
|jdd�|d�|_||_n
|d|_tjj|�tjj|j�}tr�|j|jSn|jg}|r|jd|�ni}	x�|jD]u}
dj
||
jg�}t|
j|dgt|
j�D]$\}}
t|
j||
j�^qR�}||	|<qWi}x[|jD]P}dj
||jg�}t |ddj
|�d	t!d
|�}|||<q�Wg}x9|j"D].}dj
||jg�}d}d}|j#rA|j#}nd}|j$d�r�|j%}dj
|||j&d�dg�}||kr�||}q�||	kr�|	|}q�nt'|j||jd|j|j(t'j)|j(�|j*d||dt!dd
t+|�dt!d|�
}|j,|�qWdj
|�}t-|j|dd|t.|j/��t.|	j/��gd
t+|��S(sMake a protobuf Descriptor given a DescriptorProto protobuf.

  Handles nested descriptors. Note that this is limited to the scope of defining
  a message inside of another message. Composite fields can currently only be
  resolved if the message is defined in the same scope as the field.

  Args:
    desc_proto: The descriptor_pb2.DescriptorProto protobuf message.
    package: Optional package name for the new message Descriptor (string).
    build_file_if_cpp: Update the C++ descriptor pool if api matches.
                       Set to False on recursion, so no duplicates are created.
    syntax: The syntax/semantics that should be used.  Set to "proto3" to get
            proto3 field presence semantics.
  Returns:
    A Descriptor for protobuf messages.
  Ri����(Rt.t/s.protoiR�tbuild_file_if_cppR=t	type_nameiRRhRjN(0RRnRRtFileDescriptorProtoRftaddt	MergeFromtstrtuuidtuuid4tostpathR�treplaceR$R�RR3tAddtFindFileByNameRR�tinsertRTR�Rt	enumerateR[R�R@RStMakeDescriptorRRRRjR�R�trfindR^RbRtRdR�R�R0tlistRD(t
desc_protoR�R�R=Rtfile_descriptor_protot
proto_nameR�tfull_message_nameR8t
enum_protoR%tiitenum_valt	enum_descR7tnested_prototnested_descR6tfield_protoRjR�tfull_type_nameRRt	desc_name((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyR��sz
:					
	$($Rt
__author__tsixtgoogle.protobuf.internalRRRRnR�R�tgoogle.protobuf.pyextRRt	ExceptionRRRbR	twith_metaclassRR#R0R^R�R�R�R�R�R�R�RpR�RmRRR�(((s>/usr/lib/python2.7/site-packages/google/protobuf/descriptor.pyt<module>!s<	=8��?#!5'I	
			

Hacked By AnonymousFox1.0, Coded By AnonymousFox