code: public TaskDefinition withRequiresAttributes(Attribute... requiresAttributes) {
          if (this.requiresAttributes == null) {
              setRequiresAttributes(new com.amazonaws.internal.SdkInternalList<Attribute>(requiresAttributes.length));
          }
          for (Attribute ele : requiresAttributes) {
              this.requiresAttributes.add(ele);
          }
          return this;
      }
docs: <p>
  The container instance attributes required by your task. This field is not valid if you are using the Fargate
  launch type for your task.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setRequiresAttributes(java.util.Collection)} or {@link #withRequiresAttributes(java.util.Collection)} if
  you want to override the existing values.
  </p>
  
  @param requiresAttributes
  The container instance attributes required by your task. This field is not valid if you are using the
  Fargate launch type for your task.
  @return Returns a reference to this object so that method calls can be chained together.