root / main / java / net / elasticgrid / rackspace / cloudservers / Flavor.java @ f8be9cce
History | View | Annotate | Download (1.9 kB)
1 |
/**
|
---|---|
2 |
* Licensed to the Apache Software Foundation (ASF) under one
|
3 |
* or more contributor license agreements. See the NOTICE file
|
4 |
* distributed with this work for additional information
|
5 |
* regarding copyright ownership. The ASF 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 |
*/
|
19 |
package net.elasticgrid.rackspace.cloudservers; |
20 |
|
21 |
import java.io.Serializable; |
22 |
|
23 |
/**
|
24 |
* Hardware configuration for a server.
|
25 |
* @author Jerome Bernard
|
26 |
*/
|
27 |
public class Flavor implements Serializable { |
28 |
private final int id; |
29 |
private final String name; |
30 |
private final Integer ram; |
31 |
private final Integer disk; |
32 |
|
33 |
public Flavor(int id, String name, Integer ram, Integer disk) { |
34 |
this.id = id;
|
35 |
this.name = name;
|
36 |
this.ram = ram;
|
37 |
this.disk = disk;
|
38 |
} |
39 |
|
40 |
public int getId() { |
41 |
return id;
|
42 |
} |
43 |
|
44 |
public String getName() { |
45 |
return name;
|
46 |
} |
47 |
|
48 |
public Integer getRam() { |
49 |
return ram;
|
50 |
} |
51 |
|
52 |
public Integer getDisk() { |
53 |
return disk;
|
54 |
} |
55 |
|
56 |
@Override
|
57 |
public String toString() { |
58 |
final StringBuilder sb = new StringBuilder(); |
59 |
sb.append("Flavor");
|
60 |
sb.append("{id=").append(id);
|
61 |
sb.append(", name='").append(name).append('\''); |
62 |
sb.append(", ram=").append(ram);
|
63 |
sb.append(", disk=").append(disk);
|
64 |
sb.append('}');
|
65 |
return sb.toString();
|
66 |
} |
67 |
} |