@Override
  public SnapshotCollection getSnapshots(DescribeSnapshotsRequest request) {
    ResourceCollectionImpl result = resource.getCollection("Snapshots", request);

    if (result == null) return null;
    return new SnapshotCollectionImpl(result);
  }
  @Override
  public AttachVolumeResult attachToInstance(
      AttachVolumeRequest request, ResultCapture<AttachVolumeResult> extractor) {

    ActionResult result = resource.performAction("AttachToInstance", request, extractor);

    if (result == null) return null;
    return (AttachVolumeResult) result.getData();
  }
  @Override
  public DescribeVolumeStatusResult describeStatus(
      DescribeVolumeStatusRequest request, ResultCapture<DescribeVolumeStatusResult> extractor) {

    ActionResult result = resource.performAction("DescribeStatus", request, extractor);

    if (result == null) return null;
    return (DescribeVolumeStatusResult) result.getData();
  }
  @Override
  public Snapshot createSnapshot(
      CreateSnapshotRequest request, ResultCapture<CreateSnapshotResult> extractor) {

    ActionResult result = resource.performAction("CreateSnapshot", request, extractor);

    if (result == null) return null;
    return new SnapshotImpl(result.getResource());
  }
  @Override
  public DetachVolumeResult detachFromInstance(
      DetachVolumeRequest request, ResultCapture<DetachVolumeResult> extractor) {

    ActionResult result = resource.performAction("DetachFromInstance", request, extractor);

    if (result == null) return null;
    return (DetachVolumeResult) result.getData();
  }
  @Override
  public List<com.amazonaws.resources.ec2.Tag> createTags(
      CreateTagsRequest request, ResultCapture<Void> extractor) {

    ActionResult result = resource.performAction("CreateTags", request, extractor);

    if (result == null) return null;
    return CodecUtils.transform(result.getResources(), TagImpl.CODEC);
  }
 @Override
 public String getId() {
   return (String) resource.getIdentifier("Id");
 }
  @Override
  public boolean load(
      DescribeVolumesRequest request, ResultCapture<DescribeVolumesResult> extractor) {

    return resource.load(request, extractor);
  }
 @Override
 public boolean isLoaded() {
   return resource.isLoaded();
 }
  @Override
  public void enableIo(EnableVolumeIORequest request, ResultCapture<Void> extractor) {

    resource.performAction("EnableIo", request, extractor);
  }
 @Override
 public Date getCreateTime() {
   return (Date) resource.getAttribute("CreateTime");
 }
 @Override
 public String getVolumeType() {
   return (String) resource.getAttribute("VolumeType");
 }
 @Override
 public List<Tag> getTags() {
   return (List<Tag>) resource.getAttribute("Tags");
 }
 @Override
 public String getSnapshotId() {
   return (String) resource.getAttribute("SnapshotId");
 }
 @Override
 public Integer getSize() {
   return (Integer) resource.getAttribute("Size");
 }
 @Override
 public List<VolumeAttachment> getAttachments() {
   return (List<VolumeAttachment>) resource.getAttribute("Attachments");
 }
 @Override
 public String getAvailabilityZone() {
   return (String) resource.getAttribute("AvailabilityZone");
 }
 @Override
 public Boolean getEncrypted() {
   return (Boolean) resource.getAttribute("Encrypted");
 }
 @Override
 public String getState() {
   return (String) resource.getAttribute("State");
 }
  @Override
  public void modifyAttribute(ModifyVolumeAttributeRequest request, ResultCapture<Void> extractor) {

    resource.performAction("ModifyAttribute", request, extractor);
  }
 @Override
 public String getKmsKeyId() {
   return (String) resource.getAttribute("KmsKeyId");
 }
 @Override
 public Integer getIops() {
   return (Integer) resource.getAttribute("Iops");
 }