EMMA Coverage Report (generated Wed Aug 10 12:30:04 EDT 2011)
[all classes][org.jclouds.aws.ec2.options]

COVERAGE SUMMARY FOR SOURCE FILE [CreateSecurityGroupOptions.java]

nameclass, %method, %block, %line, %
CreateSecurityGroupOptions.java0%   (0/2)0%   (0/4)0%   (0/24)0%   (0/6)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CreateSecurityGroupOptions0%   (0/1)0%   (0/2)0%   (0/13)0%   (0/4)
CreateSecurityGroupOptions (): void 0%   (0/1)0%   (0/3)0%   (0/2)
vpcId (String): CreateSecurityGroupOptions 0%   (0/1)0%   (0/10)0%   (0/2)
     
class CreateSecurityGroupOptions$Builder0%   (0/1)0%   (0/2)0%   (0/11)0%   (0/3)
CreateSecurityGroupOptions$Builder (): void 0%   (0/1)0%   (0/3)0%   (0/1)
vpcId (String): CreateSecurityGroupOptions 0%   (0/1)0%   (0/8)0%   (0/2)

1/**
2 *
3 * Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
4 *
5 * ====================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * 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, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 * ====================================================================
18 */
19package org.jclouds.aws.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 CreateSecurityGroup
27 * operation. <h2>
28 * Usage</h2> The recommended way to instantiate a CreateSecurityGroupOptions
29 * object is to statically import CreateSecurityGroupOptions.Builder.* and
30 * invoke a static creation method followed by an instance mutator (if needed):
31 * <p/>
32 * <code>
33 * import static org.jclouds.aws.ec2.options.CreateSecurityGroupOptions.Builder.*
34 * <p/>
35 * AWSEC2Client connection = // get connection
36 * group = connection.getAMIServices().createSecurityGroup(vpcId("123125").noReboot());
37 * <code>
38 * 
39 * @author Adrian Cole
40 * @see <a href=
41 *      "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?ApiReference-form-CreateSecurityGroup.html"
42 *      />
43 */
44public class CreateSecurityGroupOptions extends BaseEC2RequestOptions {
45 
46   /**
47    * ID of the VPC.
48    */
49   public CreateSecurityGroupOptions vpcId(String vpcId) {
50      formParameters.put("VpcId", checkNotNull(vpcId, "vpcId"));
51      return this;
52   }
53 
54   public static class Builder {
55 
56      /**
57       * @see CreateSecurityGroupOptions#vpcId(String )
58       */
59      public static CreateSecurityGroupOptions vpcId(String vpcId) {
60         CreateSecurityGroupOptions options = new CreateSecurityGroupOptions();
61         return options.vpcId(vpcId);
62      }
63 
64   }
65}

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