Class: OvirtSDK4::Version

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

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

  • :build (Integer)

    The value of attribute build.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :full_version (String)

    The value of attribute full_version.

  • :id (String)

    The value of attribute id.

  • :major (Integer)

    The value of attribute major.

  • :minor (Integer)

    The value of attribute minor.

  • :name (String)

    The value of attribute name.

  • :revision (Integer)

    The value of attribute revision.


24262
24263
24264
24265
24266
24267
24268
24269
# File 'lib/ovirtsdk4/types.rb', line 24262

def initialize(opts = {})
  super(opts)
  self.build = opts[:build]
  self.full_version = opts[:full_version]
  self.major = opts[:major]
  self.minor = opts[:minor]
  self.revision = opts[:revision]
end

Instance Method Details

#==(other) ⇒ Object

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


24274
24275
24276
24277
24278
24279
24280
24281
# File 'lib/ovirtsdk4/types.rb', line 24274

def ==(other)
  super &&
  @build == other.build &&
  @full_version == other.full_version &&
  @major == other.major &&
  @minor == other.minor &&
  @revision == other.revision
end

#buildInteger

Returns the value of the build attribute.

Returns:

  • (Integer)

24079
24080
24081
# File 'lib/ovirtsdk4/types.rb', line 24079

def build
  @build
end

#build=(value) ⇒ Object

Sets the value of the build attribute.

Parameters:

  • value (Integer)

24088
24089
24090
# File 'lib/ovirtsdk4/types.rb', line 24088

def build=(value)
  @build = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

24097
24098
24099
# File 'lib/ovirtsdk4/types.rb', line 24097

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

24106
24107
24108
# File 'lib/ovirtsdk4/types.rb', line 24106

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

24115
24116
24117
# File 'lib/ovirtsdk4/types.rb', line 24115

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

24124
24125
24126
# File 'lib/ovirtsdk4/types.rb', line 24124

def description=(value)
  @description = value
end

#full_versionString

Returns the value of the full_version attribute.

Returns:

  • (String)

24133
24134
24135
# File 'lib/ovirtsdk4/types.rb', line 24133

def full_version
  @full_version
end

#full_version=(value) ⇒ Object

Sets the value of the full_version attribute.

Parameters:

  • value (String)

24142
24143
24144
# File 'lib/ovirtsdk4/types.rb', line 24142

def full_version=(value)
  @full_version = value
end

#hashObject

Generates a hash value for this object.


24286
24287
24288
24289
24290
24291
24292
24293
# File 'lib/ovirtsdk4/types.rb', line 24286

def hash
  super +
  @build.hash +
  @full_version.hash +
  @major.hash +
  @minor.hash +
  @revision.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)

24151
24152
24153
# File 'lib/ovirtsdk4/types.rb', line 24151

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

24160
24161
24162
# File 'lib/ovirtsdk4/types.rb', line 24160

def id=(value)
  @id = value
end

#majorInteger

Returns the value of the major attribute.

Returns:

  • (Integer)

24169
24170
24171
# File 'lib/ovirtsdk4/types.rb', line 24169

def major
  @major
end

#major=(value) ⇒ Object

Sets the value of the major attribute.

Parameters:

  • value (Integer)

24178
24179
24180
# File 'lib/ovirtsdk4/types.rb', line 24178

def major=(value)
  @major = value
end

#minorInteger

Returns the value of the minor attribute.

Returns:

  • (Integer)

24187
24188
24189
# File 'lib/ovirtsdk4/types.rb', line 24187

def minor
  @minor
end

#minor=(value) ⇒ Object

Sets the value of the minor attribute.

Parameters:

  • value (Integer)

24196
24197
24198
# File 'lib/ovirtsdk4/types.rb', line 24196

def minor=(value)
  @minor = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

24205
24206
24207
# File 'lib/ovirtsdk4/types.rb', line 24205

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

24214
24215
24216
# File 'lib/ovirtsdk4/types.rb', line 24214

def name=(value)
  @name = value
end

#revisionInteger

Returns the value of the revision attribute.

Returns:

  • (Integer)

24223
24224
24225
# File 'lib/ovirtsdk4/types.rb', line 24223

def revision
  @revision
end

#revision=(value) ⇒ Object

Sets the value of the revision attribute.

Parameters:

  • value (Integer)

24232
24233
24234
# File 'lib/ovirtsdk4/types.rb', line 24232

def revision=(value)
  @revision = value
end