(self, api)
Decorate the API tree with language model specific elements.

    Walks the tree and calls annotators on the Methods and Properties.  This
    may be used to supply language specific transforms to an API between the
    time the API is loaded and before we generate code through the templates.

    Should be called after the API is constructed and before we generate
    any code.

    Args:
      api: (Api) The Api.
Decorate the API tree with language model specific elements.
Decorate the API tree with language model specific elements .
def _AnnotateTree(self, api):
    """Decorate the API tree with language model specific elements.

    Walks the tree and calls annotators on the Methods and Properties.  This
    may be used to supply language specific transforms to an API between the
    time the API is loaded and before we generate code through the templates.

    Should be called after the API is constructed and before we generate
    any code.

    Args:
      api: (Api) The Api.
    """
    self.AnnotateApi(api)
    for schema in api.all_schemas.values():
      # TODO(user): remove this after completing the transition away from
      # package in all the templates
      schema.SetTemplateValue('package', self.model_module)
      self.AnnotateSchema(api, schema)
      for prop in schema.values.get('properties', []):
        self.AnnotateProperty(api, prop, schema)
    for resource in api.values['resources']:
      self.AnnotateResource(api, resource)
    for method in api.values['methods']:
      self.AnnotateMethod(api, method, None)
def _AnnotateTree ( self , api ) : self . AnnotateApi ( api ) for schema in api . all_schemas . values ( ) : # TODO(user): remove this after completing the transition away from # package in all the templates schema . SetTemplateValue ( 'package' , self . model_module ) self . AnnotateSchema ( api , schema ) for prop in schema . values . get ( 'properties' , [ ] ) : self . AnnotateProperty ( api , prop , schema ) for resource in api . values [ 'resources' ] : self . AnnotateResource ( api , resource ) for method in api . values [ 'methods' ] : self . AnnotateMethod ( api , method , None )