# Number of lines of code in new: 30
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
$validatorList = [
new Com::Vmware::Vapi::Data::UnionValidator(
'discriminant_name' => 'type',
'case_map' => {
'ETHERNET' => ['nic'],
'DISK' => ['disks'],
'CDROM' => [],
'FLOPPY' => [],
}),
];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->{type} = $args{'type'};
$self->{nic} = $args{'nic'};
$self->{disks} = $args{'disks'};
$self->set_binding_class('binding_class' => 'Com::Vmware::Vcenter::Vm::Hardware::Boot::Device::Entry');
$self->set_binding_name('name' => 'com.vmware.vcenter.vm.hardware.boot.device.entry');
$self->set_binding_field('key' => 'type', 'value' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vcenter::Vm::Hardware::Boot', 'type_name' => 'Device::Type'));
$self->set_binding_field('key' => 'nic', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
$self->set_binding_field('key' => 'disks', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ListType(new Com::Vmware::Vapi::Bindings::Type::StringType())));
bless $self, $class;
return $self;
}