Class: OvirtSDK4::EventSubscription

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

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

  • :address (String)

    The value of attribute address.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :event (NotifiableEvent)

    The value of attribute event.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :notification_method (NotificationMethod)

    The value of attribute notification_method.

  • :user (User, Hash)

    The value of attribute user.



38862
38863
38864
38865
38866
38867
38868
# File 'lib/ovirtsdk4/types.rb', line 38862

def initialize(opts = {})
  super(opts)
  self.address = opts[:address]
  self.event = opts[:event]
  self.notification_method = opts[:notification_method]
  self.user = opts[:user]
end

Instance Method Details

#==(other) ⇒ Object

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



38873
38874
38875
38876
38877
38878
38879
# File 'lib/ovirtsdk4/types.rb', line 38873

def ==(other)
  super &&
  @address == other.address &&
  @event == other.event &&
  @notification_method == other.notification_method &&
  @user == other.user
end

#addressString

Returns the value of the address attribute.

Returns:

  • (String)


38692
38693
38694
# File 'lib/ovirtsdk4/types.rb', line 38692

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)


38701
38702
38703
# File 'lib/ovirtsdk4/types.rb', line 38701

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


38710
38711
38712
# File 'lib/ovirtsdk4/types.rb', line 38710

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


38719
38720
38721
# File 'lib/ovirtsdk4/types.rb', line 38719

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


38728
38729
38730
# File 'lib/ovirtsdk4/types.rb', line 38728

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


38737
38738
38739
# File 'lib/ovirtsdk4/types.rb', line 38737

def description=(value)
  @description = value
end

#eventNotifiableEvent

Returns the value of the event attribute.

Returns:



38746
38747
38748
# File 'lib/ovirtsdk4/types.rb', line 38746

def event
  @event
end

#event=(value) ⇒ Object

Sets the value of the event attribute.

Parameters:



38755
38756
38757
# File 'lib/ovirtsdk4/types.rb', line 38755

def event=(value)
  @event = value
end

#hashObject

Generates a hash value for this object.



38884
38885
38886
38887
38888
38889
38890
# File 'lib/ovirtsdk4/types.rb', line 38884

def hash
  super +
  @address.hash +
  @event.hash +
  @notification_method.hash +
  @user.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


38764
38765
38766
# File 'lib/ovirtsdk4/types.rb', line 38764

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


38773
38774
38775
# File 'lib/ovirtsdk4/types.rb', line 38773

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


38782
38783
38784
# File 'lib/ovirtsdk4/types.rb', line 38782

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


38791
38792
38793
# File 'lib/ovirtsdk4/types.rb', line 38791

def name=(value)
  @name = value
end

#notification_methodNotificationMethod

Returns the value of the notification_method attribute.

Returns:



38800
38801
38802
# File 'lib/ovirtsdk4/types.rb', line 38800

def notification_method
  @notification_method
end

#notification_method=(value) ⇒ Object

Sets the value of the notification_method attribute.

Parameters:



38809
38810
38811
# File 'lib/ovirtsdk4/types.rb', line 38809

def notification_method=(value)
  @notification_method = value
end

#userUser

Returns the value of the user attribute.

Returns:



38818
38819
38820
# File 'lib/ovirtsdk4/types.rb', line 38818

def user
  @user
end

#user=(value) ⇒ Object

Sets the value of the user attribute.

The value parameter can be an instance of User 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 (User, Hash)


38831
38832
38833
38834
38835
38836
# File 'lib/ovirtsdk4/types.rb', line 38831

def user=(value)
  if value.is_a?(Hash)
    value = User.new(value)
  end
  @user = value
end