(self, api, schema, name, def_dict, key_for_variants=None)
Construct a Property.

    A Property requires several elements in its template value dictionary which
    are set here:
      wireName: the string which labels this Property in the JSON serialization.
      dataType: the DataType of this property.

    Args:
      api: (Api) The Api which owns this Property
      schema: (Schema) the schema this Property is part of
      name: (string) the name for this Property
      def_dict: (dict) the JSON schema dictionary
      key_for_variants: (dict) if given, maps discriminator values to
                        variant schemas.

    Raises:
      ApiException: If we have an array type without object definitions.
Construct a Property.
Construct a Property .
def __init__(self, api, schema, name, def_dict, key_for_variants=None):
    """Construct a Property.

    A Property requires several elements in its template value dictionary which
    are set here:
      wireName: the string which labels this Property in the JSON serialization.
      dataType: the DataType of this property.

    Args:
      api: (Api) The Api which owns this Property
      schema: (Schema) the schema this Property is part of
      name: (string) the name for this Property
      def_dict: (dict) the JSON schema dictionary
      key_for_variants: (dict) if given, maps discriminator values to
                        variant schemas.

    Raises:
      ApiException: If we have an array type without object definitions.
    """
    super(Property, self).__init__(def_dict, api, wire_name=name)
    self.ValidateName(name)
    self.schema = schema
    self._key_for_variants = key_for_variants

    # TODO(user): find a better way to mark a schema as an array type
    # so we can display schemas like BlogList in method responses
    try:
      if self.values['wireName'] == 'items' and self.values['type'] == 'array':
        self.schema.values['isList'] = True
    except KeyError:
      pass
    # If the schema value for this property defines a new object directly,
    # rather than refering to another schema, we will have to create a class
    # name for it.   We create a unique name by prepending the schema we are
    # in to the object name.
    tentative_class_name = api.NestedClassNameForProperty(name, schema)
    self._data_type = api.DataTypeFromJson(def_dict, tentative_class_name,
                                           parent=schema, wire_name=name)
def __init__ ( self , api , schema , name , def_dict , key_for_variants = None ) : super ( Property , self ) . __init__ ( def_dict , api , wire_name = name ) self . ValidateName ( name ) self . schema = schema self . _key_for_variants = key_for_variants # TODO(user): find a better way to mark a schema as an array type # so we can display schemas like BlogList in method responses try : if self . values [ 'wireName' ] == 'items' and self . values [ 'type' ] == 'array' : self . schema . values [ 'isList' ] = True except KeyError : pass # If the schema value for this property defines a new object directly, # rather than refering to another schema, we will have to create a class # name for it.   We create a unique name by prepending the schema we are # in to the object name. tentative_class_name = api . NestedClassNameForProperty ( name , schema ) self . _data_type = api . DataTypeFromJson ( def_dict , tentative_class_name , parent = schema , wire_name = name )