Class: OvirtSDK4::TimeZone

Inherits:
Struct
  • Object
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 = {}) ⇒ TimeZone

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

  • :name (String)

    The value of attribute name.

  • :utc_offset (String)

    The value of attribute utc_offset.


22966
22967
22968
22969
22970
# File 'lib/ovirtsdk4/types.rb', line 22966

def initialize(opts = {})
  super(opts)
  self.name = opts[:name]
  self.utc_offset = opts[:utc_offset]
end

Instance Method Details

#==(other) ⇒ Object

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


22975
22976
22977
22978
22979
# File 'lib/ovirtsdk4/types.rb', line 22975

def ==(other)
  super &&
  @name == other.name &&
  @utc_offset == other.utc_offset
end

#hashObject

Generates a hash value for this object.


22984
22985
22986
22987
22988
# File 'lib/ovirtsdk4/types.rb', line 22984

def hash
  super +
  @name.hash +
  @utc_offset.hash
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

22923
22924
22925
# File 'lib/ovirtsdk4/types.rb', line 22923

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

22932
22933
22934
# File 'lib/ovirtsdk4/types.rb', line 22932

def name=(value)
  @name = value
end

#utc_offsetString

Returns the value of the utc_offset attribute.

Returns:

  • (String)

22941
22942
22943
# File 'lib/ovirtsdk4/types.rb', line 22941

def utc_offset
  @utc_offset
end

#utc_offset=(value) ⇒ Object

Sets the value of the utc_offset attribute.

Parameters:

  • value (String)

22950
22951
22952
# File 'lib/ovirtsdk4/types.rb', line 22950

def utc_offset=(value)
  @utc_offset = value
end