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.

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.



40010
40011
40012
40013
40014
40015
40016
# File 'lib/ovirtsdk4/types.rb', line 40010

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.



40021
40022
40023
40024
40025
40026
40027
# File 'lib/ovirtsdk4/types.rb', line 40021

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.



39840
39841
39842
# File 'lib/ovirtsdk4/types.rb', line 39840

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.



39849
39850
39851
# File 'lib/ovirtsdk4/types.rb', line 39849

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.



39858
39859
39860
# File 'lib/ovirtsdk4/types.rb', line 39858

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.



39867
39868
39869
# File 'lib/ovirtsdk4/types.rb', line 39867

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.



39876
39877
39878
# File 'lib/ovirtsdk4/types.rb', line 39876

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.



39885
39886
39887
# File 'lib/ovirtsdk4/types.rb', line 39885

def description=(value)
  @description = value
end

#eventNotifiableEvent

Returns the value of the event attribute.



39894
39895
39896
# File 'lib/ovirtsdk4/types.rb', line 39894

def event
  @event
end

#event=(value) ⇒ Object

Sets the value of the event attribute.



39903
39904
39905
# File 'lib/ovirtsdk4/types.rb', line 39903

def event=(value)
  @event = value
end

#hashObject

Generates a hash value for this object.



40032
40033
40034
40035
40036
40037
40038
# File 'lib/ovirtsdk4/types.rb', line 40032

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

#idString

Returns the value of the id attribute.



39912
39913
39914
# File 'lib/ovirtsdk4/types.rb', line 39912

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.



39921
39922
39923
# File 'lib/ovirtsdk4/types.rb', line 39921

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.



39930
39931
39932
# File 'lib/ovirtsdk4/types.rb', line 39930

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.



39939
39940
39941
# File 'lib/ovirtsdk4/types.rb', line 39939

def name=(value)
  @name = value
end

#notification_methodNotificationMethod

Returns the value of the notification_method attribute.



39948
39949
39950
# File 'lib/ovirtsdk4/types.rb', line 39948

def notification_method
  @notification_method
end

#notification_method=(value) ⇒ Object

Sets the value of the notification_method attribute.



39957
39958
39959
# File 'lib/ovirtsdk4/types.rb', line 39957

def notification_method=(value)
  @notification_method = value
end

#userUser

Returns the value of the user attribute.



39966
39967
39968
# File 'lib/ovirtsdk4/types.rb', line 39966

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.



39979
39980
39981
39982
39983
39984
# File 'lib/ovirtsdk4/types.rb', line 39979

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