(self, api_object, prop, schema)
Annotate a Property with ObjC specific elements.
Annotate a Property with ObjC specific elements.
Annotate a Property with ObjC specific elements .
def AnnotateProperty(self, api_object, prop, schema):
    """Annotate a Property with ObjC specific elements."""
    if (prop.codeName == 'items' and
        isinstance(prop.data_type, data_types.ArrayDataType)):
      # Set superclass if schema has an items array.
      schema.SetTemplateValue('superClass', 'GTLCollectionObject')

    self.AnnotateParameterOrProperty(prop, schema, api_object)

    # It appears that data_types.Enum is not actually used
    # TODO(user): Once enum properties are handled properly with
    # data_types.Enum, fix this workaround.
    enum_values = prop.data_type.values.get('enum')
    if enum_values and not isinstance(schema, data_types.SchemaReference):
      self.AnnotateEnum(api_object, prop, schema, enum_values)
def AnnotateProperty ( self , api_object , prop , schema ) : if ( prop . codeName == 'items' and isinstance ( prop . data_type , data_types . ArrayDataType ) ) : # Set superclass if schema has an items array. schema . SetTemplateValue ( 'superClass' , 'GTLCollectionObject' ) self . AnnotateParameterOrProperty ( prop , schema , api_object ) # It appears that data_types.Enum is not actually used # TODO(user): Once enum properties are handled properly with # data_types.Enum, fix this workaround. enum_values = prop . data_type . values . get ( 'enum' ) if enum_values and not isinstance ( schema , data_types . SchemaReference ) : self . AnnotateEnum ( api_object , prop , schema , enum_values )