title: Python, protocol buffers, and getting nested messages and repeated fields to work
body: <p>I am trying to submit a response using protocol buffers in python.  Below is the structure.</p>
  
  <pre><code>message BidResponse {
    message Ad {
      optional string html_snippet = 1;
      message TemplateParameter {
        optional string parameter_value = 1;
        optional string blank_ad_parameter_value = 8;
        optional string buyer_creative_id = 2;
        optional string click_through_url = 3;
        optional int32 left = 4;
        optional int32 right = 5;
        optional int32 top = 6;
        optional int32 bottom = 7;
        optional int32 backup_index = 9;
      };
      repeated TemplateParameter template_parameter = 13;
      repeated string click_through_url = 4;
      repeated int32 vendor_type = 5;
      message AdSlot {
        required int32 id = 1;
        required int64 max_cpm_micros = 2;
      }
      repeated AdSlot adslot = 3;
    }
    repeated Ad ad = 2;
    optional int32 processing_time_ms = 4;
  }
  </code></pre>
  
  <p>Now, below is my python code that I am trying to submit.</p>
  
  <pre><code>ms = (time.time() - start)*1000
  bid_response = realtime_bidding_pb2.BidResponse()
  bid_response.processing_time_ms = int(ms)
  ad = bid_response.Ad()
  ad.html_snippet = """&lt;img src='http://cdn.test.com/test.gif' /&gt;"""
  ad.click_through_url = """test.com"""
  
  adslot = ad.AdSlot()
  adslot.id = adslots_id[0]             
  adslot.max_cpm_micros=150000000
  </code></pre>
  
  <p>When I submit using the below:</p>
  
  <pre><code>'Content-Type', 'application/octet-stream'
  bid_response.SerializeToString()
  </code></pre>
  
  <p>All that is returned is the bid_response.processing_time_ms.</p>
  
  <p>I suspect I am nt doing repeated and messages correctly.  </p>