コード例 #1
0
ファイル: Checks.java プロジェクト: doo/jclouds
  public static void checkComputeCapacity(ComputeCapacity computeCapacity) {
    // Check required fields
    assertNotNull(computeCapacity.getCpu(), "The cpu attribute of a ComputeCapacity must be set");
    checkCapacityWithUsage(computeCapacity.getCpu());

    assertNotNull(
        computeCapacity.getMemory(), "The memory attribute of a ComputeCapacity must be set");
    checkCapacityWithUsage(computeCapacity.getMemory());
  }
コード例 #2
0
 public Builder fromComputeCapacity(ComputeCapacity in) {
   return cpu(in.getCpu()).memory(in.getMemory());
 }