Class: OvirtSDK4::Agent

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

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ Agent

Creates a new instance of the OvirtSDK4::Agent 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):

  • :address (String)

    The value of attribute address.

  • :comment (String)

    The value of attribute comment.

  • :concurrent (Boolean)

    The value of attribute concurrent.

  • :description (String)

    The value of attribute description.

  • :encrypt_options (Boolean)

    The value of attribute encrypt_options.

  • :host (Host, Hash)

    The value of attribute host.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :options (Array<Option>, Array<Hash>)

    The values of attribute options.

  • :order (Integer)

    The value of attribute order.

  • :password (String)

    The value of attribute password.

  • :port (Integer)

    The value of attribute port.

  • :type (String)

    The value of attribute type.

  • :username (String)

    The value of attribute username.


30832
30833
30834
30835
30836
30837
30838
30839
30840
30841
30842
30843
30844
# File 'lib/ovirtsdk4/types.rb', line 30832

def initialize(opts = {})
  super(opts)
  self.address = opts[:address]
  self.concurrent = opts[:concurrent]
  self.encrypt_options = opts[:encrypt_options]
  self.host = opts[:host]
  self.options = opts[:options]
  self.order = opts[:order]
  self.password = opts[:password]
  self.port = opts[:port]
  self.type = opts[:type]
  self.username = opts[:username]
end

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.


30849
30850
30851
30852
30853
30854
30855
30856
30857
30858
30859
30860
30861
# File 'lib/ovirtsdk4/types.rb', line 30849

def ==(other)
  super &&
  @address == other.address &&
  @concurrent == other.concurrent &&
  @encrypt_options == other.encrypt_options &&
  @host == other.host &&
  @options == other.options &&
  @order == other.order &&
  @password == other.password &&
  @port == other.port &&
  @type == other.type &&
  @username == other.username
end

#addressString

Returns the value of the address attribute.

Returns:

  • (String)

30534
30535
30536
# File 'lib/ovirtsdk4/types.rb', line 30534

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)

30543
30544
30545
# File 'lib/ovirtsdk4/types.rb', line 30543

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

30552
30553
30554
# File 'lib/ovirtsdk4/types.rb', line 30552

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

30561
30562
30563
# File 'lib/ovirtsdk4/types.rb', line 30561

def comment=(value)
  @comment = value
end

#concurrentBoolean

Returns the value of the concurrent attribute.

Returns:

  • (Boolean)

30570
30571
30572
# File 'lib/ovirtsdk4/types.rb', line 30570

def concurrent
  @concurrent
end

#concurrent=(value) ⇒ Object

Sets the value of the concurrent attribute.

Parameters:

  • value (Boolean)

30579
30580
30581
# File 'lib/ovirtsdk4/types.rb', line 30579

def concurrent=(value)
  @concurrent = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

30588
30589
30590
# File 'lib/ovirtsdk4/types.rb', line 30588

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

30597
30598
30599
# File 'lib/ovirtsdk4/types.rb', line 30597

def description=(value)
  @description = value
end

#encrypt_optionsBoolean

Returns the value of the encrypt_options attribute.

Returns:

  • (Boolean)

30606
30607
30608
# File 'lib/ovirtsdk4/types.rb', line 30606

def encrypt_options
  @encrypt_options
end

#encrypt_options=(value) ⇒ Object

Sets the value of the encrypt_options attribute.

Parameters:

  • value (Boolean)

30615
30616
30617
# File 'lib/ovirtsdk4/types.rb', line 30615

def encrypt_options=(value)
  @encrypt_options = value
end

#hashObject

Generates a hash value for this object.


30866
30867
30868
30869
30870
30871
30872
30873
30874
30875
30876
30877
30878
# File 'lib/ovirtsdk4/types.rb', line 30866

def hash
  super +
  @address.hash +
  @concurrent.hash +
  @encrypt_options.hash +
  @host.hash +
  @options.hash +
  @order.hash +
  @password.hash +
  @port.hash +
  @type.hash +
  @username.hash
end

#hostHost

Returns the value of the host attribute.

Returns:


30624
30625
30626
# File 'lib/ovirtsdk4/types.rb', line 30624

def host
  @host
end

#host=(value) ⇒ Object

Sets the value of the host attribute.

The value parameter can be an instance of Host 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 (Host, Hash)

30637
30638
30639
30640
30641
30642
# File 'lib/ovirtsdk4/types.rb', line 30637

def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)

30649
30650
30651
# File 'lib/ovirtsdk4/types.rb', line 30649

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

30658
30659
30660
# File 'lib/ovirtsdk4/types.rb', line 30658

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

30667
30668
30669
# File 'lib/ovirtsdk4/types.rb', line 30667

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

30676
30677
30678
# File 'lib/ovirtsdk4/types.rb', line 30676

def name=(value)
  @name = value
end

#optionsArray<Option>

Returns the value of the options attribute.

Returns:


30685
30686
30687
# File 'lib/ovirtsdk4/types.rb', line 30685

def options
  @options
end

#options=(list) ⇒ Object

Sets the value of the options attribute.

Parameters:


30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
# File 'lib/ovirtsdk4/types.rb', line 30694

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

#orderInteger

Returns the value of the order attribute.

Returns:

  • (Integer)

30711
30712
30713
# File 'lib/ovirtsdk4/types.rb', line 30711

def order
  @order
end

#order=(value) ⇒ Object

Sets the value of the order attribute.

Parameters:

  • value (Integer)

30720
30721
30722
# File 'lib/ovirtsdk4/types.rb', line 30720

def order=(value)
  @order = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)

30729
30730
30731
# File 'lib/ovirtsdk4/types.rb', line 30729

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)

30738
30739
30740
# File 'lib/ovirtsdk4/types.rb', line 30738

def password=(value)
  @password = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)

30747
30748
30749
# File 'lib/ovirtsdk4/types.rb', line 30747

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)

30756
30757
30758
# File 'lib/ovirtsdk4/types.rb', line 30756

def port=(value)
  @port = value
end

#typeString

Returns the value of the type attribute.

Returns:

  • (String)

30765
30766
30767
# File 'lib/ovirtsdk4/types.rb', line 30765

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:

  • value (String)

30774
30775
30776
# File 'lib/ovirtsdk4/types.rb', line 30774

def type=(value)
  @type = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)

30783
30784
30785
# File 'lib/ovirtsdk4/types.rb', line 30783

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)

30792
30793
30794
# File 'lib/ovirtsdk4/types.rb', line 30792

def username=(value)
  @username = value
end