code: public ContainerInstance withRemainingResources(Resource... remainingResources) {
          if (this.remainingResources == null) {
              setRemainingResources(new com.amazonaws.internal.SdkInternalList<Resource>(remainingResources.length));
          }
          for (Resource ele : remainingResources) {
              this.remainingResources.add(ele);
          }
          return this;
      }
docs: <p>
  For CPU and memory resource types, this parameter describes the remaining CPU and memory that has not already
  been allocated to tasks and is therefore available for new tasks. For port resource types, this parameter
  describes the ports that were reserved by the Amazon ECS container agent (at instance registration time) and any
  task containers that have reserved port mappings on the host (with the <code>host</code> or <code>bridge</code>
  network mode). Any port that is not specified here is available for new tasks.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setRemainingResources(java.util.Collection)} or {@link #withRemainingResources(java.util.Collection)} if
  you want to override the existing values.
  </p>
  
  @param remainingResources
  For CPU and memory resource types, this parameter describes the remaining CPU and memory that has not
  already been allocated to tasks and is therefore available for new tasks. For port resource types, this
  parameter describes the ports that were reserved by the Amazon ECS container agent (at instance
  registration time) and any task containers that have reserved port mappings on the host (with the
  <code>host</code> or <code>bridge</code> network mode). Any port that is not specified here is available
  for new tasks.
  @return Returns a reference to this object so that method calls can be chained together.