Class: OvirtSDK4::StorageConnectionExtension

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 = {}) ⇒ StorageConnectionExtension

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

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :host (Host, Hash)

    The value of attribute host.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :password (String)

    The value of attribute password.

  • :target (String)

    The value of attribute target.

  • :username (String)

    The value of attribute username.



21363
21364
21365
21366
21367
21368
21369
# File 'lib/ovirtsdk4/types.rb', line 21363

def initialize(opts = {})
  super(opts)
  self.host = opts[:host]
  self.password = opts[:password]
  self.target = opts[:target]
  self.username = opts[:username]
end

Instance Method Details

#==(other) ⇒ Object

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



21374
21375
21376
21377
21378
21379
21380
# File 'lib/ovirtsdk4/types.rb', line 21374

def ==(other)
  super &&
  @host == other.host &&
  @password == other.password &&
  @target == other.target &&
  @username == other.username
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


21193
21194
21195
# File 'lib/ovirtsdk4/types.rb', line 21193

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


21202
21203
21204
# File 'lib/ovirtsdk4/types.rb', line 21202

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


21211
21212
21213
# File 'lib/ovirtsdk4/types.rb', line 21211

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


21220
21221
21222
# File 'lib/ovirtsdk4/types.rb', line 21220

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



21385
21386
21387
21388
21389
21390
21391
# File 'lib/ovirtsdk4/types.rb', line 21385

def hash
  super +
  @host.hash +
  @password.hash +
  @target.hash +
  @username.hash
end

#hostHost

Returns the value of the host attribute.

Returns:



21229
21230
21231
# File 'lib/ovirtsdk4/types.rb', line 21229

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)


21242
21243
21244
21245
21246
21247
# File 'lib/ovirtsdk4/types.rb', line 21242

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)


21254
21255
21256
# File 'lib/ovirtsdk4/types.rb', line 21254

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


21263
21264
21265
# File 'lib/ovirtsdk4/types.rb', line 21263

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


21272
21273
21274
# File 'lib/ovirtsdk4/types.rb', line 21272

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


21281
21282
21283
# File 'lib/ovirtsdk4/types.rb', line 21281

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


21290
21291
21292
# File 'lib/ovirtsdk4/types.rb', line 21290

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


21299
21300
21301
# File 'lib/ovirtsdk4/types.rb', line 21299

def password=(value)
  @password = value
end

#targetString

Returns the value of the target attribute.

Returns:

  • (String)


21308
21309
21310
# File 'lib/ovirtsdk4/types.rb', line 21308

def target
  @target
end

#target=(value) ⇒ Object

Sets the value of the target attribute.

Parameters:

  • value (String)


21317
21318
21319
# File 'lib/ovirtsdk4/types.rb', line 21317

def target=(value)
  @target = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


21326
21327
21328
# File 'lib/ovirtsdk4/types.rb', line 21326

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


21335
21336
21337
# File 'lib/ovirtsdk4/types.rb', line 21335

def username=(value)
  @username = value
end