Class: OvirtSDK4::ExternalProvider

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

Direct Known Subclasses

ExternalHostProvider, OpenStackProvider

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ ExternalProvider

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

  • :authentication_url (String)

    The value of attribute authentication_url.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :password (String)

    The value of attribute password.

  • :properties (Array<Property>, Array<Hash>)

    The values of attribute properties.

  • :requires_authentication (Boolean)

    The value of attribute requires_authentication.

  • :url (String)

    The value of attribute url.

  • :username (String)

    The value of attribute username.



38522
38523
38524
38525
38526
38527
38528
38529
38530
# File 'lib/ovirtsdk4/types.rb', line 38522

def initialize(opts = {})
  super(opts)
  self.authentication_url = opts[:authentication_url]
  self.password = opts[:password]
  self.properties = opts[:properties]
  self.requires_authentication = opts[:requires_authentication]
  self.url = opts[:url]
  self.username = opts[:username]
end

Instance Method Details

#==(other) ⇒ Object

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



38535
38536
38537
38538
38539
38540
38541
38542
38543
# File 'lib/ovirtsdk4/types.rb', line 38535

def ==(other)
  super &&
  @authentication_url == other.authentication_url &&
  @password == other.password &&
  @properties == other.properties &&
  @requires_authentication == other.requires_authentication &&
  @url == other.url &&
  @username == other.username
end

#authentication_urlString

Returns the value of the authentication_url attribute.

Returns:

  • (String)


38311
38312
38313
# File 'lib/ovirtsdk4/types.rb', line 38311

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)


38320
38321
38322
# File 'lib/ovirtsdk4/types.rb', line 38320

def authentication_url=(value)
  @authentication_url = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


38329
38330
38331
# File 'lib/ovirtsdk4/types.rb', line 38329

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


38338
38339
38340
# File 'lib/ovirtsdk4/types.rb', line 38338

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


38347
38348
38349
# File 'lib/ovirtsdk4/types.rb', line 38347

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


38356
38357
38358
# File 'lib/ovirtsdk4/types.rb', line 38356

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



38548
38549
38550
38551
38552
38553
38554
38555
38556
# File 'lib/ovirtsdk4/types.rb', line 38548

def hash
  super +
  @authentication_url.hash +
  @password.hash +
  @properties.hash +
  @requires_authentication.hash +
  @url.hash +
  @username.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


38365
38366
38367
# File 'lib/ovirtsdk4/types.rb', line 38365

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


38374
38375
38376
# File 'lib/ovirtsdk4/types.rb', line 38374

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


38383
38384
38385
# File 'lib/ovirtsdk4/types.rb', line 38383

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


38392
38393
38394
# File 'lib/ovirtsdk4/types.rb', line 38392

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


38401
38402
38403
# File 'lib/ovirtsdk4/types.rb', line 38401

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


38410
38411
38412
# File 'lib/ovirtsdk4/types.rb', line 38410

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:



38419
38420
38421
# File 'lib/ovirtsdk4/types.rb', line 38419

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:



38428
38429
38430
38431
38432
38433
38434
38435
38436
38437
38438
# File 'lib/ovirtsdk4/types.rb', line 38428

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

#requires_authenticationBoolean

Returns the value of the requires_authentication attribute.

Returns:

  • (Boolean)


38445
38446
38447
# File 'lib/ovirtsdk4/types.rb', line 38445

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)


38454
38455
38456
# File 'lib/ovirtsdk4/types.rb', line 38454

def requires_authentication=(value)
  @requires_authentication = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


38463
38464
38465
# File 'lib/ovirtsdk4/types.rb', line 38463

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


38472
38473
38474
# File 'lib/ovirtsdk4/types.rb', line 38472

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


38481
38482
38483
# File 'lib/ovirtsdk4/types.rb', line 38481

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


38490
38491
38492
# File 'lib/ovirtsdk4/types.rb', line 38490

def username=(value)
  @username = value
end