Class: OvirtSDK4::ExternalComputeResource

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

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

  • :external_host_provider (ExternalHostProvider, Hash)

    The value of attribute external_host_provider.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :provider (String)

    The value of attribute provider.

  • :url (String)

    The value of attribute url.

  • :user (String)

    The value of attribute user.



40219
40220
40221
40222
40223
40224
40225
# File 'lib/ovirtsdk4/types.rb', line 40219

def initialize(opts = {})
  super(opts)
  self.external_host_provider = opts[:external_host_provider]
  self.provider = opts[:provider]
  self.url = opts[:url]
  self.user = opts[:user]
end

Instance Method Details

#==(other) ⇒ Object

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



40230
40231
40232
40233
40234
40235
40236
# File 'lib/ovirtsdk4/types.rb', line 40230

def ==(other)
  super &&
  @external_host_provider == other.external_host_provider &&
  @provider == other.provider &&
  @url == other.url &&
  @user == other.user
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


40049
40050
40051
# File 'lib/ovirtsdk4/types.rb', line 40049

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


40058
40059
40060
# File 'lib/ovirtsdk4/types.rb', line 40058

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


40067
40068
40069
# File 'lib/ovirtsdk4/types.rb', line 40067

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


40076
40077
40078
# File 'lib/ovirtsdk4/types.rb', line 40076

def description=(value)
  @description = value
end

#external_host_providerExternalHostProvider

Returns the value of the external_host_provider attribute.



40085
40086
40087
# File 'lib/ovirtsdk4/types.rb', line 40085

def external_host_provider
  @external_host_provider
end

#external_host_provider=(value) ⇒ Object

Sets the value of the external_host_provider attribute.

The value parameter can be an instance of OvirtSDK4::ExternalHostProvider 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:



40098
40099
40100
40101
40102
40103
# File 'lib/ovirtsdk4/types.rb', line 40098

def external_host_provider=(value)
  if value.is_a?(Hash)
    value = ExternalHostProvider.new(value)
  end
  @external_host_provider = value
end

#hashObject

Generates a hash value for this object.



40241
40242
40243
40244
40245
40246
40247
# File 'lib/ovirtsdk4/types.rb', line 40241

def hash
  super +
  @external_host_provider.hash +
  @provider.hash +
  @url.hash +
  @user.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


40110
40111
40112
# File 'lib/ovirtsdk4/types.rb', line 40110

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


40119
40120
40121
# File 'lib/ovirtsdk4/types.rb', line 40119

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


40128
40129
40130
# File 'lib/ovirtsdk4/types.rb', line 40128

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


40137
40138
40139
# File 'lib/ovirtsdk4/types.rb', line 40137

def name=(value)
  @name = value
end

#providerString

Returns the value of the provider attribute.

Returns:

  • (String)


40146
40147
40148
# File 'lib/ovirtsdk4/types.rb', line 40146

def provider
  @provider
end

#provider=(value) ⇒ Object

Sets the value of the provider attribute.

Parameters:

  • value (String)


40155
40156
40157
# File 'lib/ovirtsdk4/types.rb', line 40155

def provider=(value)
  @provider = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


40164
40165
40166
# File 'lib/ovirtsdk4/types.rb', line 40164

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


40173
40174
40175
# File 'lib/ovirtsdk4/types.rb', line 40173

def url=(value)
  @url = value
end

#userString

Returns the value of the user attribute.

Returns:

  • (String)


40182
40183
40184
# File 'lib/ovirtsdk4/types.rb', line 40182

def user
  @user
end

#user=(value) ⇒ Object

Sets the value of the user attribute.

Parameters:

  • value (String)


40191
40192
40193
# File 'lib/ovirtsdk4/types.rb', line 40191

def user=(value)
  @user = value
end