Class List Method List File List

# Class: Com::Vmware::Vcenter::Vm::HardwareService::UpdateSpec

Inherits:
  VAPI::Bindings::VapiStruct
  - Object
  - VAPI::Bindings::VapiStruct
  - Com::Vmware::Vcenter::Vm::HardwareService::UpdateSpec
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb

## Overview

The ``Com::Vmware::Vcenter::Vm::Hardware::UpdateSpec`` class describes the updates to virtual hardware settings of a virtual machine.

## Instance Attribute Summary (collapse)

- - (Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy?) upgrade_policy

  Scheduled upgrade policy.

- - (Com::Vmware::Vcenter::Vm::Hardware::Version?) upgrade_version

  Target hardware version to be used on the next scheduled virtual hardware upgrade.

## Class Method Summary (collapse)

- + (VAPI::Bindings::StructType) binding_type

  Holds (gets or creates) the binding type metadata for this structure type.

## Instance Method Summary (collapse)

- - (UpdateSpec) initialize(ruby_values = nil, struct_value = nil) constructor

  Constructs a new instance.

## Constructor Details

### - (`UpdateSpec`) initialize(ruby_values = nil, struct_value = nil)

Constructs a new instance.

Parameters:

- ruby_values (`Hash`) (defaults to: `nil`) —

  a map of initial property values (optional)

- struct_value (`VAPI::Data::StructValue`) (defaults to: `nil`) —

  a raw StructValue from the wire (optional)

    301
    302
    303
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 301

    def initialize(ruby_values=nil, struct_value=nil)
        super(self.class.binding_type, ruby_values, struct_value)
    end

## Instance Attribute Details

### - (`Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy`?) upgrade_policy

Scheduled upgrade policy.

     If set to   :attr:`Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy.NEVER`  , the   :attr:`Com::Vmware::Vcenter::Vm::Hardware::Info.upgrade_version`    field  will be reset to  nil .

If nil , the value is unchanged.

Returns:

- (`Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy`, `nil`)

    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 276

    class UpdateSpec < VAPI::Bindings::VapiStruct

        class << self
            # Holds (gets or creates) the binding type metadata for this structure type.
            # @scope class
            # @return [VAPI::Bindings::StructType] the binding type
            def binding_type
                @binding_type ||= VAPI::Bindings::StructType.new(
                    'com.vmware.vcenter.vm.hardware.update_spec',
                    {
                        'upgrade_policy' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy')),
                        'upgrade_version' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vcenter::Vm::Hardware::Version')),
                    },
                    UpdateSpec,
                    false,
                    nil)
            end
        end

        attr_accessor :upgrade_policy,
                      :upgrade_version

        # Constructs a new instance.
        # @param ruby_values [Hash] a map of initial property values (optional)
        # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
        def initialize(ruby_values=nil, struct_value=nil)
            super(self.class.binding_type, ruby_values, struct_value)
        end
    end

### - (`Com::Vmware::Vcenter::Vm::Hardware::Version`?) upgrade_version

Target hardware version to be used on the next scheduled virtual hardware upgrade.

     If specified, this  field  must represent a newer virtual hardware version than the current virtual hardware version reported in   :attr:`Com::Vmware::Vcenter::Vm::Hardware::Info.version`  .

If :attr:`Com::Vmware::Vcenter::Vm::Hardware::UpdateSpec.upgrade_policy` is set to :attr:`Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy.NEVER` , this field must be nil . Otherwise, if this field is nil , default to the most recent virtual hardware version supported by the server.

Returns:

- (`Com::Vmware::Vcenter::Vm::Hardware::Version`, `nil`)

    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 276

    class UpdateSpec < VAPI::Bindings::VapiStruct

        class << self
            # Holds (gets or creates) the binding type metadata for this structure type.
            # @scope class
            # @return [VAPI::Bindings::StructType] the binding type
            def binding_type
                @binding_type ||= VAPI::Bindings::StructType.new(
                    'com.vmware.vcenter.vm.hardware.update_spec',
                    {
                        'upgrade_policy' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy')),
                        'upgrade_version' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vcenter::Vm::Hardware::Version')),
                    },
                    UpdateSpec,
                    false,
                    nil)
            end
        end

        attr_accessor :upgrade_policy,
                      :upgrade_version

        # Constructs a new instance.
        # @param ruby_values [Hash] a map of initial property values (optional)
        # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
        def initialize(ruby_values=nil, struct_value=nil)
            super(self.class.binding_type, ruby_values, struct_value)
        end
    end

## Class Method Details

### + (`VAPI::Bindings::StructType`) binding_type

Holds (gets or creates) the binding type metadata for this structure type.

Returns:

- (`VAPI::Bindings::StructType`) —

  the binding type

    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 282

    def binding_type
        @binding_type ||= VAPI::Bindings::StructType.new(
            'com.vmware.vcenter.vm.hardware.update_spec',
            {
                'upgrade_policy' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy')),
                'upgrade_version' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vcenter::Vm::Hardware::Version')),
            },
            UpdateSpec,
            false,
            nil)
    end