Class: OvirtSDK4::Watchdog

Inherits:
Device show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (Watchdog) initialize(opts = {})

Creates a new instance of the OvirtSDK4::Watchdog class.

Parameters:

  • opts (Hash) (defaults to: {})

    A hash containing the attributes of the object. The keys of the hash should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.

Options Hash (opts):

  • :action (WatchdogAction)

    The value of attribute action.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :instance_type (InstanceType, Hash)

    The value of attribute instance_type.

  • :model (WatchdogModel)

    The value of attribute model.

  • :name (String)

    The value of attribute name.

  • :template (Template, Hash)

    The value of attribute template.

  • :vm (Vm, Hash)

    The value of attribute vm.

  • :vms (Array<Vm>, Array<Hash>)

    The values of attribute vms.



40171
40172
40173
40174
40175
40176
40177
40178
40179
40180
40181
40182
40183
# File 'lib/ovirtsdk4/types.rb', line 40171

def initialize(opts = {})
  super(opts)
  self.action = opts[:action]
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.id = opts[:id]
  self.instance_type = opts[:instance_type]
  self.model = opts[:model]
  self.name = opts[:name]
  self.template = opts[:template]
  self.vm = opts[:vm]
  self.vms = opts[:vms]
end

Instance Method Details

- (WatchdogAction) action

Returns the value of the action attribute.

Returns:



39940
39941
39942
# File 'lib/ovirtsdk4/types.rb', line 39940

def action
  return @action
end

- (Object) action=(value)

Sets the value of the action attribute.

Parameters:



39949
39950
39951
# File 'lib/ovirtsdk4/types.rb', line 39949

def action=(value)
  @action = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


39958
39959
39960
# File 'lib/ovirtsdk4/types.rb', line 39958

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


39967
39968
39969
# File 'lib/ovirtsdk4/types.rb', line 39967

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


39976
39977
39978
# File 'lib/ovirtsdk4/types.rb', line 39976

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


39985
39986
39987
# File 'lib/ovirtsdk4/types.rb', line 39985

def description=(value)
  @description = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


39994
39995
39996
# File 'lib/ovirtsdk4/types.rb', line 39994

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


40003
40004
40005
# File 'lib/ovirtsdk4/types.rb', line 40003

def id=(value)
  @id = value
end

- (InstanceType) instance_type

Returns the value of the instance_type attribute.

Returns:



40012
40013
40014
# File 'lib/ovirtsdk4/types.rb', line 40012

def instance_type
  return @instance_type
end

- (Object) instance_type=(value)

Sets the value of the instance_type attribute.

The value parameter can be an instance of InstanceType or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:



40025
40026
40027
40028
40029
40030
# File 'lib/ovirtsdk4/types.rb', line 40025

def instance_type=(value)
  if value.is_a?(Hash)
    value = InstanceType.new(value)
  end
  @instance_type = value
end

- (WatchdogModel) model

Returns the value of the model attribute.

Returns:



40037
40038
40039
# File 'lib/ovirtsdk4/types.rb', line 40037

def model
  return @model
end

- (Object) model=(value)

Sets the value of the model attribute.

Parameters:



40046
40047
40048
# File 'lib/ovirtsdk4/types.rb', line 40046

def model=(value)
  @model = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


40055
40056
40057
# File 'lib/ovirtsdk4/types.rb', line 40055

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


40064
40065
40066
# File 'lib/ovirtsdk4/types.rb', line 40064

def name=(value)
  @name = value
end

- (Template) template

Returns the value of the template attribute.

Returns:



40073
40074
40075
# File 'lib/ovirtsdk4/types.rb', line 40073

def template
  return @template
end

- (Object) template=(value)

Sets the value of the template attribute.

The value parameter can be an instance of Template or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:



40086
40087
40088
40089
40090
40091
# File 'lib/ovirtsdk4/types.rb', line 40086

def template=(value)
  if value.is_a?(Hash)
    value = Template.new(value)
  end
  @template = value
end

- (Vm) vm

Returns the value of the vm attribute.

Returns:



40098
40099
40100
# File 'lib/ovirtsdk4/types.rb', line 40098

def vm
  return @vm
end

- (Object) vm=(value)

Sets the value of the vm attribute.

The value parameter can be an instance of Vm or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:

  • value (Vm, Hash)


40111
40112
40113
40114
40115
40116
# File 'lib/ovirtsdk4/types.rb', line 40111

def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end

- (Array<Vm>) vms

Returns the value of the vms attribute.

Returns:

  • (Array<Vm>)


40123
40124
40125
# File 'lib/ovirtsdk4/types.rb', line 40123

def vms
  return @vms
end

- (Object) vms=(list)

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


40131
40132
40133
40134
40135
40136
40137
40138
40139
40140
40141
# File 'lib/ovirtsdk4/types.rb', line 40131

def vms=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Vm.new(value)
      end
    end
  end
  @vms = list
end