Class: OvirtSDK4::Session

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

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

  • :comment (String)

    The value of attribute comment.

  • :console_user (Boolean)

    The value of attribute console_user.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :ip (Ip, Hash)

    The value of attribute ip.

  • :name (String)

    The value of attribute name.

  • :protocol (String)

    The value of attribute protocol.

  • :user (User, Hash)

    The value of attribute user.

  • :vm (Vm, Hash)

    The value of attribute vm.



19036
19037
19038
19039
19040
19041
19042
19043
# File 'lib/ovirtsdk4/types.rb', line 19036

def initialize(opts = {})
  super(opts)
  self.console_user = opts[:console_user]
  self.ip = opts[:ip]
  self.protocol = opts[:protocol]
  self.user = opts[:user]
  self.vm = opts[:vm]
end

Instance Method Details

#==(other) ⇒ Object

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



19048
19049
19050
19051
19052
19053
19054
19055
# File 'lib/ovirtsdk4/types.rb', line 19048

def ==(other)
  super &&
  @console_user == other.console_user &&
  @ip == other.ip &&
  @protocol == other.protocol &&
  @user == other.user &&
  @vm == other.vm
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


18832
18833
18834
# File 'lib/ovirtsdk4/types.rb', line 18832

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


18841
18842
18843
# File 'lib/ovirtsdk4/types.rb', line 18841

def comment=(value)
  @comment = value
end

#console_userBoolean

Returns the value of the console_user attribute.

Returns:

  • (Boolean)


18850
18851
18852
# File 'lib/ovirtsdk4/types.rb', line 18850

def console_user
  @console_user
end

#console_user=(value) ⇒ Object

Sets the value of the console_user attribute.

Parameters:

  • value (Boolean)


18859
18860
18861
# File 'lib/ovirtsdk4/types.rb', line 18859

def console_user=(value)
  @console_user = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


18868
18869
18870
# File 'lib/ovirtsdk4/types.rb', line 18868

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


18877
18878
18879
# File 'lib/ovirtsdk4/types.rb', line 18877

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



19060
19061
19062
19063
19064
19065
19066
19067
# File 'lib/ovirtsdk4/types.rb', line 19060

def hash
  super +
  @console_user.hash +
  @ip.hash +
  @protocol.hash +
  @user.hash +
  @vm.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


18886
18887
18888
# File 'lib/ovirtsdk4/types.rb', line 18886

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


18895
18896
18897
# File 'lib/ovirtsdk4/types.rb', line 18895

def id=(value)
  @id = value
end

#ipIp

Returns the value of the ip attribute.

Returns:



18904
18905
18906
# File 'lib/ovirtsdk4/types.rb', line 18904

def ip
  @ip
end

#ip=(value) ⇒ Object

Sets the value of the ip attribute.

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


18917
18918
18919
18920
18921
18922
# File 'lib/ovirtsdk4/types.rb', line 18917

def ip=(value)
  if value.is_a?(Hash)
    value = Ip.new(value)
  end
  @ip = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


18929
18930
18931
# File 'lib/ovirtsdk4/types.rb', line 18929

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


18938
18939
18940
# File 'lib/ovirtsdk4/types.rb', line 18938

def name=(value)
  @name = value
end

#protocolString

Returns the value of the protocol attribute.

Returns:

  • (String)


18947
18948
18949
# File 'lib/ovirtsdk4/types.rb', line 18947

def protocol
  @protocol
end

#protocol=(value) ⇒ Object

Sets the value of the protocol attribute.

Parameters:

  • value (String)


18956
18957
18958
# File 'lib/ovirtsdk4/types.rb', line 18956

def protocol=(value)
  @protocol = value
end

#userUser

Returns the value of the user attribute.

Returns:



18965
18966
18967
# File 'lib/ovirtsdk4/types.rb', line 18965

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)


18978
18979
18980
18981
18982
18983
# File 'lib/ovirtsdk4/types.rb', line 18978

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

#vmVm

Returns the value of the vm attribute.

Returns:



18990
18991
18992
# File 'lib/ovirtsdk4/types.rb', line 18990

def vm
  @vm
end

#vm=(value) ⇒ Object

Sets the value of the vm attribute.

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


19003
19004
19005
19006
19007
19008
# File 'lib/ovirtsdk4/types.rb', line 19003

def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end