# Number of lines of code in new: 37
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
$validatorList = [
new Com::Vmware::Vapi::Data::UnionValidator(
'discriminant_name' => 'type',
'case_map' => {
'IDE' => ['ide'],
'SCSI' => ['scsi'],
'SATA' => ['sata'],
}),
];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->{label} = $args{'label'};
$self->{type} = $args{'type'};
$self->{ide} = $args{'ide'};
$self->{scsi} = $args{'scsi'};
$self->{sata} = $args{'sata'};
$self->{backing} = $args{'backing'};
$self->{capacity} = $args{'capacity'};
$self->set_binding_class('binding_class' => 'Com::Vmware::Vcenter::Vm::Hardware::Disk::Info');
$self->set_binding_name('name' => 'com.vmware.vcenter.vm.hardware.disk.info');
$self->set_binding_field('key' => 'label', 'value' => new Com::Vmware::Vapi::Bindings::Type::StringType());
$self->set_binding_field('key' => 'type', 'value' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vcenter::Vm::Hardware', 'type_name' => 'Disk::HostBusAdapterType'));
$self->set_binding_field('key' => 'ide', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vcenter::Vm::Hardware', 'type_name' => 'IdeAddressInfo')));
$self->set_binding_field('key' => 'scsi', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vcenter::Vm::Hardware', 'type_name' => 'ScsiAddressInfo')));
$self->set_binding_field('key' => 'sata', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vcenter::Vm::Hardware', 'type_name' => 'SataAddressInfo')));
$self->set_binding_field('key' => 'backing', 'value' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vcenter::Vm::Hardware', 'type_name' => 'Disk::BackingInfo'));
$self->set_binding_field('key' => 'capacity', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::LongType()));
bless $self, $class;
return $self;
}