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

COVERAGE SUMMARY FOR SOURCE FILE [CreateSnapshotOptions.java]

nameclass, %method, %block, %line, %
CreateSnapshotOptions.java100% (2/2)60%  (3/5)75%  (21/28)79%  (5.5/7)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CreateSnapshotOptions$Builder100% (1/1)50%  (1/2)73%  (8/11)67%  (2/3)
CreateSnapshotOptions$Builder (): void 0%   (0/1)0%   (0/3)0%   (0/1)
withDescription (String): CreateSnapshotOptions 100% (1/1)100% (8/8)100% (2/2)
     
class CreateSnapshotOptions100% (1/1)67%  (2/3)76%  (13/17)80%  (4/5)
getDescription (): String 0%   (0/1)0%   (0/4)0%   (0/1)
CreateSnapshotOptions (): void 100% (1/1)100% (3/3)100% (2/2)
withDescription (String): CreateSnapshotOptions 100% (1/1)100% (10/10)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 CreateSnapshot operation. <h2>
27 * Usage</h2> The recommended way to instantiate a CreateSnapshotOptions object is to statically
28 * import CreateSnapshotOptions.Builder.* and invoke a static creation method followed by an
29 * instance mutator (if needed):
30 * <p/>
31 * <code>
32 * import static org.jclouds.ec2.options.CreateSnapshotOptions.Builder.*
33 * <p/>
34 * EC2Client connection = // get connection
35 * Snapshot snapshot = connection.getElasticBlockStoreServices().createSnapshotInRegion(volumeId, withDescription("123125"));
36 * <code>
37 * 
38 * @author Adrian Cole
39 * @see <a
40 *      href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?ApiReference-form-CreateSnapshot.html"
41 *      />
42 */
43public class CreateSnapshotOptions extends BaseEC2RequestOptions {
44 
45   /**
46    * Description of the Amazon EBS snapshot.
47    * <p/>
48    * 
49    * Up to 255 characters
50    */
51   public CreateSnapshotOptions withDescription(String description) {
52      formParameters.put("Description", checkNotNull(description, "description"));
53      return this;
54   }
55 
56   public String getDescription() {
57      return getFirstFormOrNull("Description");
58 
59   }
60 
61   public static class Builder {
62 
63      /**
64       * @see CreateSnapshotOptions#withDescription(String )
65       */
66      public static CreateSnapshotOptions withDescription(String identityId) {
67         CreateSnapshotOptions options = new CreateSnapshotOptions();
68         return options.withDescription(identityId);
69      }
70 
71   }
72}

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