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.



30081
30082
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092
30093
# File 'lib/ovirtsdk4/types.rb', line 30081

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.



30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110
# File 'lib/ovirtsdk4/types.rb', line 30098

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)


29783
29784
29785
# File 'lib/ovirtsdk4/types.rb', line 29783

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)


29792
29793
29794
# File 'lib/ovirtsdk4/types.rb', line 29792

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


29801
29802
29803
# File 'lib/ovirtsdk4/types.rb', line 29801

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


29810
29811
29812
# File 'lib/ovirtsdk4/types.rb', line 29810

def comment=(value)
  @comment = value
end

#concurrentBoolean

Returns the value of the concurrent attribute.

Returns:

  • (Boolean)


29819
29820
29821
# File 'lib/ovirtsdk4/types.rb', line 29819

def concurrent
  @concurrent
end

#concurrent=(value) ⇒ Object

Sets the value of the concurrent attribute.

Parameters:

  • value (Boolean)


29828
29829
29830
# File 'lib/ovirtsdk4/types.rb', line 29828

def concurrent=(value)
  @concurrent = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


29837
29838
29839
# File 'lib/ovirtsdk4/types.rb', line 29837

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


29846
29847
29848
# File 'lib/ovirtsdk4/types.rb', line 29846

def description=(value)
  @description = value
end

#encrypt_optionsBoolean

Returns the value of the encrypt_options attribute.

Returns:

  • (Boolean)


29855
29856
29857
# File 'lib/ovirtsdk4/types.rb', line 29855

def encrypt_options
  @encrypt_options
end

#encrypt_options=(value) ⇒ Object

Sets the value of the encrypt_options attribute.

Parameters:

  • value (Boolean)


29864
29865
29866
# File 'lib/ovirtsdk4/types.rb', line 29864

def encrypt_options=(value)
  @encrypt_options = value
end

#hashObject

Generates a hash value for this object.



30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
# File 'lib/ovirtsdk4/types.rb', line 30115

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:



29873
29874
29875
# File 'lib/ovirtsdk4/types.rb', line 29873

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)


29886
29887
29888
29889
29890
29891
# File 'lib/ovirtsdk4/types.rb', line 29886

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)


29898
29899
29900
# File 'lib/ovirtsdk4/types.rb', line 29898

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


29907
29908
29909
# File 'lib/ovirtsdk4/types.rb', line 29907

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


29916
29917
29918
# File 'lib/ovirtsdk4/types.rb', line 29916

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


29925
29926
29927
# File 'lib/ovirtsdk4/types.rb', line 29925

def name=(value)
  @name = value
end

#optionsArray<Option>

Returns the value of the options attribute.

Returns:



29934
29935
29936
# File 'lib/ovirtsdk4/types.rb', line 29934

def options
  @options
end

#options=(list) ⇒ Object

Sets the value of the options attribute.

Parameters:



29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
# File 'lib/ovirtsdk4/types.rb', line 29943

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)


29960
29961
29962
# File 'lib/ovirtsdk4/types.rb', line 29960

def order
  @order
end

#order=(value) ⇒ Object

Sets the value of the order attribute.

Parameters:

  • value (Integer)


29969
29970
29971
# File 'lib/ovirtsdk4/types.rb', line 29969

def order=(value)
  @order = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


29978
29979
29980
# File 'lib/ovirtsdk4/types.rb', line 29978

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


29987
29988
29989
# File 'lib/ovirtsdk4/types.rb', line 29987

def password=(value)
  @password = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


29996
29997
29998
# File 'lib/ovirtsdk4/types.rb', line 29996

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


30005
30006
30007
# File 'lib/ovirtsdk4/types.rb', line 30005

def port=(value)
  @port = value
end

#typeString

Returns the value of the type attribute.

Returns:

  • (String)


30014
30015
30016
# File 'lib/ovirtsdk4/types.rb', line 30014

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:

  • value (String)


30023
30024
30025
# File 'lib/ovirtsdk4/types.rb', line 30023

def type=(value)
  @type = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


30032
30033
30034
# File 'lib/ovirtsdk4/types.rb', line 30032

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


30041
30042
30043
# File 'lib/ovirtsdk4/types.rb', line 30041

def username=(value)
  @username = value
end