Class: OvirtSDK4::Ssh

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

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

  • :authentication_method (SshAuthenticationMethod)

    The value of attribute authentication_method.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :fingerprint (String)

    The value of attribute fingerprint.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :port (Integer)

    The value of attribute port.

  • :user (User, Hash)

    The value of attribute user.



19138
19139
19140
19141
19142
19143
19144
# File 'lib/ovirtsdk4/types.rb', line 19138

def initialize(opts = {})
  super(opts)
  self.authentication_method = opts[:authentication_method]
  self.fingerprint = opts[:fingerprint]
  self.port = opts[:port]
  self.user = opts[:user]
end

Instance Method Details

#==(other) ⇒ Object

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



19149
19150
19151
19152
19153
19154
19155
# File 'lib/ovirtsdk4/types.rb', line 19149

def ==(other)
  super &&
  @authentication_method == other.authentication_method &&
  @fingerprint == other.fingerprint &&
  @port == other.port &&
  @user == other.user
end

#authentication_methodSshAuthenticationMethod

Returns the value of the authentication_method attribute.



18968
18969
18970
# File 'lib/ovirtsdk4/types.rb', line 18968

def authentication_method
  @authentication_method
end

#authentication_method=(value) ⇒ Object

Sets the value of the authentication_method attribute.

Parameters:



18977
18978
18979
# File 'lib/ovirtsdk4/types.rb', line 18977

def authentication_method=(value)
  @authentication_method = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


18986
18987
18988
# File 'lib/ovirtsdk4/types.rb', line 18986

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


18995
18996
18997
# File 'lib/ovirtsdk4/types.rb', line 18995

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


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

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


19013
19014
19015
# File 'lib/ovirtsdk4/types.rb', line 19013

def description=(value)
  @description = value
end

#fingerprintString

Returns the value of the fingerprint attribute.

Returns:

  • (String)


19022
19023
19024
# File 'lib/ovirtsdk4/types.rb', line 19022

def fingerprint
  @fingerprint
end

#fingerprint=(value) ⇒ Object

Sets the value of the fingerprint attribute.

Parameters:

  • value (String)


19031
19032
19033
# File 'lib/ovirtsdk4/types.rb', line 19031

def fingerprint=(value)
  @fingerprint = value
end

#hashObject

Generates a hash value for this object.



19160
19161
19162
19163
19164
19165
19166
# File 'lib/ovirtsdk4/types.rb', line 19160

def hash
  super +
  @authentication_method.hash +
  @fingerprint.hash +
  @port.hash +
  @user.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


19040
19041
19042
# File 'lib/ovirtsdk4/types.rb', line 19040

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


19049
19050
19051
# File 'lib/ovirtsdk4/types.rb', line 19049

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


19058
19059
19060
# File 'lib/ovirtsdk4/types.rb', line 19058

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


19067
19068
19069
# File 'lib/ovirtsdk4/types.rb', line 19067

def name=(value)
  @name = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


19076
19077
19078
# File 'lib/ovirtsdk4/types.rb', line 19076

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


19085
19086
19087
# File 'lib/ovirtsdk4/types.rb', line 19085

def port=(value)
  @port = value
end

#userUser

Returns the value of the user attribute.

Returns:



19094
19095
19096
# File 'lib/ovirtsdk4/types.rb', line 19094

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)


19107
19108
19109
19110
19111
19112
# File 'lib/ovirtsdk4/types.rb', line 19107

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