code: public AutoScalingPolicy withRules(ScalingRule... rules) {
          if (this.rules == null) {
              setRules(new com.amazonaws.internal.SdkInternalList<ScalingRule>(rules.length));
          }
          for (ScalingRule ele : rules) {
              this.rules.add(ele);
          }
          return this;
      }
docs: <p>
  The scale-in and scale-out rules that comprise the automatic scaling policy.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setRules(java.util.Collection)} or {@link #withRules(java.util.Collection)} if you want to override the
  existing values.
  </p>
  
  @param rules
  The scale-in and scale-out rules that comprise the automatic scaling policy.
  @return Returns a reference to this object so that method calls can be chained together.