# Number of lines of code in new: 35
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
$validatorList = [
new Com::Vmware::Vapi::Data::UnionValidator(
'discriminant_name' => 'category',
'case_map' => {
'VALIDATION' => ['issues'],
'INPUT' => ['name', 'value', 'message'],
'SERVER' => ['error'],
}),
];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->{category} = $args{'category'};
$self->{issues} = $args{'issues'};
$self->{name} = $args{'name'};
$self->{value} = $args{'value'};
$self->{message} = $args{'message'};
$self->{error} = $args{'error'};
$self->set_binding_class('binding_class' => 'Com::Vmware::Vcenter::Ovf::OvfWarning');
$self->set_binding_name('name' => 'com.vmware.vcenter.ovf.ovf_warning');
$self->set_binding_field('key' => 'category', 'value' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vcenter::Ovf', 'type_name' => 'OvfMessage::Category'));
$self->set_binding_field('key' => 'issues', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ListType(new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vcenter::Ovf', 'type_name' => 'ParseIssue'))));
$self->set_binding_field('key' => 'name', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
$self->set_binding_field('key' => 'value', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::StringType()));
$self->set_binding_field('key' => 'message', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vapi::Std', 'type_name' => 'LocalizableMessage')));
$self->set_binding_field('key' => 'error', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::DynamicStructType()));
bless $self, $class;
return $self;
}