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.



41266
41267
41268
41269
41270
41271
41272
41273
41274
# File 'lib/ovirtsdk4/types.rb', line 41266

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.



41279
41280
41281
41282
41283
41284
41285
41286
41287
# File 'lib/ovirtsdk4/types.rb', line 41279

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)


41055
41056
41057
# File 'lib/ovirtsdk4/types.rb', line 41055

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)


41064
41065
41066
# File 'lib/ovirtsdk4/types.rb', line 41064

def authentication_url=(value)
  @authentication_url = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


41073
41074
41075
# File 'lib/ovirtsdk4/types.rb', line 41073

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


41082
41083
41084
# File 'lib/ovirtsdk4/types.rb', line 41082

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


41091
41092
41093
# File 'lib/ovirtsdk4/types.rb', line 41091

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


41100
41101
41102
# File 'lib/ovirtsdk4/types.rb', line 41100

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



41292
41293
41294
41295
41296
41297
41298
41299
41300
# File 'lib/ovirtsdk4/types.rb', line 41292

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)


41109
41110
41111
# File 'lib/ovirtsdk4/types.rb', line 41109

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


41118
41119
41120
# File 'lib/ovirtsdk4/types.rb', line 41118

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


41127
41128
41129
# File 'lib/ovirtsdk4/types.rb', line 41127

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


41136
41137
41138
# File 'lib/ovirtsdk4/types.rb', line 41136

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


41145
41146
41147
# File 'lib/ovirtsdk4/types.rb', line 41145

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


41154
41155
41156
# File 'lib/ovirtsdk4/types.rb', line 41154

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:



41163
41164
41165
# File 'lib/ovirtsdk4/types.rb', line 41163

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:



41172
41173
41174
41175
41176
41177
41178
41179
41180
41181
41182
# File 'lib/ovirtsdk4/types.rb', line 41172

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)


41189
41190
41191
# File 'lib/ovirtsdk4/types.rb', line 41189

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)


41198
41199
41200
# File 'lib/ovirtsdk4/types.rb', line 41198

def requires_authentication=(value)
  @requires_authentication = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


41207
41208
41209
# File 'lib/ovirtsdk4/types.rb', line 41207

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


41216
41217
41218
# File 'lib/ovirtsdk4/types.rb', line 41216

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


41225
41226
41227
# File 'lib/ovirtsdk4/types.rb', line 41225

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


41234
41235
41236
# File 'lib/ovirtsdk4/types.rb', line 41234

def username=(value)
  @username = value
end