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.



39717
39718
39719
39720
39721
39722
39723
# File 'lib/ovirtsdk4/types.rb', line 39717

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.



39728
39729
39730
39731
39732
39733
39734
# File 'lib/ovirtsdk4/types.rb', line 39728

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)


39547
39548
39549
# File 'lib/ovirtsdk4/types.rb', line 39547

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)


39556
39557
39558
# File 'lib/ovirtsdk4/types.rb', line 39556

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


39565
39566
39567
# File 'lib/ovirtsdk4/types.rb', line 39565

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


39574
39575
39576
# File 'lib/ovirtsdk4/types.rb', line 39574

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


39583
39584
39585
# File 'lib/ovirtsdk4/types.rb', line 39583

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


39592
39593
39594
# File 'lib/ovirtsdk4/types.rb', line 39592

def description=(value)
  @description = value
end

#eventNotifiableEvent

Returns the value of the event attribute.

Returns:



39601
39602
39603
# File 'lib/ovirtsdk4/types.rb', line 39601

def event
  @event
end

#event=(value) ⇒ Object

Sets the value of the event attribute.

Parameters:



39610
39611
39612
# File 'lib/ovirtsdk4/types.rb', line 39610

def event=(value)
  @event = value
end

#hashObject

Generates a hash value for this object.



39739
39740
39741
39742
39743
39744
39745
# File 'lib/ovirtsdk4/types.rb', line 39739

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

#idString

Returns the value of the id attribute.

Returns:

  • (String)


39619
39620
39621
# File 'lib/ovirtsdk4/types.rb', line 39619

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


39628
39629
39630
# File 'lib/ovirtsdk4/types.rb', line 39628

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


39637
39638
39639
# File 'lib/ovirtsdk4/types.rb', line 39637

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


39646
39647
39648
# File 'lib/ovirtsdk4/types.rb', line 39646

def name=(value)
  @name = value
end

#notification_methodNotificationMethod

Returns the value of the notification_method attribute.

Returns:



39655
39656
39657
# File 'lib/ovirtsdk4/types.rb', line 39655

def notification_method
  @notification_method
end

#notification_method=(value) ⇒ Object

Sets the value of the notification_method attribute.

Parameters:



39664
39665
39666
# File 'lib/ovirtsdk4/types.rb', line 39664

def notification_method=(value)
  @notification_method = value
end

#userUser

Returns the value of the user attribute.

Returns:



39673
39674
39675
# File 'lib/ovirtsdk4/types.rb', line 39673

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)


39686
39687
39688
39689
39690
39691
# File 'lib/ovirtsdk4/types.rb', line 39686

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