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 | */ |
19 | package org.jclouds.ovf; |
20 | |
21 | import org.jclouds.ovf.internal.BaseVirtualSystem; |
22 | |
23 | import com.google.common.collect.Multimap; |
24 | |
25 | /** |
26 | * @author Adrian Cole |
27 | */ |
28 | public class VirtualSystem extends BaseVirtualSystem<VirtualSystem> { |
29 | |
30 | public static class Builder extends BaseVirtualSystem.Builder<VirtualSystem> { |
31 | |
32 | /** |
33 | * {@inheritDoc} |
34 | */ |
35 | @Override |
36 | public VirtualSystem build() { |
37 | return new VirtualSystem(id, info, name, operatingSystem, virtualHardwareSections, productSections, |
38 | additionalSections); |
39 | } |
40 | |
41 | /** |
42 | * {@inheritDoc} |
43 | */ |
44 | @SuppressWarnings("unchecked") |
45 | @Override |
46 | public Builder additionalSection(String name, Section additionalSection) { |
47 | return Builder.class.cast(super.additionalSection(name, additionalSection)); |
48 | } |
49 | |
50 | /** |
51 | * {@inheritDoc} |
52 | */ |
53 | @SuppressWarnings("unchecked") |
54 | @Override |
55 | public Builder additionalSections(Multimap<String, Section> additionalSections) { |
56 | return Builder.class.cast(super.additionalSections(additionalSections)); |
57 | } |
58 | |
59 | /** |
60 | * {@inheritDoc} |
61 | */ |
62 | @Override |
63 | public Builder fromSection(Section<VirtualSystem> in) { |
64 | return Builder.class.cast(super.fromSection(in)); |
65 | } |
66 | |
67 | /** |
68 | * {@inheritDoc} |
69 | */ |
70 | @Override |
71 | public Builder fromVirtualSystem(BaseVirtualSystem<VirtualSystem> in) { |
72 | return Builder.class.cast(super.fromVirtualSystem(in)); |
73 | } |
74 | |
75 | /** |
76 | * {@inheritDoc} |
77 | */ |
78 | @Override |
79 | public Builder virtualHardwareSection(VirtualHardwareSection virtualHardwareSection) { |
80 | return Builder.class.cast(super.virtualHardwareSection(virtualHardwareSection)); |
81 | } |
82 | |
83 | /** |
84 | * {@inheritDoc} |
85 | */ |
86 | @Override |
87 | public Builder virtualHardwareSections(Iterable<? extends VirtualHardwareSection> virtualHardwareSections) { |
88 | return Builder.class.cast(super.virtualHardwareSections(virtualHardwareSections)); |
89 | } |
90 | |
91 | /** |
92 | * {@inheritDoc} |
93 | */ |
94 | @Override |
95 | public Builder id(String id) { |
96 | return Builder.class.cast(super.id(id)); |
97 | } |
98 | |
99 | /** |
100 | * {@inheritDoc} |
101 | */ |
102 | @Override |
103 | public Builder info(String info) { |
104 | return Builder.class.cast(super.info(info)); |
105 | } |
106 | |
107 | /** |
108 | * {@inheritDoc} |
109 | */ |
110 | @Override |
111 | public Builder name(String name) { |
112 | return Builder.class.cast(super.name(name)); |
113 | } |
114 | |
115 | /** |
116 | * {@inheritDoc} |
117 | */ |
118 | @Override |
119 | public Builder operatingSystemSection(OperatingSystemSection operatingSystem) { |
120 | return Builder.class.cast(super.operatingSystemSection(operatingSystem)); |
121 | } |
122 | |
123 | /** |
124 | * {@inheritDoc} |
125 | */ |
126 | @Override |
127 | public Builder productSection(ProductSection productSection) { |
128 | return Builder.class.cast(super.productSection(productSection)); |
129 | } |
130 | |
131 | /** |
132 | * {@inheritDoc} |
133 | */ |
134 | @Override |
135 | public Builder productSections(Iterable<? extends ProductSection> productSections) { |
136 | return Builder.class.cast(super.productSections(productSections)); |
137 | } |
138 | |
139 | } |
140 | |
141 | @SuppressWarnings("unchecked") |
142 | public VirtualSystem(String id, String info, String name, OperatingSystemSection operatingSystem, |
143 | Iterable<? extends VirtualHardwareSection> virtualHardwareSections, |
144 | Iterable<? extends ProductSection> productSections, Multimap<String, Section> additionalSections) { |
145 | super(id, info, name, operatingSystem, virtualHardwareSections, productSections, additionalSections); |
146 | } |
147 | } |