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.


39235
39236
39237
39238
39239
39240
39241
39242
39243
# File 'lib/ovirtsdk4/types.rb', line 39235

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.


39248
39249
39250
39251
39252
39253
39254
39255
39256
# File 'lib/ovirtsdk4/types.rb', line 39248

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)

39024
39025
39026
# File 'lib/ovirtsdk4/types.rb', line 39024

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)

39033
39034
39035
# File 'lib/ovirtsdk4/types.rb', line 39033

def authentication_url=(value)
  @authentication_url = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

39042
39043
39044
# File 'lib/ovirtsdk4/types.rb', line 39042

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

39051
39052
39053
# File 'lib/ovirtsdk4/types.rb', line 39051

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

39060
39061
39062
# File 'lib/ovirtsdk4/types.rb', line 39060

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

39069
39070
39071
# File 'lib/ovirtsdk4/types.rb', line 39069

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.


39261
39262
39263
39264
39265
39266
39267
39268
39269
# File 'lib/ovirtsdk4/types.rb', line 39261

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)

39078
39079
39080
# File 'lib/ovirtsdk4/types.rb', line 39078

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

39087
39088
39089
# File 'lib/ovirtsdk4/types.rb', line 39087

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

39096
39097
39098
# File 'lib/ovirtsdk4/types.rb', line 39096

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

39105
39106
39107
# File 'lib/ovirtsdk4/types.rb', line 39105

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)

39114
39115
39116
# File 'lib/ovirtsdk4/types.rb', line 39114

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)

39123
39124
39125
# File 'lib/ovirtsdk4/types.rb', line 39123

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:


39132
39133
39134
# File 'lib/ovirtsdk4/types.rb', line 39132

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:


39141
39142
39143
39144
39145
39146
39147
39148
39149
39150
39151
# File 'lib/ovirtsdk4/types.rb', line 39141

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)

39158
39159
39160
# File 'lib/ovirtsdk4/types.rb', line 39158

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)

39167
39168
39169
# File 'lib/ovirtsdk4/types.rb', line 39167

def requires_authentication=(value)
  @requires_authentication = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)

39176
39177
39178
# File 'lib/ovirtsdk4/types.rb', line 39176

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)

39185
39186
39187
# File 'lib/ovirtsdk4/types.rb', line 39185

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)

39194
39195
39196
# File 'lib/ovirtsdk4/types.rb', line 39194

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)

39203
39204
39205
# File 'lib/ovirtsdk4/types.rb', line 39203

def username=(value)
  @username = value
end