EMMA Coverage Report (generated Fri Apr 27 15:03:37 EDT 2012)
[all classes][org.jclouds.ec2.options]

COVERAGE SUMMARY FOR SOURCE FILE [DetachVolumeOptions.java]

nameclass, %method, %block, %line, %
DetachVolumeOptions.java100% (2/2)62%  (5/8)78%  (39/50)79%  (9.5/12)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DetachVolumeOptions100% (1/1)60%  (3/5)74%  (23/31)75%  (6/8)
getDevice (): String 0%   (0/1)0%   (0/4)0%   (0/1)
getInstance (): String 0%   (0/1)0%   (0/4)0%   (0/1)
DetachVolumeOptions (): void 100% (1/1)100% (3/3)100% (2/2)
fromDevice (String): DetachVolumeOptions 100% (1/1)100% (10/10)100% (2/2)
fromInstance (String): DetachVolumeOptions 100% (1/1)100% (10/10)100% (2/2)
     
class DetachVolumeOptions$Builder100% (1/1)67%  (2/3)84%  (16/19)80%  (4/5)
DetachVolumeOptions$Builder (): void 0%   (0/1)0%   (0/3)0%   (0/1)
fromDevice (String): DetachVolumeOptions 100% (1/1)100% (8/8)100% (2/2)
fromInstance (String): DetachVolumeOptions 100% (1/1)100% (8/8)100% (2/2)

1/**
2 * Licensed to jclouds, Inc. (jclouds) under one or more
3 * contributor license agreements.  See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership.  jclouds licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License.  You may obtain a copy of the License at
9 *
10 *   http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied.  See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19package org.jclouds.ec2.options;
20 
21import static com.google.common.base.Preconditions.checkNotNull;
22 
23import org.jclouds.ec2.options.internal.BaseEC2RequestOptions;
24 
25/**
26 * Contains options supported in the Form API for the DetachVolume operation. <h2>
27 * Usage</h2> The recommended way to instantiate a DetachVolumeOptions object is to statically
28 * import DetachVolumeOptions.Builder.* and invoke a static creation method followed by an instance
29 * mutator (if needed):
30 * <p/>
31 * <code>
32 * import static org.jclouds.ec2.options.DetachVolumeOptions.Builder.*
33 * <p/>
34 * EC2Client client = // get connection
35 * client.getElasticBlockStoreServices().detachVolumeInRegion(null, id, fromDevice("123125").force());
36 * <code>
37 * 
38 * @author Adrian Cole
39 * @see <a
40 *      href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?ApiReference-form-DetachVolume.html"
41 *      />
42 */
43public class DetachVolumeOptions extends BaseEC2RequestOptions {
44   /**
45    * The ID of the instance.
46    */
47   public DetachVolumeOptions fromInstance(String instanceId) {
48      formParameters.put("InstanceId", checkNotNull(instanceId, "instanceId"));
49      return this;
50   }
51 
52   public String getInstance() {
53      return getFirstFormOrNull("InstanceId");
54 
55   }
56 
57   /**
58    * The device name.
59    */
60   public DetachVolumeOptions fromDevice(String device) {
61      formParameters.put("Device", checkNotNull(device, "device"));
62      return this;
63   }
64 
65   public String getDevice() {
66      return getFirstFormOrNull("Device");
67 
68   }
69 
70   public static class Builder {
71      /**
72       * @see DetachVolumeOptions#fromInstance(String )
73       */
74      public static DetachVolumeOptions fromInstance(String instance) {
75         DetachVolumeOptions options = new DetachVolumeOptions();
76         return options.fromInstance(instance);
77      }
78 
79      /**
80       * @see DetachVolumeOptions#fromDevice(String )
81       */
82      public static DetachVolumeOptions fromDevice(String device) {
83         DetachVolumeOptions options = new DetachVolumeOptions();
84         return options.fromDevice(device);
85      }
86 
87   }
88}

[all classes][org.jclouds.ec2.options]
EMMA 2.0.5312 (C) Vladimir Roubtsov