def _xml(t)
      t.serviceSelector do |t|
        if @fields
          @fields.each { |field| t.fields field }
        end
        if @predicates
          @predicates.each do |p|
            t.predicates do |t|
              t.field p.field
              t.operator p.operator
              p.values.each { |value| t.values value }
            end
          end
        end
      end
    end
def _xml(t)
      t.serviceSelector do |t|
        if @fields
          @fields.each { |field| t.fields field }
        end
        if @predicates
          @predicates.each do |p|
            t.predicates do |t|
              t.field p.field
              t.operator p.operator
              p.values.each { |value| t.values value }
            end
          end
        end
      end
    end
def to_xml
      str = <<-EOFS
        <selector>
      EOFS
      statuses.each do |s|
        str += "<campaignStatuses>#{s}</campaignStatuses>"
      end
      str += <<-EOFS
          <statsSelector>
            <dateRange>
              <min>20090101</min>
              <max>20091231</max>
            </dateRange>
          </statsSelector>
        </selector>
      EOFS
      <<EOS
       <serviceSelector>
         <fields>Id</fields>
         <fields>Name</fields>
         <fields>Status</fields>
         <predicates>
               <field>Status</field>
               <operator>IN</operator>
               <values>PAUSED</values>
               <values>ACTIVE</values>
         </predicates>
       </serviceSelector>
EOS

    end
 @private