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.


21234
21235
21236
21237
21238
21239
21240
# File 'lib/ovirtsdk4/types.rb', line 21234

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.


21245
21246
21247
21248
21249
21250
21251
# File 'lib/ovirtsdk4/types.rb', line 21245

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)

21064
21065
21066
# File 'lib/ovirtsdk4/types.rb', line 21064

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

21073
21074
21075
# File 'lib/ovirtsdk4/types.rb', line 21073

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

21082
21083
21084
# File 'lib/ovirtsdk4/types.rb', line 21082

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

21091
21092
21093
# File 'lib/ovirtsdk4/types.rb', line 21091

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.


21256
21257
21258
21259
21260
21261
21262
# File 'lib/ovirtsdk4/types.rb', line 21256

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

#hostHost

Returns the value of the host attribute.

Returns:


21100
21101
21102
# File 'lib/ovirtsdk4/types.rb', line 21100

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)

21113
21114
21115
21116
21117
21118
# File 'lib/ovirtsdk4/types.rb', line 21113

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)

21125
21126
21127
# File 'lib/ovirtsdk4/types.rb', line 21125

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

21134
21135
21136
# File 'lib/ovirtsdk4/types.rb', line 21134

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

21143
21144
21145
# File 'lib/ovirtsdk4/types.rb', line 21143

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

21152
21153
21154
# File 'lib/ovirtsdk4/types.rb', line 21152

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)

21161
21162
21163
# File 'lib/ovirtsdk4/types.rb', line 21161

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)

21170
21171
21172
# File 'lib/ovirtsdk4/types.rb', line 21170

def password=(value)
  @password = value
end

#targetString

Returns the value of the target attribute.

Returns:

  • (String)

21179
21180
21181
# File 'lib/ovirtsdk4/types.rb', line 21179

def target
  @target
end

#target=(value) ⇒ Object

Sets the value of the target attribute.

Parameters:

  • value (String)

21188
21189
21190
# File 'lib/ovirtsdk4/types.rb', line 21188

def target=(value)
  @target = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)

21197
21198
21199
# File 'lib/ovirtsdk4/types.rb', line 21197

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)

21206
21207
21208
# File 'lib/ovirtsdk4/types.rb', line 21206

def username=(value)
  @username = value
end