# Number of lines of code in new: 36
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
$validatorList = [
new Com::Vmware::Vapi::Data::UnionValidator(
'discriminant_name' => 'state',
'case_map' => {
'STARTED' => ['health', 'health_messages'],
'STARTING' => [],
'STOPPING' => [],
'STOPPED' => [],
}),
];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->{name_key} = $args{'name_key'};
$self->{description_key} = $args{'description_key'};
$self->{startup_type} = $args{'startup_type'};
$self->{state} = $args{'state'};
$self->{health} = $args{'health'};
$self->{health_messages} = $args{'health_messages'};
$self->set_binding_class('binding_class' => 'Com::Vmware::Appliance::Vmon::Service::Info');
$self->set_binding_name('name' => 'com.vmware.appliance.vmon.service.info');
$self->set_binding_field('key' => 'name_key', 'value' => new Com::Vmware::Vapi::Bindings::Type::StringType());
$self->set_binding_field('key' => 'description_key', 'value' => new Com::Vmware::Vapi::Bindings::Type::StringType());
$self->set_binding_field('key' => 'startup_type', 'value' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Appliance::Vmon', 'type_name' => 'Service::StartupType'));
$self->set_binding_field('key' => 'state', 'value' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Appliance::Vmon', 'type_name' => 'Service::State'));
$self->set_binding_field('key' => 'health', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Appliance::Vmon', 'type_name' => 'Service::Health')));
$self->set_binding_field('key' => 'health_messages', '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::Vapi::Std', 'type_name' => 'LocalizableMessage'))));
bless $self, $class;
return $self;
}