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.



24585
24586
24587
24588
24589
24590
24591
24592
# File 'lib/ovirtsdk4/types.rb', line 24585

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.



24597
24598
24599
24600
24601
24602
24603
24604
# File 'lib/ovirtsdk4/types.rb', line 24597

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)


24402
24403
24404
# File 'lib/ovirtsdk4/types.rb', line 24402

def build
  @build
end

#build=(value) ⇒ Object

Sets the value of the build attribute.

Parameters:

  • value (Integer)


24411
24412
24413
# File 'lib/ovirtsdk4/types.rb', line 24411

def build=(value)
  @build = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


24420
24421
24422
# File 'lib/ovirtsdk4/types.rb', line 24420

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


24429
24430
24431
# File 'lib/ovirtsdk4/types.rb', line 24429

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


24438
24439
24440
# File 'lib/ovirtsdk4/types.rb', line 24438

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


24447
24448
24449
# File 'lib/ovirtsdk4/types.rb', line 24447

def description=(value)
  @description = value
end

#full_versionString

Returns the value of the full_version attribute.

Returns:

  • (String)


24456
24457
24458
# File 'lib/ovirtsdk4/types.rb', line 24456

def full_version
  @full_version
end

#full_version=(value) ⇒ Object

Sets the value of the full_version attribute.

Parameters:

  • value (String)


24465
24466
24467
# File 'lib/ovirtsdk4/types.rb', line 24465

def full_version=(value)
  @full_version = value
end

#hashObject

Generates a hash value for this object.



24609
24610
24611
24612
24613
24614
24615
24616
# File 'lib/ovirtsdk4/types.rb', line 24609

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)


24474
24475
24476
# File 'lib/ovirtsdk4/types.rb', line 24474

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


24483
24484
24485
# File 'lib/ovirtsdk4/types.rb', line 24483

def id=(value)
  @id = value
end

#majorInteger

Returns the value of the major attribute.

Returns:

  • (Integer)


24492
24493
24494
# File 'lib/ovirtsdk4/types.rb', line 24492

def major
  @major
end

#major=(value) ⇒ Object

Sets the value of the major attribute.

Parameters:

  • value (Integer)


24501
24502
24503
# File 'lib/ovirtsdk4/types.rb', line 24501

def major=(value)
  @major = value
end

#minorInteger

Returns the value of the minor attribute.

Returns:

  • (Integer)


24510
24511
24512
# File 'lib/ovirtsdk4/types.rb', line 24510

def minor
  @minor
end

#minor=(value) ⇒ Object

Sets the value of the minor attribute.

Parameters:

  • value (Integer)


24519
24520
24521
# File 'lib/ovirtsdk4/types.rb', line 24519

def minor=(value)
  @minor = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


24528
24529
24530
# File 'lib/ovirtsdk4/types.rb', line 24528

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


24537
24538
24539
# File 'lib/ovirtsdk4/types.rb', line 24537

def name=(value)
  @name = value
end

#revisionInteger

Returns the value of the revision attribute.

Returns:

  • (Integer)


24546
24547
24548
# File 'lib/ovirtsdk4/types.rb', line 24546

def revision
  @revision
end

#revision=(value) ⇒ Object

Sets the value of the revision attribute.

Parameters:

  • value (Integer)


24555
24556
24557
# File 'lib/ovirtsdk4/types.rb', line 24555

def revision=(value)
  @revision = value
end