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.



29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
# File 'lib/ovirtsdk4/types.rb', line 29866

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.



29883
29884
29885
29886
29887
29888
29889
29890
29891
29892
29893
29894
29895
# File 'lib/ovirtsdk4/types.rb', line 29883

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)


29568
29569
29570
# File 'lib/ovirtsdk4/types.rb', line 29568

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)


29577
29578
29579
# File 'lib/ovirtsdk4/types.rb', line 29577

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


29586
29587
29588
# File 'lib/ovirtsdk4/types.rb', line 29586

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


29595
29596
29597
# File 'lib/ovirtsdk4/types.rb', line 29595

def comment=(value)
  @comment = value
end

#concurrentBoolean

Returns the value of the concurrent attribute.

Returns:

  • (Boolean)


29604
29605
29606
# File 'lib/ovirtsdk4/types.rb', line 29604

def concurrent
  @concurrent
end

#concurrent=(value) ⇒ Object

Sets the value of the concurrent attribute.

Parameters:

  • value (Boolean)


29613
29614
29615
# File 'lib/ovirtsdk4/types.rb', line 29613

def concurrent=(value)
  @concurrent = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


29622
29623
29624
# File 'lib/ovirtsdk4/types.rb', line 29622

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


29631
29632
29633
# File 'lib/ovirtsdk4/types.rb', line 29631

def description=(value)
  @description = value
end

#encrypt_optionsBoolean

Returns the value of the encrypt_options attribute.

Returns:

  • (Boolean)


29640
29641
29642
# File 'lib/ovirtsdk4/types.rb', line 29640

def encrypt_options
  @encrypt_options
end

#encrypt_options=(value) ⇒ Object

Sets the value of the encrypt_options attribute.

Parameters:

  • value (Boolean)


29649
29650
29651
# File 'lib/ovirtsdk4/types.rb', line 29649

def encrypt_options=(value)
  @encrypt_options = value
end

#hashObject

Generates a hash value for this object.



29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
# File 'lib/ovirtsdk4/types.rb', line 29900

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:



29658
29659
29660
# File 'lib/ovirtsdk4/types.rb', line 29658

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)


29671
29672
29673
29674
29675
29676
# File 'lib/ovirtsdk4/types.rb', line 29671

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)


29683
29684
29685
# File 'lib/ovirtsdk4/types.rb', line 29683

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


29692
29693
29694
# File 'lib/ovirtsdk4/types.rb', line 29692

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


29701
29702
29703
# File 'lib/ovirtsdk4/types.rb', line 29701

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


29710
29711
29712
# File 'lib/ovirtsdk4/types.rb', line 29710

def name=(value)
  @name = value
end

#optionsArray<Option>

Returns the value of the options attribute.

Returns:



29719
29720
29721
# File 'lib/ovirtsdk4/types.rb', line 29719

def options
  @options
end

#options=(list) ⇒ Object

Sets the value of the options attribute.

Parameters:



29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
# File 'lib/ovirtsdk4/types.rb', line 29728

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)


29745
29746
29747
# File 'lib/ovirtsdk4/types.rb', line 29745

def order
  @order
end

#order=(value) ⇒ Object

Sets the value of the order attribute.

Parameters:

  • value (Integer)


29754
29755
29756
# File 'lib/ovirtsdk4/types.rb', line 29754

def order=(value)
  @order = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


29763
29764
29765
# File 'lib/ovirtsdk4/types.rb', line 29763

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


29772
29773
29774
# File 'lib/ovirtsdk4/types.rb', line 29772

def password=(value)
  @password = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


29781
29782
29783
# File 'lib/ovirtsdk4/types.rb', line 29781

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


29790
29791
29792
# File 'lib/ovirtsdk4/types.rb', line 29790

def port=(value)
  @port = value
end

#typeString

Returns the value of the type attribute.

Returns:

  • (String)


29799
29800
29801
# File 'lib/ovirtsdk4/types.rb', line 29799

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:

  • value (String)


29808
29809
29810
# File 'lib/ovirtsdk4/types.rb', line 29808

def type=(value)
  @type = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


29817
29818
29819
# File 'lib/ovirtsdk4/types.rb', line 29817

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


29826
29827
29828
# File 'lib/ovirtsdk4/types.rb', line 29826

def username=(value)
  @username = value
end