VMware vSphere Automation SDK Perl The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions
Classes | List of all members
Com::Vmware::Vapi::Metadata::Metamodel::Type Class Reference
Inheritance diagram for Com::Vmware::Vapi::Metadata::Metamodel::Type:

## Classes
class | BuiltinType
class | Category

## Avaliable Methods
public method | set_category ()
public method | get_user_defined_type ()
public method | set_generic_instantiation ()
public method | get_generic_instantiation ()
public method | get_category ()
public method | new ()
public method | get_builtin_type ()
public method | set_builtin_type ()
public method | set_user_defined_type ()

## Detailed Description

The `Com::Vmware::Vapi::Metadata::Metamodel::Type` class describes the type information of a typed element in the interface definiton language. The following elements in the metamodel are typed:

- Field element in a structure element. See :attr:`Com::Vmware::Vapi::Metadata::Metamodel::StructureInfo.fields`
- Parameter element in an operation element. See :attr:`Com::Vmware::Vapi::Metadata::Metamodel::OperationInfo.params`
- Result element in an operation element. See :attr:`Com::Vmware::Vapi::Metadata::Metamodel::OperationInfo.output`

The type could be one of the three following categories:

- Built-in types: These are types present in the interface definition language type system. They are provided by the infrastructure.
- User defined named type: API designers can create custom types and use them for the typed elements. These types have a unique identifier.
- Generic type instantiation: The language infrastructure also provides generic types such as list, map, set and so on. An instantiation of one of these generic types could also be used for the typed elements.

## Member Function Documentation

public method Com::Vmware::Vapi::Metadata::Metamodel::Type::get_builtin_type | ( |  | ) |

Gets the value of 'builtin_type' property.

Return values

  builtin_type | - The current value of the field. Category of the built-in type. optional#

Code:
click to view
# Number of lines of code in get_builtin_type: 4
sub get_builtin_type {
my ($self, %args) = @_;
return $self->{'builtin_type'};
}

public method Com::Vmware::Vapi::Metadata::Metamodel::Type::get_category | ( |  | ) |

Gets the value of 'category' property.

Return values

  category | - The current value of the field. Category of this type. Category#

Code:
click to view
# Number of lines of code in get_category: 4
sub get_category {
my ($self, %args) = @_;
return $self->{'category'};
}

public method Com::Vmware::Vapi::Metadata::Metamodel::Type::get_generic_instantiation | ( |  | ) |

Gets the value of 'generic_instantiation' property.

Return values

  generic_instantiation | - The current value of the field. Instantiation of one of the generic types available in the interface definition language. optional#

Code:
click to view
# Number of lines of code in get_generic_instantiation: 4
sub get_generic_instantiation {
my ($self, %args) = @_;
return $self->{'generic_instantiation'};
}

public method Com::Vmware::Vapi::Metadata::Metamodel::Type::get_user_defined_type | ( |  | ) |

Gets the value of 'user_defined_type' property.

Return values

  user_defined_type | - The current value of the field. Identifier and type of the user defined type. optional#

Code:
click to view
# Number of lines of code in get_user_defined_type: 4
sub get_user_defined_type {
my ($self, %args) = @_;
return $self->{'user_defined_type'};
}

public method Com::Vmware::Vapi::Metadata::Metamodel::Type::new | ( |  | ) |

Constructor to initialize the Com::Vmware::Vapi::Metadata::Metamodel::Type structure

Return values

  Blessed | object

Code:
click to view
# Number of lines of code in new: 31
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $validatorList = [];
$validatorList = [
new Com::Vmware::Vapi::Data::UnionValidator(
'discriminant_name' => 'category',
'case_map' => {
'BUILTIN' => ['builtin_type'],
'USER_DEFINED' => ['user_defined_type'],
'GENERIC' => ['generic_instantiation'],
}),
];
my $self = $class->SUPER::new('validator_list' => $validatorList, %args);
$self->{category} = $args{'category'};
$self->{builtin_type} = $args{'builtin_type'};
$self->{user_defined_type} = $args{'user_defined_type'};
$self->{generic_instantiation} = $args{'generic_instantiation'};
$self->set_binding_class('binding_class' => 'Com::Vmware::Vapi::Metadata::Metamodel::Type');
$self->set_binding_name('name' => 'com.vmware.vapi.metadata.metamodel.type');
$self->set_binding_field('key' => 'category', 'value' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vapi::Metadata::Metamodel', 'type_name' => 'Type::Category'));
$self->set_binding_field('key' => 'builtin_type', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vapi::Metadata::Metamodel', 'type_name' => 'Type::BuiltinType')));
$self->set_binding_field('key' => 'user_defined_type', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vapi::Metadata::Metamodel', 'type_name' => 'UserDefinedType')));
$self->set_binding_field('key' => 'generic_instantiation', 'value' => new Com::Vmware::Vapi::Bindings::Type::OptionalType('element_type' => new Com::Vmware::Vapi::Bindings::Type::ReferenceType('module_ctx' => 'Com::Vmware::Vapi::Metadata::Metamodel', 'type_name' => 'GenericInstantiation')));
bless $self, $class;
return $self;
}

public method Com::Vmware::Vapi::Metadata::Metamodel::Type::set_builtin_type | ( |  | ) |

Sets the given value for 'builtin_type' property.

Parameters

  builtin_type | - New value for the field. Category of the built-in type.

Code:
click to view
# Number of lines of code in set_builtin_type: 5
sub set_builtin_type {
my ($self, %args) = @_;
$self->{'builtin_type'} = $args{'builtin_type'};
return;
}

public method Com::Vmware::Vapi::Metadata::Metamodel::Type::set_category | ( |  | ) |

Sets the given value for 'category' property.

Parameters

  category | - New value for the field. Category of this type.

Code:
click to view
# Number of lines of code in set_category: 5
sub set_category {
my ($self, %args) = @_;
$self->{'category'} = $args{'category'};
return;
}

public method Com::Vmware::Vapi::Metadata::Metamodel::Type::set_generic_instantiation | ( |  | ) |

Sets the given value for 'generic_instantiation' property.

Parameters

  generic_instantiation | - New value for the field. Instantiation of one of the generic types available in the interface definition language.

Code:
click to view
# Number of lines of code in set_generic_instantiation: 5
sub set_generic_instantiation {
my ($self, %args) = @_;
$self->{'generic_instantiation'} = $args{'generic_instantiation'};
return;
}

public method Com::Vmware::Vapi::Metadata::Metamodel::Type::set_user_defined_type | ( |  | ) |

Sets the given value for 'user_defined_type' property.

Parameters

  user_defined_type | - New value for the field. Identifier and type of the user defined type.

Code:
click to view
# Number of lines of code in set_user_defined_type: 5
sub set_user_defined_type {
my ($self, %args) = @_;
$self->{'user_defined_type'} = $args{'user_defined_type'};
return;
}

The documentation for this class was generated from the following file:

- Com/Vmware/Vapi/Metadata/Metamodel/Type.pm