public void write()

in library/src/main/java/com/theguardian/bridget/thrift/Image.java [698:729]


    public void write(org.apache.thrift.protocol.TProtocol oprot, Image struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.url != null) {
        oprot.writeFieldBegin(URL_FIELD_DESC);
        oprot.writeString(struct.url);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(WIDTH_FIELD_DESC);
      oprot.writeDouble(struct.width);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(HEIGHT_FIELD_DESC);
      oprot.writeDouble(struct.height);
      oprot.writeFieldEnd();
      if (struct.caption != null) {
        if (struct.isSetCaption()) {
          oprot.writeFieldBegin(CAPTION_FIELD_DESC);
          oprot.writeString(struct.caption);
          oprot.writeFieldEnd();
        }
      }
      if (struct.credit != null) {
        if (struct.isSetCredit()) {
          oprot.writeFieldBegin(CREDIT_FIELD_DESC);
          oprot.writeString(struct.credit);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }